# flake8: noqa
# type: ignore
# Generated from Jmespath.g4 by ANTLR 4.8
# encoding: utf-8
from ..._vendor.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\3\36")
        buf.write("\u00e8\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\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3")
        buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3?\n")
        buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3")
        buf.write("\3\3\3\3\3\3\3\3\7\3R\n\3\f\3\16\3U\13\3\3\4\3\4\3\4\3")
        buf.write("\4\3\4\5\4\\\n\4\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3")
        buf.write("\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\5\6p\n\6\3\7\3\7\3")
        buf.write("\7\3\7\7\7v\n\7\f\7\16\7y\13\7\3\7\3\7\3\b\3\b\3\b\3\b")
        buf.write("\7\b\u0081\n\b\f\b\16\b\u0084\13\b\3\b\3\b\3\t\3\t\3\t")
        buf.write("\3\t\3\n\5\n\u008d\n\n\3\n\3\n\5\n\u0091\n\n\3\n\3\n\5")
        buf.write("\n\u0095\n\n\5\n\u0097\n\n\3\13\3\13\3\13\3\13\5\13\u009d")
        buf.write("\n\13\3\f\3\f\3\f\3\f\3\f\7\f\u00a4\n\f\f\f\16\f\u00a7")
        buf.write("\13\f\3\f\3\f\3\f\3\f\3\f\5\f\u00ae\n\f\3\r\3\r\5\r\u00b2")
        buf.write("\n\r\3\16\3\16\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\21")
        buf.write("\3\21\3\22\3\22\3\22\3\22\7\22\u00c3\n\22\f\22\16\22\u00c6")
        buf.write("\13\22\3\22\3\22\3\22\3\22\5\22\u00cc\n\22\3\23\3\23\3")
        buf.write("\23\3\23\3\24\3\24\3\24\3\24\7\24\u00d6\n\24\f\24\16\24")
        buf.write("\u00d9\13\24\3\24\3\24\3\24\3\24\5\24\u00df\n\24\3\25")
        buf.write("\3\25\3\25\3\25\3\25\5\25\u00e6\n\25\3\25\2\3\4\26\2\4")
        buf.write("\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(\2\4\3\2\30\32")
        buf.write("\3\2\33\34\2\u00fe\2*\3\2\2\2\4>\3\2\2\2\6[\3\2\2\2\b")
        buf.write("]\3\2\2\2\no\3\2\2\2\fq\3\2\2\2\16|\3\2\2\2\20\u0087\3")
        buf.write("\2\2\2\22\u008c\3\2\2\2\24\u009c\3\2\2\2\26\u00ad\3\2")
        buf.write("\2\2\30\u00b1\3\2\2\2\32\u00b3\3\2\2\2\34\u00b5\3\2\2")
        buf.write("\2\36\u00b8\3\2\2\2 \u00bc\3\2\2\2\"\u00cb\3\2\2\2$\u00cd")
        buf.write("\3\2\2\2&\u00de\3\2\2\2(\u00e5\3\2\2\2*+\5\4\3\2+,\7\2")
        buf.write("\2\3,\3\3\2\2\2-.\b\3\1\2.?\5\n\6\2/?\5 \21\2\60\61\7")
        buf.write("\6\2\2\61?\5\4\3\r\62\63\7\7\2\2\63\64\5\4\3\2\64\65\7")
        buf.write("\b\2\2\65?\3\2\2\2\66?\5\b\5\2\67?\5\f\7\28?\5\16\b\2")
        buf.write("9?\5\36\20\2:?\5\26\f\2;?\7\27\2\2<?\5\32\16\2=?\5\24")
        buf.write("\13\2>-\3\2\2\2>/\3\2\2\2>\60\3\2\2\2>\62\3\2\2\2>\66")
        buf.write("\3\2\2\2>\67\3\2\2\2>8\3\2\2\2>9\3\2\2\2>:\3\2\2\2>;\3")
        buf.write("\2\2\2><\3\2\2\2>=\3\2\2\2?S\3\2\2\2@A\f\21\2\2AB\7\26")
        buf.write("\2\2BR\5\4\3\22CD\f\20\2\2DE\7\4\2\2ER\5\4\3\21FG\f\17")
        buf.write("\2\2GH\7\5\2\2HR\5\4\3\20IJ\f\6\2\2JK\7\t\2\2KR\5\4\3")
        buf.write("\7LM\f\24\2\2MN\7\3\2\2NR\5\6\4\2OP\f\23\2\2PR\5\n\6\2")
        buf.write("Q@\3\2\2\2QC\3\2\2\2QF\3\2\2\2QI\3\2\2\2QL\3\2\2\2QO\3")
        buf.write("\2\2\2RU\3\2\2\2SQ\3\2\2\2ST\3\2\2\2T\5\3\2\2\2US\3\2")
        buf.write("\2\2V\\\5 \21\2W\\\5\f\7\2X\\\5\16\b\2Y\\\5\26\f\2Z\\")
        buf.write("\5\b\5\2[V\3\2\2\2[W\3\2\2\2[X\3\2\2\2[Y\3\2\2\2[Z\3\2")
        buf.write("\2\2\\\7\3\2\2\2]^\7\n\2\2^\t\3\2\2\2_`\7\13\2\2`a\7\34")
        buf.write("\2\2ap\7\f\2\2bc\7\13\2\2cd\7\n\2\2dp\7\f\2\2ef\7\13\2")
        buf.write("\2fg\5\22\n\2gh\7\f\2\2hp\3\2\2\2ij\7\13\2\2jp\7\f\2\2")
        buf.write("kl\7\r\2\2lm\5\4\3\2mn\7\f\2\2np\3\2\2\2o_\3\2\2\2ob\3")
        buf.write("\2\2\2oe\3\2\2\2oi\3\2\2\2ok\3\2\2\2p\13\3\2\2\2qr\7\13")
        buf.write("\2\2rw\5\4\3\2st\7\16\2\2tv\5\4\3\2us\3\2\2\2vy\3\2\2")
        buf.write("\2wu\3\2\2\2wx\3\2\2\2xz\3\2\2\2yw\3\2\2\2z{\7\f\2\2{")
        buf.write("\r\3\2\2\2|}\7\17\2\2}\u0082\5\20\t\2~\177\7\16\2\2\177")
        buf.write("\u0081\5\20\t\2\u0080~\3\2\2\2\u0081\u0084\3\2\2\2\u0082")
        buf.write("\u0080\3\2\2\2\u0082\u0083\3\2\2\2\u0083\u0085\3\2\2\2")
        buf.write("\u0084\u0082\3\2\2\2\u0085\u0086\7\20\2\2\u0086\17\3\2")
        buf.write("\2\2\u0087\u0088\5 \21\2\u0088\u0089\7\21\2\2\u0089\u008a")
        buf.write("\5\4\3\2\u008a\21\3\2\2\2\u008b\u008d\7\34\2\2\u008c\u008b")
        buf.write("\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008e\3\2\2\2\u008e")
        buf.write("\u0090\7\21\2\2\u008f\u0091\7\34\2\2\u0090\u008f\3\2\2")
        buf.write("\2\u0090\u0091\3\2\2\2\u0091\u0096\3\2\2\2\u0092\u0094")
        buf.write("\7\21\2\2\u0093\u0095\7\34\2\2\u0094\u0093\3\2\2\2\u0094")
        buf.write("\u0095\3\2\2\2\u0095\u0097\3\2\2\2\u0096\u0092\3\2\2\2")
        buf.write("\u0096\u0097\3\2\2\2\u0097\23\3\2\2\2\u0098\u0099\7\22")
        buf.write("\2\2\u0099\u009d\7\31\2\2\u009a\u009b\7\22\2\2\u009b\u009d")
        buf.write("\7\35\2\2\u009c\u0098\3\2\2\2\u009c\u009a\3\2\2\2\u009d")
        buf.write("\25\3\2\2\2\u009e\u009f\7\31\2\2\u009f\u00a0\7\7\2\2\u00a0")
        buf.write("\u00a5\5\30\r\2\u00a1\u00a2\7\16\2\2\u00a2\u00a4\5\30")
        buf.write("\r\2\u00a3\u00a1\3\2\2\2\u00a4\u00a7\3\2\2\2\u00a5\u00a3")
        buf.write("\3\2\2\2\u00a5\u00a6\3\2\2\2\u00a6\u00a8\3\2\2\2\u00a7")
        buf.write("\u00a5\3\2\2\2\u00a8\u00a9\7\b\2\2\u00a9\u00ae\3\2\2\2")
        buf.write("\u00aa\u00ab\7\31\2\2\u00ab\u00ac\7\7\2\2\u00ac\u00ae")
        buf.write("\7\b\2\2\u00ad\u009e\3\2\2\2\u00ad\u00aa\3\2\2\2\u00ae")
        buf.write("\27\3\2\2\2\u00af\u00b2\5\4\3\2\u00b0\u00b2\5\34\17\2")
        buf.write("\u00b1\u00af\3\2\2\2\u00b1\u00b0\3\2\2\2\u00b2\31\3\2")
        buf.write("\2\2\u00b3\u00b4\7\23\2\2\u00b4\33\3\2\2\2\u00b5\u00b6")
        buf.write("\7\24\2\2\u00b6\u00b7\5\4\3\2\u00b7\35\3\2\2\2\u00b8\u00b9")
        buf.write("\7\25\2\2\u00b9\u00ba\5(\25\2\u00ba\u00bb\7\25\2\2\u00bb")
        buf.write("\37\3\2\2\2\u00bc\u00bd\t\2\2\2\u00bd!\3\2\2\2\u00be\u00bf")
        buf.write("\7\17\2\2\u00bf\u00c4\5$\23\2\u00c0\u00c1\7\16\2\2\u00c1")
        buf.write("\u00c3\5$\23\2\u00c2\u00c0\3\2\2\2\u00c3\u00c6\3\2\2\2")
        buf.write("\u00c4\u00c2\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c5\u00c7\3")
        buf.write("\2\2\2\u00c6\u00c4\3\2\2\2\u00c7\u00c8\7\20\2\2\u00c8")
        buf.write("\u00cc\3\2\2\2\u00c9\u00ca\7\17\2\2\u00ca\u00cc\7\20\2")
        buf.write("\2\u00cb\u00be\3\2\2\2\u00cb\u00c9\3\2\2\2\u00cc#\3\2")
        buf.write("\2\2\u00cd\u00ce\7\32\2\2\u00ce\u00cf\7\21\2\2\u00cf\u00d0")
        buf.write("\5(\25\2\u00d0%\3\2\2\2\u00d1\u00d2\7\13\2\2\u00d2\u00d7")
        buf.write("\5(\25\2\u00d3\u00d4\7\16\2\2\u00d4\u00d6\5(\25\2\u00d5")
        buf.write("\u00d3\3\2\2\2\u00d6\u00d9\3\2\2\2\u00d7\u00d5\3\2\2\2")
        buf.write("\u00d7\u00d8\3\2\2\2\u00d8\u00da\3\2\2\2\u00d9\u00d7\3")
        buf.write("\2\2\2\u00da\u00db\7\f\2\2\u00db\u00df\3\2\2\2\u00dc\u00dd")
        buf.write("\7\13\2\2\u00dd\u00df\7\f\2\2\u00de\u00d1\3\2\2\2\u00de")
        buf.write("\u00dc\3\2\2\2\u00df\'\3\2\2\2\u00e0\u00e6\7\32\2\2\u00e1")
        buf.write("\u00e6\t\3\2\2\u00e2\u00e6\5\"\22\2\u00e3\u00e6\5&\24")
        buf.write("\2\u00e4\u00e6\7\30\2\2\u00e5\u00e0\3\2\2\2\u00e5\u00e1")
        buf.write("\3\2\2\2\u00e5\u00e2\3\2\2\2\u00e5\u00e3\3\2\2\2\u00e5")
        buf.write("\u00e4\3\2\2\2\u00e6)\3\2\2\2\26>QS[ow\u0082\u008c\u0090")
        buf.write("\u0094\u0096\u009c\u00a5\u00ad\u00b1\u00c4\u00cb\u00d7")
        buf.write("\u00de\u00e5")
        return buf.getvalue()


class JmespathParser ( Parser ):

    grammarFileName = "Jmespath.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'.'", "'&&'", "'||'", "'!'", "'('", "')'", 
                     "'|'", "'*'", "'['", "']'", "'[?'", "','", "'{'", "'}'", 
                     "':'", "'$'", "'@'", "'&'", "'`'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "COMPARATOR", "RAW_STRING", "JSON_CONSTANT", "NAME", 
                      "STRING", "REAL_OR_EXPONENT_NUMBER", "SIGNED_INT", 
                      "INT", "WS" ]

    RULE_singleExpression = 0
    RULE_expression = 1
    RULE_chainedExpression = 2
    RULE_wildcard = 3
    RULE_bracketSpecifier = 4
    RULE_multiSelectList = 5
    RULE_multiSelectHash = 6
    RULE_keyvalExpr = 7
    RULE_sliceNode = 8
    RULE_parameterNode = 9
    RULE_functionExpression = 10
    RULE_functionArg = 11
    RULE_currentNode = 12
    RULE_expressionType = 13
    RULE_literal = 14
    RULE_identifier = 15
    RULE_jsonObject = 16
    RULE_jsonObjectPair = 17
    RULE_jsonArray = 18
    RULE_jsonValue = 19

    ruleNames =  [ "singleExpression", "expression", "chainedExpression", 
                   "wildcard", "bracketSpecifier", "multiSelectList", "multiSelectHash", 
                   "keyvalExpr", "sliceNode", "parameterNode", "functionExpression", 
                   "functionArg", "currentNode", "expressionType", "literal", 
                   "identifier", "jsonObject", "jsonObjectPair", "jsonArray", 
                   "jsonValue" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    COMPARATOR=20
    RAW_STRING=21
    JSON_CONSTANT=22
    NAME=23
    STRING=24
    REAL_OR_EXPONENT_NUMBER=25
    SIGNED_INT=26
    INT=27
    WS=28

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




    class SingleExpressionContext(ParserRuleContext):

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

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)


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

        def getRuleIndex(self):
            return JmespathParser.RULE_singleExpression

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

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

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




    def singleExpression(self):

        localctx = JmespathParser.SingleExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_singleExpression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 40
            self.expression(0)
            self.state = 41
            self.match(JmespathParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return JmespathParser.RULE_expression

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class PipeExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(JmespathParser.ExpressionContext,i)


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

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

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


    class ParameterExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def parameterNode(self):
            return self.getTypedRuleContext(JmespathParser.ParameterNodeContext,0)


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

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

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


    class IdentifierExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(JmespathParser.IdentifierContext,0)


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

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

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


    class NotExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)


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

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

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


    class RawStringExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def RAW_STRING(self):
            return self.getToken(JmespathParser.RAW_STRING, 0)

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

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

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


    class ComparisonExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(JmespathParser.ExpressionContext,i)

        def COMPARATOR(self):
            return self.getToken(JmespathParser.COMPARATOR, 0)

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

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

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


    class ParenExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)


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

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

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


    class BracketExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def bracketSpecifier(self):
            return self.getTypedRuleContext(JmespathParser.BracketSpecifierContext,0)


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

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

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


    class OrExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(JmespathParser.ExpressionContext,i)


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

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

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


    class CurrentNodeExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def currentNode(self):
            return self.getTypedRuleContext(JmespathParser.CurrentNodeContext,0)


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

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

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


    class ChainExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)

        def chainedExpression(self):
            return self.getTypedRuleContext(JmespathParser.ChainedExpressionContext,0)


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

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

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


    class AndExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(JmespathParser.ExpressionContext,i)


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

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

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


    class MultiSelectHashExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def multiSelectHash(self):
            return self.getTypedRuleContext(JmespathParser.MultiSelectHashContext,0)


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

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

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


    class WildcardExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def wildcard(self):
            return self.getTypedRuleContext(JmespathParser.WildcardContext,0)


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

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

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


    class FunctionCallExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def functionExpression(self):
            return self.getTypedRuleContext(JmespathParser.FunctionExpressionContext,0)


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

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

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


    class MultiSelectListExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def multiSelectList(self):
            return self.getTypedRuleContext(JmespathParser.MultiSelectListContext,0)


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

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

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


    class BracketedExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)

        def bracketSpecifier(self):
            return self.getTypedRuleContext(JmespathParser.BracketSpecifierContext,0)


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

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

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


    class LiteralExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ExpressionContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def literal(self):
            return self.getTypedRuleContext(JmespathParser.LiteralContext,0)


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

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

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



    def expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = JmespathParser.ExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 2
        self.enterRecursionRule(localctx, 2, self.RULE_expression, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 60
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                localctx = JmespathParser.BracketExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 44
                self.bracketSpecifier()
                pass

            elif la_ == 2:
                localctx = JmespathParser.IdentifierExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 45
                self.identifier()
                pass

            elif la_ == 3:
                localctx = JmespathParser.NotExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 46
                self.match(JmespathParser.T__3)
                self.state = 47
                self.expression(11)
                pass

            elif la_ == 4:
                localctx = JmespathParser.ParenExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 48
                self.match(JmespathParser.T__4)
                self.state = 49
                self.expression(0)
                self.state = 50
                self.match(JmespathParser.T__5)
                pass

            elif la_ == 5:
                localctx = JmespathParser.WildcardExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 52
                self.wildcard()
                pass

            elif la_ == 6:
                localctx = JmespathParser.MultiSelectListExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 53
                self.multiSelectList()
                pass

            elif la_ == 7:
                localctx = JmespathParser.MultiSelectHashExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 54
                self.multiSelectHash()
                pass

            elif la_ == 8:
                localctx = JmespathParser.LiteralExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 55
                self.literal()
                pass

            elif la_ == 9:
                localctx = JmespathParser.FunctionCallExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 56
                self.functionExpression()
                pass

            elif la_ == 10:
                localctx = JmespathParser.RawStringExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 57
                self.match(JmespathParser.RAW_STRING)
                pass

            elif la_ == 11:
                localctx = JmespathParser.CurrentNodeExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 58
                self.currentNode()
                pass

            elif la_ == 12:
                localctx = JmespathParser.ParameterExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 59
                self.parameterNode()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 81
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,2,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 79
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,1,self._ctx)
                    if la_ == 1:
                        localctx = JmespathParser.ComparisonExpressionContext(self, JmespathParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 62
                        if not self.precpred(self._ctx, 15):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 15)")
                        self.state = 63
                        self.match(JmespathParser.COMPARATOR)
                        self.state = 64
                        self.expression(16)
                        pass

                    elif la_ == 2:
                        localctx = JmespathParser.AndExpressionContext(self, JmespathParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 65
                        if not self.precpred(self._ctx, 14):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 14)")
                        self.state = 66
                        self.match(JmespathParser.T__1)
                        self.state = 67
                        self.expression(15)
                        pass

                    elif la_ == 3:
                        localctx = JmespathParser.OrExpressionContext(self, JmespathParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 68
                        if not self.precpred(self._ctx, 13):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 13)")
                        self.state = 69
                        self.match(JmespathParser.T__2)
                        self.state = 70
                        self.expression(14)
                        pass

                    elif la_ == 4:
                        localctx = JmespathParser.PipeExpressionContext(self, JmespathParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 71
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 72
                        self.match(JmespathParser.T__6)
                        self.state = 73
                        self.expression(5)
                        pass

                    elif la_ == 5:
                        localctx = JmespathParser.ChainExpressionContext(self, JmespathParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 74
                        if not self.precpred(self._ctx, 18):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 18)")
                        self.state = 75
                        self.match(JmespathParser.T__0)
                        self.state = 76
                        self.chainedExpression()
                        pass

                    elif la_ == 6:
                        localctx = JmespathParser.BracketedExpressionContext(self, JmespathParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 77
                        if not self.precpred(self._ctx, 17):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 17)")
                        self.state = 78
                        self.bracketSpecifier()
                        pass

             
                self.state = 83
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,2,self._ctx)

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


    class ChainedExpressionContext(ParserRuleContext):

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

        def identifier(self):
            return self.getTypedRuleContext(JmespathParser.IdentifierContext,0)


        def multiSelectList(self):
            return self.getTypedRuleContext(JmespathParser.MultiSelectListContext,0)


        def multiSelectHash(self):
            return self.getTypedRuleContext(JmespathParser.MultiSelectHashContext,0)


        def functionExpression(self):
            return self.getTypedRuleContext(JmespathParser.FunctionExpressionContext,0)


        def wildcard(self):
            return self.getTypedRuleContext(JmespathParser.WildcardContext,0)


        def getRuleIndex(self):
            return JmespathParser.RULE_chainedExpression

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

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

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




    def chainedExpression(self):

        localctx = JmespathParser.ChainedExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_chainedExpression)
        try:
            self.state = 89
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 84
                self.identifier()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 85
                self.multiSelectList()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 86
                self.multiSelectHash()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 87
                self.functionExpression()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 88
                self.wildcard()
                pass


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


    class WildcardContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return JmespathParser.RULE_wildcard

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

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

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




    def wildcard(self):

        localctx = JmespathParser.WildcardContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_wildcard)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 91
            self.match(JmespathParser.T__7)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BracketSpecifierContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return JmespathParser.RULE_bracketSpecifier

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class SelectContext(BracketSpecifierContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.BracketSpecifierContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)


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

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

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


    class BracketFlattenContext(BracketSpecifierContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.BracketSpecifierContext
            super().__init__(parser)
            self.copyFrom(ctx)


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

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

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


    class BracketSliceContext(BracketSpecifierContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.BracketSpecifierContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def sliceNode(self):
            return self.getTypedRuleContext(JmespathParser.SliceNodeContext,0)


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

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

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


    class BracketIndexContext(BracketSpecifierContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.BracketSpecifierContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def SIGNED_INT(self):
            return self.getToken(JmespathParser.SIGNED_INT, 0)

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

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

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


    class BracketStarContext(BracketSpecifierContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.BracketSpecifierContext
            super().__init__(parser)
            self.copyFrom(ctx)


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

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

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



    def bracketSpecifier(self):

        localctx = JmespathParser.BracketSpecifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_bracketSpecifier)
        try:
            self.state = 109
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,4,self._ctx)
            if la_ == 1:
                localctx = JmespathParser.BracketIndexContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 93
                self.match(JmespathParser.T__8)
                self.state = 94
                self.match(JmespathParser.SIGNED_INT)
                self.state = 95
                self.match(JmespathParser.T__9)
                pass

            elif la_ == 2:
                localctx = JmespathParser.BracketStarContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 96
                self.match(JmespathParser.T__8)
                self.state = 97
                self.match(JmespathParser.T__7)
                self.state = 98
                self.match(JmespathParser.T__9)
                pass

            elif la_ == 3:
                localctx = JmespathParser.BracketSliceContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 99
                self.match(JmespathParser.T__8)
                self.state = 100
                self.sliceNode()
                self.state = 101
                self.match(JmespathParser.T__9)
                pass

            elif la_ == 4:
                localctx = JmespathParser.BracketFlattenContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 103
                self.match(JmespathParser.T__8)
                self.state = 104
                self.match(JmespathParser.T__9)
                pass

            elif la_ == 5:
                localctx = JmespathParser.SelectContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 105
                self.match(JmespathParser.T__10)
                self.state = 106
                self.expression(0)
                self.state = 107
                self.match(JmespathParser.T__9)
                pass


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


    class MultiSelectListContext(ParserRuleContext):

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

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(JmespathParser.ExpressionContext,i)


        def getRuleIndex(self):
            return JmespathParser.RULE_multiSelectList

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

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

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




    def multiSelectList(self):

        localctx = JmespathParser.MultiSelectListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_multiSelectList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 111
            self.match(JmespathParser.T__8)
            self.state = 112
            self.expression(0)
            self.state = 117
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==JmespathParser.T__11:
                self.state = 113
                self.match(JmespathParser.T__11)
                self.state = 114
                self.expression(0)
                self.state = 119
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 120
            self.match(JmespathParser.T__9)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MultiSelectHashContext(ParserRuleContext):

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

        def keyvalExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.KeyvalExprContext)
            else:
                return self.getTypedRuleContext(JmespathParser.KeyvalExprContext,i)


        def getRuleIndex(self):
            return JmespathParser.RULE_multiSelectHash

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

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

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




    def multiSelectHash(self):

        localctx = JmespathParser.MultiSelectHashContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_multiSelectHash)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 122
            self.match(JmespathParser.T__12)
            self.state = 123
            self.keyvalExpr()
            self.state = 128
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==JmespathParser.T__11:
                self.state = 124
                self.match(JmespathParser.T__11)
                self.state = 125
                self.keyvalExpr()
                self.state = 130
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 131
            self.match(JmespathParser.T__13)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KeyvalExprContext(ParserRuleContext):

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

        def identifier(self):
            return self.getTypedRuleContext(JmespathParser.IdentifierContext,0)


        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)


        def getRuleIndex(self):
            return JmespathParser.RULE_keyvalExpr

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

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

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




    def keyvalExpr(self):

        localctx = JmespathParser.KeyvalExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_keyvalExpr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 133
            self.identifier()
            self.state = 134
            self.match(JmespathParser.T__14)
            self.state = 135
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SliceNodeContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.sliceStart = None # Token
            self.sliceStop = None # Token
            self.sliceStep = None # Token

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

        def getRuleIndex(self):
            return JmespathParser.RULE_sliceNode

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

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

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




    def sliceNode(self):

        localctx = JmespathParser.SliceNodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_sliceNode)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 138
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==JmespathParser.SIGNED_INT:
                self.state = 137
                localctx.sliceStart = self.match(JmespathParser.SIGNED_INT)


            self.state = 140
            self.match(JmespathParser.T__14)
            self.state = 142
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==JmespathParser.SIGNED_INT:
                self.state = 141
                localctx.sliceStop = self.match(JmespathParser.SIGNED_INT)


            self.state = 148
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==JmespathParser.T__14:
                self.state = 144
                self.match(JmespathParser.T__14)
                self.state = 146
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==JmespathParser.SIGNED_INT:
                    self.state = 145
                    localctx.sliceStep = self.match(JmespathParser.SIGNED_INT)




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


    class ParameterNodeContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return JmespathParser.RULE_parameterNode

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class NameParameterContext(ParameterNodeContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ParameterNodeContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def NAME(self):
            return self.getToken(JmespathParser.NAME, 0)

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

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

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


    class NumberParameterContext(ParameterNodeContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.ParameterNodeContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def INT(self):
            return self.getToken(JmespathParser.INT, 0)

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

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

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



    def parameterNode(self):

        localctx = JmespathParser.ParameterNodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_parameterNode)
        try:
            self.state = 154
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,11,self._ctx)
            if la_ == 1:
                localctx = JmespathParser.NameParameterContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 150
                self.match(JmespathParser.T__15)
                self.state = 151
                self.match(JmespathParser.NAME)
                pass

            elif la_ == 2:
                localctx = JmespathParser.NumberParameterContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 152
                self.match(JmespathParser.T__15)
                self.state = 153
                self.match(JmespathParser.INT)
                pass


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


    class FunctionExpressionContext(ParserRuleContext):

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

        def NAME(self):
            return self.getToken(JmespathParser.NAME, 0)

        def functionArg(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.FunctionArgContext)
            else:
                return self.getTypedRuleContext(JmespathParser.FunctionArgContext,i)


        def getRuleIndex(self):
            return JmespathParser.RULE_functionExpression

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

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

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




    def functionExpression(self):

        localctx = JmespathParser.FunctionExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_functionExpression)
        self._la = 0 # Token type
        try:
            self.state = 171
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,13,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 156
                self.match(JmespathParser.NAME)
                self.state = 157
                self.match(JmespathParser.T__4)
                self.state = 158
                self.functionArg()
                self.state = 163
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==JmespathParser.T__11:
                    self.state = 159
                    self.match(JmespathParser.T__11)
                    self.state = 160
                    self.functionArg()
                    self.state = 165
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 166
                self.match(JmespathParser.T__5)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 168
                self.match(JmespathParser.NAME)
                self.state = 169
                self.match(JmespathParser.T__4)
                self.state = 170
                self.match(JmespathParser.T__5)
                pass


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


    class FunctionArgContext(ParserRuleContext):

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

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)


        def expressionType(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionTypeContext,0)


        def getRuleIndex(self):
            return JmespathParser.RULE_functionArg

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

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

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




    def functionArg(self):

        localctx = JmespathParser.FunctionArgContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_functionArg)
        try:
            self.state = 175
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [JmespathParser.T__3, JmespathParser.T__4, JmespathParser.T__7, JmespathParser.T__8, JmespathParser.T__10, JmespathParser.T__12, JmespathParser.T__15, JmespathParser.T__16, JmespathParser.T__18, JmespathParser.RAW_STRING, JmespathParser.JSON_CONSTANT, JmespathParser.NAME, JmespathParser.STRING]:
                self.enterOuterAlt(localctx, 1)
                self.state = 173
                self.expression(0)
                pass
            elif token in [JmespathParser.T__17]:
                self.enterOuterAlt(localctx, 2)
                self.state = 174
                self.expressionType()
                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 CurrentNodeContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return JmespathParser.RULE_currentNode

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

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

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




    def currentNode(self):

        localctx = JmespathParser.CurrentNodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_currentNode)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 177
            self.match(JmespathParser.T__16)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionTypeContext(ParserRuleContext):

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

        def expression(self):
            return self.getTypedRuleContext(JmespathParser.ExpressionContext,0)


        def getRuleIndex(self):
            return JmespathParser.RULE_expressionType

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

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

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




    def expressionType(self):

        localctx = JmespathParser.ExpressionTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_expressionType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 179
            self.match(JmespathParser.T__17)
            self.state = 180
            self.expression(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LiteralContext(ParserRuleContext):

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

        def jsonValue(self):
            return self.getTypedRuleContext(JmespathParser.JsonValueContext,0)


        def getRuleIndex(self):
            return JmespathParser.RULE_literal

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

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

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




    def literal(self):

        localctx = JmespathParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 182
            self.match(JmespathParser.T__18)
            self.state = 183
            self.jsonValue()
            self.state = 184
            self.match(JmespathParser.T__18)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IdentifierContext(ParserRuleContext):

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

        def NAME(self):
            return self.getToken(JmespathParser.NAME, 0)

        def STRING(self):
            return self.getToken(JmespathParser.STRING, 0)

        def JSON_CONSTANT(self):
            return self.getToken(JmespathParser.JSON_CONSTANT, 0)

        def getRuleIndex(self):
            return JmespathParser.RULE_identifier

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

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

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




    def identifier(self):

        localctx = JmespathParser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_identifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 186
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << JmespathParser.JSON_CONSTANT) | (1 << JmespathParser.NAME) | (1 << JmespathParser.STRING))) != 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 JsonObjectContext(ParserRuleContext):

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

        def jsonObjectPair(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.JsonObjectPairContext)
            else:
                return self.getTypedRuleContext(JmespathParser.JsonObjectPairContext,i)


        def getRuleIndex(self):
            return JmespathParser.RULE_jsonObject

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

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

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




    def jsonObject(self):

        localctx = JmespathParser.JsonObjectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_jsonObject)
        self._la = 0 # Token type
        try:
            self.state = 201
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,16,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 188
                self.match(JmespathParser.T__12)
                self.state = 189
                self.jsonObjectPair()
                self.state = 194
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==JmespathParser.T__11:
                    self.state = 190
                    self.match(JmespathParser.T__11)
                    self.state = 191
                    self.jsonObjectPair()
                    self.state = 196
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 197
                self.match(JmespathParser.T__13)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 199
                self.match(JmespathParser.T__12)
                self.state = 200
                self.match(JmespathParser.T__13)
                pass


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


    class JsonObjectPairContext(ParserRuleContext):

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

        def STRING(self):
            return self.getToken(JmespathParser.STRING, 0)

        def jsonValue(self):
            return self.getTypedRuleContext(JmespathParser.JsonValueContext,0)


        def getRuleIndex(self):
            return JmespathParser.RULE_jsonObjectPair

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

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

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




    def jsonObjectPair(self):

        localctx = JmespathParser.JsonObjectPairContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_jsonObjectPair)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 203
            self.match(JmespathParser.STRING)
            self.state = 204
            self.match(JmespathParser.T__14)
            self.state = 205
            self.jsonValue()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JsonArrayContext(ParserRuleContext):

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

        def jsonValue(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(JmespathParser.JsonValueContext)
            else:
                return self.getTypedRuleContext(JmespathParser.JsonValueContext,i)


        def getRuleIndex(self):
            return JmespathParser.RULE_jsonArray

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

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

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




    def jsonArray(self):

        localctx = JmespathParser.JsonArrayContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_jsonArray)
        self._la = 0 # Token type
        try:
            self.state = 220
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,18,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 207
                self.match(JmespathParser.T__8)
                self.state = 208
                self.jsonValue()
                self.state = 213
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==JmespathParser.T__11:
                    self.state = 209
                    self.match(JmespathParser.T__11)
                    self.state = 210
                    self.jsonValue()
                    self.state = 215
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 216
                self.match(JmespathParser.T__9)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 218
                self.match(JmespathParser.T__8)
                self.state = 219
                self.match(JmespathParser.T__9)
                pass


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


    class JsonValueContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return JmespathParser.RULE_jsonValue

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class JsonArrayValueContext(JsonValueContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.JsonValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def jsonArray(self):
            return self.getTypedRuleContext(JmespathParser.JsonArrayContext,0)


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

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

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


    class JsonStringValueContext(JsonValueContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.JsonValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def STRING(self):
            return self.getToken(JmespathParser.STRING, 0)

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

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

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


    class JsonObjectValueContext(JsonValueContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.JsonValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def jsonObject(self):
            return self.getTypedRuleContext(JmespathParser.JsonObjectContext,0)


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

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

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


    class JsonConstantValueContext(JsonValueContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.JsonValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def JSON_CONSTANT(self):
            return self.getToken(JmespathParser.JSON_CONSTANT, 0)

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

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

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


    class JsonNumberValueContext(JsonValueContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a JmespathParser.JsonValueContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def REAL_OR_EXPONENT_NUMBER(self):
            return self.getToken(JmespathParser.REAL_OR_EXPONENT_NUMBER, 0)
        def SIGNED_INT(self):
            return self.getToken(JmespathParser.SIGNED_INT, 0)

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

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

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



    def jsonValue(self):

        localctx = JmespathParser.JsonValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_jsonValue)
        self._la = 0 # Token type
        try:
            self.state = 227
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [JmespathParser.STRING]:
                localctx = JmespathParser.JsonStringValueContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 222
                self.match(JmespathParser.STRING)
                pass
            elif token in [JmespathParser.REAL_OR_EXPONENT_NUMBER, JmespathParser.SIGNED_INT]:
                localctx = JmespathParser.JsonNumberValueContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 223
                _la = self._input.LA(1)
                if not(_la==JmespathParser.REAL_OR_EXPONENT_NUMBER or _la==JmespathParser.SIGNED_INT):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [JmespathParser.T__12]:
                localctx = JmespathParser.JsonObjectValueContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 224
                self.jsonObject()
                pass
            elif token in [JmespathParser.T__8]:
                localctx = JmespathParser.JsonArrayValueContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 225
                self.jsonArray()
                pass
            elif token in [JmespathParser.JSON_CONSTANT]:
                localctx = JmespathParser.JsonConstantValueContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 226
                self.match(JmespathParser.JSON_CONSTANT)
                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



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[1] = self.expression_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def expression_sempred(self, localctx:ExpressionContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 15)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 14)
         

            if predIndex == 2:
                return self.precpred(self._ctx, 13)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 4)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 18)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 17)
