# Generated from grammar/DynamoDbGrammar.g4 by ANTLR 4.7.2
# encoding: utf-8
# pylint: disable=W
from antlr4 import *
from io import StringIO
from typing.io import TextIO # pylint: disable=import-error
import sys


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3 ")
        buf.write("\u00f1\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\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\3\2\3\2\3\2\3\3\3\3\3\3\7\3")
        buf.write("=\n\3\f\3\16\3@\13\3\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3")
        buf.write("\5\3\5\3\5\3\5\3\5\3\5\7\5P\n\5\f\5\16\5S\13\5\3\5\3\5")
        buf.write("\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3")
        buf.write("\5\5\5e\n\5\3\5\3\5\3\5\3\5\3\5\3\5\7\5m\n\5\f\5\16\5")
        buf.write("p\13\5\3\6\3\6\3\7\3\7\3\7\3\b\3\b\3\b\3\b\6\b{\n\b\r")
        buf.write("\b\16\b|\3\t\3\t\3\t\3\t\7\t\u0083\n\t\f\t\16\t\u0086")
        buf.write("\13\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\7\13\u0090\n")
        buf.write("\13\f\13\16\13\u0093\13\13\3\f\3\f\3\f\3\r\3\r\3\r\3\r")
        buf.write("\7\r\u009c\n\r\f\r\16\r\u009f\13\r\3\16\3\16\3\16\3\17")
        buf.write("\3\17\3\17\3\17\7\17\u00a8\n\17\f\17\16\17\u00ab\13\17")
        buf.write("\3\20\3\20\3\21\3\21\5\21\u00b1\n\21\3\22\3\22\3\22\3")
        buf.write("\22\3\22\3\22\3\22\3\22\3\22\5\22\u00bc\n\22\3\23\3\23")
        buf.write("\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u00c6\n\23\3\24\3")
        buf.write("\24\3\24\3\24\3\24\7\24\u00cd\n\24\f\24\16\24\u00d0\13")
        buf.write("\24\3\24\3\24\3\25\3\25\7\25\u00d6\n\25\f\25\16\25\u00d9")
        buf.write("\13\25\3\26\3\26\3\27\3\27\3\27\3\27\3\27\5\27\u00e2\n")
        buf.write("\27\3\30\3\30\3\31\3\31\3\31\3\32\3\32\3\32\3\33\6\33")
        buf.write("\u00ed\n\33\r\33\16\33\u00ee\3\33\2\3\b\34\2\4\6\b\n\f")
        buf.write("\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\2\5\3\2")
        buf.write("\n\17\3\2\20\21\3\2\34\35\2\u00f0\2\66\3\2\2\2\49\3\2")
        buf.write("\2\2\6A\3\2\2\2\bd\3\2\2\2\nq\3\2\2\2\fs\3\2\2\2\16z\3")
        buf.write("\2\2\2\20~\3\2\2\2\22\u0087\3\2\2\2\24\u008b\3\2\2\2\26")
        buf.write("\u0094\3\2\2\2\30\u0097\3\2\2\2\32\u00a0\3\2\2\2\34\u00a3")
        buf.write("\3\2\2\2\36\u00ac\3\2\2\2 \u00b0\3\2\2\2\"\u00bb\3\2\2")
        buf.write("\2$\u00c5\3\2\2\2&\u00c7\3\2\2\2(\u00d3\3\2\2\2*\u00da")
        buf.write("\3\2\2\2,\u00e1\3\2\2\2.\u00e3\3\2\2\2\60\u00e5\3\2\2")
        buf.write("\2\62\u00e8\3\2\2\2\64\u00ec\3\2\2\2\66\67\5\4\3\2\67")
        buf.write("8\7\2\2\38\3\3\2\2\29>\5(\25\2:;\7\3\2\2;=\5(\25\2<:\3")
        buf.write("\2\2\2=@\3\2\2\2><\3\2\2\2>?\3\2\2\2?\5\3\2\2\2@>\3\2")
        buf.write("\2\2AB\5\b\5\2BC\7\2\2\3C\7\3\2\2\2DE\b\5\1\2EF\5$\23")
        buf.write("\2FG\5\n\6\2GH\5$\23\2He\3\2\2\2IJ\5$\23\2JK\7\22\2\2")
        buf.write("KL\7\4\2\2LQ\5$\23\2MN\7\3\2\2NP\5$\23\2OM\3\2\2\2PS\3")
        buf.write("\2\2\2QO\3\2\2\2QR\3\2\2\2RT\3\2\2\2SQ\3\2\2\2TU\7\5\2")
        buf.write("\2Ue\3\2\2\2VW\5$\23\2WX\7\23\2\2XY\5$\23\2YZ\7\25\2\2")
        buf.write("Z[\5$\23\2[e\3\2\2\2\\e\5&\24\2]^\7\4\2\2^_\5\b\5\2_`")
        buf.write("\7\5\2\2`a\b\5\1\2ae\3\2\2\2bc\7\24\2\2ce\5\b\5\5dD\3")
        buf.write("\2\2\2dI\3\2\2\2dV\3\2\2\2d\\\3\2\2\2d]\3\2\2\2db\3\2")
        buf.write("\2\2en\3\2\2\2fg\f\4\2\2gh\7\25\2\2hm\5\b\5\5ij\f\3\2")
        buf.write("\2jk\7\26\2\2km\5\b\5\4lf\3\2\2\2li\3\2\2\2mp\3\2\2\2")
        buf.write("nl\3\2\2\2no\3\2\2\2o\t\3\2\2\2pn\3\2\2\2qr\t\2\2\2r\13")
        buf.write("\3\2\2\2st\5\16\b\2tu\7\2\2\3u\r\3\2\2\2v{\5\20\t\2w{")
        buf.write("\5\24\13\2x{\5\30\r\2y{\5\34\17\2zv\3\2\2\2zw\3\2\2\2")
        buf.write("zx\3\2\2\2zy\3\2\2\2{|\3\2\2\2|z\3\2\2\2|}\3\2\2\2}\17")
        buf.write("\3\2\2\2~\177\7\27\2\2\177\u0084\5\22\n\2\u0080\u0081")
        buf.write("\7\3\2\2\u0081\u0083\5\22\n\2\u0082\u0080\3\2\2\2\u0083")
        buf.write("\u0086\3\2\2\2\u0084\u0082\3\2\2\2\u0084\u0085\3\2\2\2")
        buf.write("\u0085\21\3\2\2\2\u0086\u0084\3\2\2\2\u0087\u0088\5(\25")
        buf.write("\2\u0088\u0089\7\n\2\2\u0089\u008a\5 \21\2\u008a\23\3")
        buf.write("\2\2\2\u008b\u008c\7\30\2\2\u008c\u0091\5\26\f\2\u008d")
        buf.write("\u008e\7\3\2\2\u008e\u0090\5\26\f\2\u008f\u008d\3\2\2")
        buf.write("\2\u0090\u0093\3\2\2\2\u0091\u008f\3\2\2\2\u0091\u0092")
        buf.write("\3\2\2\2\u0092\25\3\2\2\2\u0093\u0091\3\2\2\2\u0094\u0095")
        buf.write("\5(\25\2\u0095\u0096\5.\30\2\u0096\27\3\2\2\2\u0097\u0098")
        buf.write("\7\31\2\2\u0098\u009d\5\32\16\2\u0099\u009a\7\3\2\2\u009a")
        buf.write("\u009c\5\32\16\2\u009b\u0099\3\2\2\2\u009c\u009f\3\2\2")
        buf.write("\2\u009d\u009b\3\2\2\2\u009d\u009e\3\2\2\2\u009e\31\3")
        buf.write("\2\2\2\u009f\u009d\3\2\2\2\u00a0\u00a1\5(\25\2\u00a1\u00a2")
        buf.write("\5.\30\2\u00a2\33\3\2\2\2\u00a3\u00a4\7\32\2\2\u00a4\u00a9")
        buf.write("\5\36\20\2\u00a5\u00a6\7\3\2\2\u00a6\u00a8\5\36\20\2\u00a7")
        buf.write("\u00a5\3\2\2\2\u00a8\u00ab\3\2\2\2\u00a9\u00a7\3\2\2\2")
        buf.write("\u00a9\u00aa\3\2\2\2\u00aa\35\3\2\2\2\u00ab\u00a9\3\2")
        buf.write("\2\2\u00ac\u00ad\5(\25\2\u00ad\37\3\2\2\2\u00ae\u00b1")
        buf.write("\5$\23\2\u00af\u00b1\5\"\22\2\u00b0\u00ae\3\2\2\2\u00b0")
        buf.write("\u00af\3\2\2\2\u00b1!\3\2\2\2\u00b2\u00b3\5$\23\2\u00b3")
        buf.write("\u00b4\t\3\2\2\u00b4\u00b5\5$\23\2\u00b5\u00bc\3\2\2\2")
        buf.write("\u00b6\u00b7\7\4\2\2\u00b7\u00b8\5\"\22\2\u00b8\u00b9")
        buf.write("\7\5\2\2\u00b9\u00ba\b\22\1\2\u00ba\u00bc\3\2\2\2\u00bb")
        buf.write("\u00b2\3\2\2\2\u00bb\u00b6\3\2\2\2\u00bc#\3\2\2\2\u00bd")
        buf.write("\u00c6\5(\25\2\u00be\u00c6\5.\30\2\u00bf\u00c6\5&\24\2")
        buf.write("\u00c0\u00c1\7\4\2\2\u00c1\u00c2\5$\23\2\u00c2\u00c3\7")
        buf.write("\5\2\2\u00c3\u00c4\b\23\1\2\u00c4\u00c6\3\2\2\2\u00c5")
        buf.write("\u00bd\3\2\2\2\u00c5\u00be\3\2\2\2\u00c5\u00bf\3\2\2\2")
        buf.write("\u00c5\u00c0\3\2\2\2\u00c6%\3\2\2\2\u00c7\u00c8\7\34\2")
        buf.write("\2\u00c8\u00c9\7\4\2\2\u00c9\u00ce\5$\23\2\u00ca\u00cb")
        buf.write("\7\3\2\2\u00cb\u00cd\5$\23\2\u00cc\u00ca\3\2\2\2\u00cd")
        buf.write("\u00d0\3\2\2\2\u00ce\u00cc\3\2\2\2\u00ce\u00cf\3\2\2\2")
        buf.write("\u00cf\u00d1\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d1\u00d2\7")
        buf.write("\5\2\2\u00d2\'\3\2\2\2\u00d3\u00d7\5*\26\2\u00d4\u00d6")
        buf.write("\5,\27\2\u00d5\u00d4\3\2\2\2\u00d6\u00d9\3\2\2\2\u00d7")
        buf.write("\u00d5\3\2\2\2\u00d7\u00d8\3\2\2\2\u00d8)\3\2\2\2\u00d9")
        buf.write("\u00d7\3\2\2\2\u00da\u00db\t\4\2\2\u00db+\3\2\2\2\u00dc")
        buf.write("\u00dd\7\6\2\2\u00dd\u00e2\5*\26\2\u00de\u00df\7\7\2\2")
        buf.write("\u00df\u00e0\7\33\2\2\u00e0\u00e2\7\b\2\2\u00e1\u00dc")
        buf.write("\3\2\2\2\u00e1\u00de\3\2\2\2\u00e2-\3\2\2\2\u00e3\u00e4")
        buf.write("\7\36\2\2\u00e4/\3\2\2\2\u00e5\u00e6\7\35\2\2\u00e6\u00e7")
        buf.write("\7\2\2\3\u00e7\61\3\2\2\2\u00e8\u00e9\7\36\2\2\u00e9\u00ea")
        buf.write("\7\2\2\3\u00ea\63\3\2\2\2\u00eb\u00ed\7 \2\2\u00ec\u00eb")
        buf.write("\3\2\2\2\u00ed\u00ee\3\2\2\2\u00ee\u00ec\3\2\2\2\u00ee")
        buf.write("\u00ef\3\2\2\2\u00ef\65\3\2\2\2\24>Qdlnz|\u0084\u0091")
        buf.write("\u009d\u00a9\u00b0\u00bb\u00c5\u00ce\u00d7\u00e1\u00ee")
        return buf.getvalue()


class DynamoDbGrammarParser ( Parser ):

    grammarFileName = "DynamoDbGrammar.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "','", "'('", "')'", "'.'", "'['", "']'",
                     "<INVALID>", "'='", "'<>'", "'<'", "'<='", "'>'", "'>='",
                     "'+'", "'-'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
                      "<INVALID>", "<INVALID>", "<INVALID>", "WS", "EQ",
                      "NE", "LT", "LE", "GT", "GE", "PLUS", "MINUS", "IN",
                      "BETWEEN", "NOT", "AND", "OR", "SET", "ADD", "DELETE",
                      "REMOVE", "INDEX", "ID", "ATTRIBUTE_NAME_SUB", "LITERAL_SUB",
                      "STRING_LITERAL", "UNKNOWN" ]

    RULE_projection_ = 0
    RULE_projection = 1
    RULE_condition_ = 2
    RULE_condition = 3
    RULE_comparator_symbol = 4
    RULE_update_ = 5
    RULE_update = 6
    RULE_set_section = 7
    RULE_set_action = 8
    RULE_add_section = 9
    RULE_add_action = 10
    RULE_delete_section = 11
    RULE_delete_action = 12
    RULE_remove_section = 13
    RULE_remove_action = 14
    RULE_set_value = 15
    RULE_arithmetic = 16
    RULE_operand = 17
    RULE_func = 18
    RULE_path = 19
    RULE_id_ = 20
    RULE_dereference = 21
    RULE_literal = 22
    RULE_expression_attr_names_sub = 23
    RULE_expression_attr_values_sub = 24
    RULE_unknown = 25

    ruleNames =  [ "projection_", "projection", "condition_", "condition",
                   "comparator_symbol", "update_", "update", "set_section",
                   "set_action", "add_section", "add_action", "delete_section",
                   "delete_action", "remove_section", "remove_action", "set_value",
                   "arithmetic", "operand", "func", "path", "id_", "dereference",
                   "literal", "expression_attr_names_sub", "expression_attr_values_sub",
                   "unknown" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    WS=7
    EQ=8
    NE=9
    LT=10
    LE=11
    GT=12
    GE=13
    PLUS=14
    MINUS=15
    IN=16
    BETWEEN=17
    NOT=18
    AND=19
    OR=20
    SET=21
    ADD=22
    DELETE=23
    REMOVE=24
    INDEX=25
    ID=26
    ATTRIBUTE_NAME_SUB=27
    LITERAL_SUB=28
    STRING_LITERAL=29
    UNKNOWN=30

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



    def validateRedundantParentheses(self, redundantParens):
        if redundantParens:
            raise Exception('RedundantParenthesesException')



    class Projection_Context(ParserRuleContext):

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

        def projection(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.ProjectionContext,0)


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

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_projection_

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

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




    def projection_(self):

        localctx = DynamoDbGrammarParser.Projection_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_projection_)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 52
            self.projection()
            self.state = 53
            self.match(DynamoDbGrammarParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ProjectionContext(ParserRuleContext):

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

        def path(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.PathContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.PathContext,i)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_projection

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

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




    def projection(self):

        localctx = DynamoDbGrammarParser.ProjectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_projection)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 55
            self.path()
            self.state = 60
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==DynamoDbGrammarParser.T__0:
                self.state = 56
                self.match(DynamoDbGrammarParser.T__0)
                self.state = 57
                self.path()
                self.state = 62
                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 Condition_Context(ParserRuleContext):

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

        def condition(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.ConditionContext,0)


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

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_condition_

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

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




    def condition_(self):

        localctx = DynamoDbGrammarParser.Condition_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_condition_)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 63
            self.condition(0)
            self.state = 64
            self.match(DynamoDbGrammarParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ConditionContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_condition


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


    class OrContext(ConditionContext):

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

        def condition(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.ConditionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.ConditionContext,i)

        def OR(self):
            return self.getToken(DynamoDbGrammarParser.OR, 0)

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

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


    class NegationContext(ConditionContext):

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

        def NOT(self):
            return self.getToken(DynamoDbGrammarParser.NOT, 0)
        def condition(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.ConditionContext,0)


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

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


    class InContext(ConditionContext):

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

        def operand(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.OperandContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.OperandContext,i)

        def IN(self):
            return self.getToken(DynamoDbGrammarParser.IN, 0)

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

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


    class AndContext(ConditionContext):

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

        def condition(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.ConditionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.ConditionContext,i)

        def AND(self):
            return self.getToken(DynamoDbGrammarParser.AND, 0)

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

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


    class BetweenContext(ConditionContext):

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

        def operand(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.OperandContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.OperandContext,i)

        def BETWEEN(self):
            return self.getToken(DynamoDbGrammarParser.BETWEEN, 0)
        def AND(self):
            return self.getToken(DynamoDbGrammarParser.AND, 0)

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

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


    class FunctionConditionContext(ConditionContext):

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

        def func(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.FuncContext,0)


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

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


    class ComparatorContext(ConditionContext):

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

        def operand(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.OperandContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.OperandContext,i)

        def comparator_symbol(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.Comparator_symbolContext,0)


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

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


    class ConditionGroupingContext(ConditionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a DynamoDbGrammarParser.ConditionContext
            super().__init__(parser)
            self.c = None # ConditionContext
            self.copyFrom(ctx)

        def condition(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.ConditionContext,0)


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

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



    def condition(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = DynamoDbGrammarParser.ConditionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 6
        self.enterRecursionRule(localctx, 6, self.RULE_condition, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 98
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,2,self._ctx)
            if la_ == 1:
                localctx = DynamoDbGrammarParser.ComparatorContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 67
                self.operand()
                self.state = 68
                self.comparator_symbol()
                self.state = 69
                self.operand()
                pass

            elif la_ == 2:
                localctx = DynamoDbGrammarParser.InContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 71
                self.operand()
                self.state = 72
                self.match(DynamoDbGrammarParser.IN)
                self.state = 73
                self.match(DynamoDbGrammarParser.T__1)
                self.state = 74
                self.operand()
                self.state = 79
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==DynamoDbGrammarParser.T__0:
                    self.state = 75
                    self.match(DynamoDbGrammarParser.T__0)
                    self.state = 76
                    self.operand()
                    self.state = 81
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 82
                self.match(DynamoDbGrammarParser.T__2)
                pass

            elif la_ == 3:
                localctx = DynamoDbGrammarParser.BetweenContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 84
                self.operand()
                self.state = 85
                self.match(DynamoDbGrammarParser.BETWEEN)
                self.state = 86
                self.operand()
                self.state = 87
                self.match(DynamoDbGrammarParser.AND)
                self.state = 88
                self.operand()
                pass

            elif la_ == 4:
                localctx = DynamoDbGrammarParser.FunctionConditionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 90
                self.func()
                pass

            elif la_ == 5:
                localctx = DynamoDbGrammarParser.ConditionGroupingContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 91
                self.match(DynamoDbGrammarParser.T__1)
                self.state = 92
                localctx.c = self.condition(0)
                self.state = 93
                self.match(DynamoDbGrammarParser.T__2)

                self.validateRedundantParentheses(localctx.c.hasOuterParens)
                localctx.hasOuterParens=True

                pass

            elif la_ == 6:
                localctx = DynamoDbGrammarParser.NegationContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 96
                self.match(DynamoDbGrammarParser.NOT)
                self.state = 97
                self.condition(3)
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 108
            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:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 106
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
                    if la_ == 1:
                        localctx = DynamoDbGrammarParser.AndContext(self, DynamoDbGrammarParser.ConditionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_condition)
                        self.state = 100
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 101
                        self.match(DynamoDbGrammarParser.AND)
                        self.state = 102
                        self.condition(3)
                        pass

                    elif la_ == 2:
                        localctx = DynamoDbGrammarParser.OrContext(self, DynamoDbGrammarParser.ConditionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_condition)
                        self.state = 103
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 104
                        self.match(DynamoDbGrammarParser.OR)
                        self.state = 105
                        self.condition(2)
                        pass


                self.state = 110
                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.unrollRecursionContexts(_parentctx)
        return localctx


    class Comparator_symbolContext(ParserRuleContext):

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

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

        def NE(self):
            return self.getToken(DynamoDbGrammarParser.NE, 0)

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

        def LE(self):
            return self.getToken(DynamoDbGrammarParser.LE, 0)

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

        def GE(self):
            return self.getToken(DynamoDbGrammarParser.GE, 0)

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_comparator_symbol

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

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




    def comparator_symbol(self):

        localctx = DynamoDbGrammarParser.Comparator_symbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_comparator_symbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 111
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << DynamoDbGrammarParser.EQ) | (1 << DynamoDbGrammarParser.NE) | (1 << DynamoDbGrammarParser.LT) | (1 << DynamoDbGrammarParser.LE) | (1 << DynamoDbGrammarParser.GT) | (1 << DynamoDbGrammarParser.GE))) != 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 Update_Context(ParserRuleContext):

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

        def update(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.UpdateContext,0)


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

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_update_

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

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




    def update_(self):

        localctx = DynamoDbGrammarParser.Update_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_update_)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 113
            self.update()
            self.state = 114
            self.match(DynamoDbGrammarParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class UpdateContext(ParserRuleContext):

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

        def set_section(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Set_sectionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Set_sectionContext,i)


        def add_section(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Add_sectionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Add_sectionContext,i)


        def delete_section(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Delete_sectionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Delete_sectionContext,i)


        def remove_section(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Remove_sectionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Remove_sectionContext,i)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_update

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

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




    def update(self):

        localctx = DynamoDbGrammarParser.UpdateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_update)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 120
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 120
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [DynamoDbGrammarParser.SET]:
                    self.state = 116
                    self.set_section()
                    pass
                elif token in [DynamoDbGrammarParser.ADD]:
                    self.state = 117
                    self.add_section()
                    pass
                elif token in [DynamoDbGrammarParser.DELETE]:
                    self.state = 118
                    self.delete_section()
                    pass
                elif token in [DynamoDbGrammarParser.REMOVE]:
                    self.state = 119
                    self.remove_section()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 122
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << DynamoDbGrammarParser.SET) | (1 << DynamoDbGrammarParser.ADD) | (1 << DynamoDbGrammarParser.DELETE) | (1 << DynamoDbGrammarParser.REMOVE))) != 0)):
                    break

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


    class Set_sectionContext(ParserRuleContext):

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

        def SET(self):
            return self.getToken(DynamoDbGrammarParser.SET, 0)

        def set_action(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Set_actionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Set_actionContext,i)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_set_section

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

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




    def set_section(self):

        localctx = DynamoDbGrammarParser.Set_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_set_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 124
            self.match(DynamoDbGrammarParser.SET)
            self.state = 125
            self.set_action()
            self.state = 130
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==DynamoDbGrammarParser.T__0:
                self.state = 126
                self.match(DynamoDbGrammarParser.T__0)
                self.state = 127
                self.set_action()
                self.state = 132
                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 Set_actionContext(ParserRuleContext):

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

        def path(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.PathContext,0)


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

        def set_value(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.Set_valueContext,0)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_set_action

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

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




    def set_action(self):

        localctx = DynamoDbGrammarParser.Set_actionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_set_action)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 133
            self.path()
            self.state = 134
            self.match(DynamoDbGrammarParser.EQ)
            self.state = 135
            self.set_value()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Add_sectionContext(ParserRuleContext):

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

        def ADD(self):
            return self.getToken(DynamoDbGrammarParser.ADD, 0)

        def add_action(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Add_actionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Add_actionContext,i)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_add_section

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

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




    def add_section(self):

        localctx = DynamoDbGrammarParser.Add_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_add_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 137
            self.match(DynamoDbGrammarParser.ADD)
            self.state = 138
            self.add_action()
            self.state = 143
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==DynamoDbGrammarParser.T__0:
                self.state = 139
                self.match(DynamoDbGrammarParser.T__0)
                self.state = 140
                self.add_action()
                self.state = 145
                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 Add_actionContext(ParserRuleContext):

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

        def path(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.PathContext,0)


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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_add_action

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

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




    def add_action(self):

        localctx = DynamoDbGrammarParser.Add_actionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_add_action)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 146
            self.path()
            self.state = 147
            self.literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Delete_sectionContext(ParserRuleContext):

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

        def DELETE(self):
            return self.getToken(DynamoDbGrammarParser.DELETE, 0)

        def delete_action(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Delete_actionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Delete_actionContext,i)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_delete_section

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

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




    def delete_section(self):

        localctx = DynamoDbGrammarParser.Delete_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_delete_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 149
            self.match(DynamoDbGrammarParser.DELETE)
            self.state = 150
            self.delete_action()
            self.state = 155
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==DynamoDbGrammarParser.T__0:
                self.state = 151
                self.match(DynamoDbGrammarParser.T__0)
                self.state = 152
                self.delete_action()
                self.state = 157
                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 Delete_actionContext(ParserRuleContext):

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

        def path(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.PathContext,0)


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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_delete_action

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

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




    def delete_action(self):

        localctx = DynamoDbGrammarParser.Delete_actionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_delete_action)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 158
            self.path()
            self.state = 159
            self.literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Remove_sectionContext(ParserRuleContext):

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

        def REMOVE(self):
            return self.getToken(DynamoDbGrammarParser.REMOVE, 0)

        def remove_action(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.Remove_actionContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.Remove_actionContext,i)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_remove_section

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

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




    def remove_section(self):

        localctx = DynamoDbGrammarParser.Remove_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_remove_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 161
            self.match(DynamoDbGrammarParser.REMOVE)
            self.state = 162
            self.remove_action()
            self.state = 167
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==DynamoDbGrammarParser.T__0:
                self.state = 163
                self.match(DynamoDbGrammarParser.T__0)
                self.state = 164
                self.remove_action()
                self.state = 169
                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 Remove_actionContext(ParserRuleContext):

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

        def path(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.PathContext,0)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_remove_action

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

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




    def remove_action(self):

        localctx = DynamoDbGrammarParser.Remove_actionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_remove_action)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 170
            self.path()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Set_valueContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_set_value


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



    class ArithmeticValueContext(Set_valueContext):

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

        def arithmetic(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.ArithmeticContext,0)


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

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


    class OperandValueContext(Set_valueContext):

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

        def operand(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.OperandContext,0)


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

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



    def set_value(self):

        localctx = DynamoDbGrammarParser.Set_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_set_value)
        try:
            self.state = 174
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,11,self._ctx)
            if la_ == 1:
                localctx = DynamoDbGrammarParser.OperandValueContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 172
                self.operand()
                pass

            elif la_ == 2:
                localctx = DynamoDbGrammarParser.ArithmeticValueContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 173
                self.arithmetic()
                pass


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


    class ArithmeticContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_arithmetic


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



    class PlusMinusContext(ArithmeticContext):

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

        def operand(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.OperandContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.OperandContext,i)

        def PLUS(self):
            return self.getToken(DynamoDbGrammarParser.PLUS, 0)
        def MINUS(self):
            return self.getToken(DynamoDbGrammarParser.MINUS, 0)

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

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


    class ArithmeticParensContext(ArithmeticContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a DynamoDbGrammarParser.ArithmeticContext
            super().__init__(parser)
            self.a = None # ArithmeticContext
            self.copyFrom(ctx)

        def arithmetic(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.ArithmeticContext,0)


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

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



    def arithmetic(self):

        localctx = DynamoDbGrammarParser.ArithmeticContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_arithmetic)
        self._la = 0 # Token type
        try:
            self.state = 185
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,12,self._ctx)
            if la_ == 1:
                localctx = DynamoDbGrammarParser.PlusMinusContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 176
                self.operand()
                self.state = 177
                _la = self._input.LA(1)
                if not(_la==DynamoDbGrammarParser.PLUS or _la==DynamoDbGrammarParser.MINUS):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 178
                self.operand()
                pass

            elif la_ == 2:
                localctx = DynamoDbGrammarParser.ArithmeticParensContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 180
                self.match(DynamoDbGrammarParser.T__1)
                self.state = 181
                localctx.a = self.arithmetic()
                self.state = 182
                self.match(DynamoDbGrammarParser.T__2)

                self.validateRedundantParentheses(localctx.a.hasOuterParens)
                localctx.hasOuterParens=True

                pass


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


    class OperandContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_operand


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



    class PathOperandContext(OperandContext):

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

        def path(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.PathContext,0)


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

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


    class LiteralOperandContext(OperandContext):

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

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


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

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


    class FunctionOperandContext(OperandContext):

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

        def func(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.FuncContext,0)


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

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


    class ParenOperandContext(OperandContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a DynamoDbGrammarParser.OperandContext
            super().__init__(parser)
            self.o = None # OperandContext
            self.copyFrom(ctx)

        def operand(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.OperandContext,0)


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

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



    def operand(self):

        localctx = DynamoDbGrammarParser.OperandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_operand)
        try:
            self.state = 195
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,13,self._ctx)
            if la_ == 1:
                localctx = DynamoDbGrammarParser.PathOperandContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 187
                self.path()
                pass

            elif la_ == 2:
                localctx = DynamoDbGrammarParser.LiteralOperandContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 188
                self.literal()
                pass

            elif la_ == 3:
                localctx = DynamoDbGrammarParser.FunctionOperandContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 189
                self.func()
                pass

            elif la_ == 4:
                localctx = DynamoDbGrammarParser.ParenOperandContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 190
                self.match(DynamoDbGrammarParser.T__1)
                self.state = 191
                localctx.o = self.operand()
                self.state = 192
                self.match(DynamoDbGrammarParser.T__2)

                self.validateRedundantParentheses(localctx.o.hasOuterParens)
                localctx.hasOuterParens=True

                pass


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


    class FuncContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_func


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



    class FunctionCallContext(FuncContext):

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

        def ID(self):
            return self.getToken(DynamoDbGrammarParser.ID, 0)
        def operand(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.OperandContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.OperandContext,i)


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

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



    def func(self):

        localctx = DynamoDbGrammarParser.FuncContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_func)
        self._la = 0 # Token type
        try:
            localctx = DynamoDbGrammarParser.FunctionCallContext(self, localctx)
            self.enterOuterAlt(localctx, 1)
            self.state = 197
            self.match(DynamoDbGrammarParser.ID)
            self.state = 198
            self.match(DynamoDbGrammarParser.T__1)
            self.state = 199
            self.operand()
            self.state = 204
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==DynamoDbGrammarParser.T__0:
                self.state = 200
                self.match(DynamoDbGrammarParser.T__0)
                self.state = 201
                self.operand()
                self.state = 206
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 207
            self.match(DynamoDbGrammarParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PathContext(ParserRuleContext):

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

        def id_(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.Id_Context,0)


        def dereference(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(DynamoDbGrammarParser.DereferenceContext)
            else:
                return self.getTypedRuleContext(DynamoDbGrammarParser.DereferenceContext,i)


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_path

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

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




    def path(self):

        localctx = DynamoDbGrammarParser.PathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_path)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 209
            self.id_()
            self.state = 213
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,15,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 210
                    self.dereference()
                self.state = 215
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,15,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 Id_Context(ParserRuleContext):

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

        def ID(self):
            return self.getToken(DynamoDbGrammarParser.ID, 0)

        def ATTRIBUTE_NAME_SUB(self):
            return self.getToken(DynamoDbGrammarParser.ATTRIBUTE_NAME_SUB, 0)

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_id_

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

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




    def id_(self):

        localctx = DynamoDbGrammarParser.Id_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_id_)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 216
            _la = self._input.LA(1)
            if not(_la==DynamoDbGrammarParser.ID or _la==DynamoDbGrammarParser.ATTRIBUTE_NAME_SUB):
                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 DereferenceContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_dereference


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



    class ListAccessContext(DereferenceContext):

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

        def INDEX(self):
            return self.getToken(DynamoDbGrammarParser.INDEX, 0)

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

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


    class MapAccessContext(DereferenceContext):

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

        def id_(self):
            return self.getTypedRuleContext(DynamoDbGrammarParser.Id_Context,0)


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

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



    def dereference(self):

        localctx = DynamoDbGrammarParser.DereferenceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_dereference)
        try:
            self.state = 223
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [DynamoDbGrammarParser.T__3]:
                localctx = DynamoDbGrammarParser.MapAccessContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 218
                self.match(DynamoDbGrammarParser.T__3)
                self.state = 219
                self.id_()
                pass
            elif token in [DynamoDbGrammarParser.T__4]:
                localctx = DynamoDbGrammarParser.ListAccessContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 220
                self.match(DynamoDbGrammarParser.T__4)
                self.state = 221
                self.match(DynamoDbGrammarParser.INDEX)
                self.state = 222
                self.match(DynamoDbGrammarParser.T__5)
                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 LiteralContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_literal


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



    class LiteralSubContext(LiteralContext):

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

        def LITERAL_SUB(self):
            return self.getToken(DynamoDbGrammarParser.LITERAL_SUB, 0)

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

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



    def literal(self):

        localctx = DynamoDbGrammarParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_literal)
        try:
            localctx = DynamoDbGrammarParser.LiteralSubContext(self, localctx)
            self.enterOuterAlt(localctx, 1)
            self.state = 225
            self.match(DynamoDbGrammarParser.LITERAL_SUB)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Expression_attr_names_subContext(ParserRuleContext):

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

        def ATTRIBUTE_NAME_SUB(self):
            return self.getToken(DynamoDbGrammarParser.ATTRIBUTE_NAME_SUB, 0)

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

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_expression_attr_names_sub

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

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




    def expression_attr_names_sub(self):

        localctx = DynamoDbGrammarParser.Expression_attr_names_subContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_expression_attr_names_sub)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 227
            self.match(DynamoDbGrammarParser.ATTRIBUTE_NAME_SUB)
            self.state = 228
            self.match(DynamoDbGrammarParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Expression_attr_values_subContext(ParserRuleContext):

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

        def LITERAL_SUB(self):
            return self.getToken(DynamoDbGrammarParser.LITERAL_SUB, 0)

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

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_expression_attr_values_sub

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

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




    def expression_attr_values_sub(self):

        localctx = DynamoDbGrammarParser.Expression_attr_values_subContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_expression_attr_values_sub)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 230
            self.match(DynamoDbGrammarParser.LITERAL_SUB)
            self.state = 231
            self.match(DynamoDbGrammarParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class UnknownContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return DynamoDbGrammarParser.RULE_unknown

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

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




    def unknown(self):

        localctx = DynamoDbGrammarParser.UnknownContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_unknown)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 234
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 233
                self.match(DynamoDbGrammarParser.UNKNOWN)
                self.state = 236
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==DynamoDbGrammarParser.UNKNOWN):
                    break

        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[3] = self.condition_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 condition_sempred(self, localctx:ConditionContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 2)


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