# Generated from /home/omry/dev/hydra/hydra/grammar/Override.g4 by ANTLR 4.8
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\36")
        buf.write("\u009a\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\3\2")
        buf.write("\3\2\3\2\5\2\36\n\2\3\2\3\2\3\2\3\2\5\2$\n\2\5\2&\n\2")
        buf.write("\3\2\3\2\3\2\3\2\5\2,\n\2\5\2.\n\2\3\2\3\2\3\3\3\3\3\3")
        buf.write("\3\3\3\3\3\3\5\38\n\3\3\3\3\3\3\3\3\3\5\3>\n\3\3\4\3\4")
        buf.write("\3\4\3\4\6\4D\n\4\r\4\16\4E\5\4H\n\4\3\5\3\5\3\6\3\6\5")
        buf.write("\6N\n\6\3\7\3\7\3\7\3\7\5\7T\n\7\3\b\3\b\3\b\3\t\3\t\3")
        buf.write("\t\5\t\\\n\t\3\t\3\t\3\t\5\ta\n\t\3\t\7\td\n\t\f\t\16")
        buf.write("\tg\13\t\5\ti\n\t\3\t\3\t\3\n\3\n\3\n\6\np\n\n\r\n\16")
        buf.write("\nq\3\13\3\13\6\13v\n\13\r\13\16\13w\5\13z\n\13\3\f\3")
        buf.write("\f\3\f\3\f\7\f\u0080\n\f\f\f\16\f\u0083\13\f\5\f\u0085")
        buf.write("\n\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u0091")
        buf.write("\n\r\f\r\16\r\u0094\13\r\5\r\u0096\n\r\3\r\3\r\3\r\2\2")
        buf.write("\16\2\4\6\b\n\f\16\20\22\24\26\30\2\4\3\2\32\33\b\2\5")
        buf.write("\5\7\7\t\t\r\21\26\33\36\36\2\u00a7\2-\3\2\2\2\4=\3\2")
        buf.write("\2\2\6G\3\2\2\2\bI\3\2\2\2\nM\3\2\2\2\fS\3\2\2\2\16U\3")
        buf.write("\2\2\2\20X\3\2\2\2\22l\3\2\2\2\24y\3\2\2\2\26{\3\2\2\2")
        buf.write("\30\u0088\3\2\2\2\32\33\5\4\3\2\33\35\7\3\2\2\34\36\5")
        buf.write("\n\6\2\35\34\3\2\2\2\35\36\3\2\2\2\36.\3\2\2\2\37 \7\4")
        buf.write("\2\2 %\5\4\3\2!#\7\3\2\2\"$\5\n\6\2#\"\3\2\2\2#$\3\2\2")
        buf.write("\2$&\3\2\2\2%!\3\2\2\2%&\3\2\2\2&.\3\2\2\2\'(\7\5\2\2")
        buf.write("()\5\4\3\2)+\7\3\2\2*,\5\n\6\2+*\3\2\2\2+,\3\2\2\2,.\3")
        buf.write("\2\2\2-\32\3\2\2\2-\37\3\2\2\2-\'\3\2\2\2./\3\2\2\2/\60")
        buf.write("\7\2\2\3\60\3\3\2\2\2\61>\5\6\4\2\62\63\5\6\4\2\63\64")
        buf.write("\7\6\2\2\64\67\5\b\5\2\65\66\7\7\2\2\668\5\b\5\2\67\65")
        buf.write("\3\2\2\2\678\3\2\2\28>\3\2\2\29:\5\6\4\2:;\7\b\2\2;<\5")
        buf.write("\b\5\2<>\3\2\2\2=\61\3\2\2\2=\62\3\2\2\2=9\3\2\2\2>\5")
        buf.write("\3\2\2\2?H\5\b\5\2@C\7\32\2\2AB\7\t\2\2BD\7\32\2\2CA\3")
        buf.write("\2\2\2DE\3\2\2\2EC\3\2\2\2EF\3\2\2\2FH\3\2\2\2G?\3\2\2")
        buf.write("\2G@\3\2\2\2H\7\3\2\2\2IJ\t\2\2\2J\t\3\2\2\2KN\5\f\7\2")
        buf.write("LN\5\22\n\2MK\3\2\2\2ML\3\2\2\2N\13\3\2\2\2OT\5\24\13")
        buf.write("\2PT\5\26\f\2QT\5\30\r\2RT\5\20\t\2SO\3\2\2\2SP\3\2\2")
        buf.write("\2SQ\3\2\2\2SR\3\2\2\2T\r\3\2\2\2UV\7\32\2\2VW\7\3\2\2")
        buf.write("W\17\3\2\2\2XY\7\32\2\2Yh\7\n\2\2Z\\\5\16\b\2[Z\3\2\2")
        buf.write("\2[\\\3\2\2\2\\]\3\2\2\2]e\5\f\7\2^`\7\13\2\2_a\5\16\b")
        buf.write("\2`_\3\2\2\2`a\3\2\2\2ab\3\2\2\2bd\5\f\7\2c^\3\2\2\2d")
        buf.write("g\3\2\2\2ec\3\2\2\2ef\3\2\2\2fi\3\2\2\2ge\3\2\2\2h[\3")
        buf.write("\2\2\2hi\3\2\2\2ij\3\2\2\2jk\7\f\2\2k\21\3\2\2\2lo\5\f")
        buf.write("\7\2mn\7\13\2\2np\5\f\7\2om\3\2\2\2pq\3\2\2\2qo\3\2\2")
        buf.write("\2qr\3\2\2\2r\23\3\2\2\2sz\7\35\2\2tv\t\3\2\2ut\3\2\2")
        buf.write("\2vw\3\2\2\2wu\3\2\2\2wx\3\2\2\2xz\3\2\2\2ys\3\2\2\2y")
        buf.write("u\3\2\2\2z\25\3\2\2\2{\u0084\7\22\2\2|\u0081\5\f\7\2}")
        buf.write("~\7\13\2\2~\u0080\5\f\7\2\177}\3\2\2\2\u0080\u0083\3\2")
        buf.write("\2\2\u0081\177\3\2\2\2\u0081\u0082\3\2\2\2\u0082\u0085")
        buf.write("\3\2\2\2\u0083\u0081\3\2\2\2\u0084|\3\2\2\2\u0084\u0085")
        buf.write("\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u0087\7\23\2\2\u0087")
        buf.write("\27\3\2\2\2\u0088\u0095\7\24\2\2\u0089\u008a\7\32\2\2")
        buf.write("\u008a\u008b\7\7\2\2\u008b\u0092\5\f\7\2\u008c\u008d\7")
        buf.write("\13\2\2\u008d\u008e\7\32\2\2\u008e\u008f\7\7\2\2\u008f")
        buf.write("\u0091\5\f\7\2\u0090\u008c\3\2\2\2\u0091\u0094\3\2\2\2")
        buf.write("\u0092\u0090\3\2\2\2\u0092\u0093\3\2\2\2\u0093\u0096\3")
        buf.write("\2\2\2\u0094\u0092\3\2\2\2\u0095\u0089\3\2\2\2\u0095\u0096")
        buf.write("\3\2\2\2\u0096\u0097\3\2\2\2\u0097\u0098\7\25\2\2\u0098")
        buf.write("\31\3\2\2\2\30\35#%+-\67=EGMS[`ehqwy\u0081\u0084\u0092")
        buf.write("\u0095")
        return buf.getvalue()


class OverrideParser ( Parser ):

    grammarFileName = "Override.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>", 
                      "FLOAT", "INT", "BOOL", "NULL", "ID", "DOT_PATH", 
                      "WS", "QUOTED_VALUE", "INTERPOLATION" ]

    RULE_override = 0
    RULE_key = 1
    RULE_packageOrGroup = 2
    RULE_package = 3
    RULE_value = 4
    RULE_element = 5
    RULE_argName = 6
    RULE_function = 7
    RULE_simpleChoiceSweep = 8
    RULE_primitive = 9
    RULE_listValue = 10
    RULE_dictValue = 11

    ruleNames =  [ "override", "key", "packageOrGroup", "package", "value", 
                   "element", "argName", "function", "simpleChoiceSweep", 
                   "primitive", "listValue", "dictValue" ]

    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
    FLOAT=20
    INT=21
    BOOL=22
    NULL=23
    ID=24
    DOT_PATH=25
    WS=26
    QUOTED_VALUE=27
    INTERPOLATION=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 OverrideContext(ParserRuleContext):

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

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

        def key(self):
            return self.getTypedRuleContext(OverrideParser.KeyContext,0)


        def value(self):
            return self.getTypedRuleContext(OverrideParser.ValueContext,0)


        def getRuleIndex(self):
            return OverrideParser.RULE_override

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

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

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




    def override(self):

        localctx = OverrideParser.OverrideContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_override)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 43
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OverrideParser.ID, OverrideParser.DOT_PATH]:
                self.state = 24
                self.key()
                self.state = 25
                self.match(OverrideParser.T__0)
                self.state = 27
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OverrideParser.T__2) | (1 << OverrideParser.T__4) | (1 << OverrideParser.T__6) | (1 << OverrideParser.T__10) | (1 << OverrideParser.T__11) | (1 << OverrideParser.T__12) | (1 << OverrideParser.T__13) | (1 << OverrideParser.T__14) | (1 << OverrideParser.T__15) | (1 << OverrideParser.T__17) | (1 << OverrideParser.FLOAT) | (1 << OverrideParser.INT) | (1 << OverrideParser.BOOL) | (1 << OverrideParser.NULL) | (1 << OverrideParser.ID) | (1 << OverrideParser.DOT_PATH) | (1 << OverrideParser.QUOTED_VALUE) | (1 << OverrideParser.INTERPOLATION))) != 0):
                    self.state = 26
                    self.value()


                pass
            elif token in [OverrideParser.T__1]:
                self.state = 29
                self.match(OverrideParser.T__1)
                self.state = 30
                self.key()
                self.state = 35
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==OverrideParser.T__0:
                    self.state = 31
                    self.match(OverrideParser.T__0)
                    self.state = 33
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OverrideParser.T__2) | (1 << OverrideParser.T__4) | (1 << OverrideParser.T__6) | (1 << OverrideParser.T__10) | (1 << OverrideParser.T__11) | (1 << OverrideParser.T__12) | (1 << OverrideParser.T__13) | (1 << OverrideParser.T__14) | (1 << OverrideParser.T__15) | (1 << OverrideParser.T__17) | (1 << OverrideParser.FLOAT) | (1 << OverrideParser.INT) | (1 << OverrideParser.BOOL) | (1 << OverrideParser.NULL) | (1 << OverrideParser.ID) | (1 << OverrideParser.DOT_PATH) | (1 << OverrideParser.QUOTED_VALUE) | (1 << OverrideParser.INTERPOLATION))) != 0):
                        self.state = 32
                        self.value()




                pass
            elif token in [OverrideParser.T__2]:
                self.state = 37
                self.match(OverrideParser.T__2)
                self.state = 38
                self.key()
                self.state = 39
                self.match(OverrideParser.T__0)
                self.state = 41
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OverrideParser.T__2) | (1 << OverrideParser.T__4) | (1 << OverrideParser.T__6) | (1 << OverrideParser.T__10) | (1 << OverrideParser.T__11) | (1 << OverrideParser.T__12) | (1 << OverrideParser.T__13) | (1 << OverrideParser.T__14) | (1 << OverrideParser.T__15) | (1 << OverrideParser.T__17) | (1 << OverrideParser.FLOAT) | (1 << OverrideParser.INT) | (1 << OverrideParser.BOOL) | (1 << OverrideParser.NULL) | (1 << OverrideParser.ID) | (1 << OverrideParser.DOT_PATH) | (1 << OverrideParser.QUOTED_VALUE) | (1 << OverrideParser.INTERPOLATION))) != 0):
                    self.state = 40
                    self.value()


                pass
            else:
                raise NoViableAltException(self)

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


    class KeyContext(ParserRuleContext):

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

        def packageOrGroup(self):
            return self.getTypedRuleContext(OverrideParser.PackageOrGroupContext,0)


        def package(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OverrideParser.PackageContext)
            else:
                return self.getTypedRuleContext(OverrideParser.PackageContext,i)


        def getRuleIndex(self):
            return OverrideParser.RULE_key

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

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

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




    def key(self):

        localctx = OverrideParser.KeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_key)
        self._la = 0 # Token type
        try:
            self.state = 59
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 47
                self.packageOrGroup()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 48
                self.packageOrGroup()
                self.state = 49
                self.match(OverrideParser.T__3)
                self.state = 50
                self.package()
                self.state = 53
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==OverrideParser.T__4:
                    self.state = 51
                    self.match(OverrideParser.T__4)
                    self.state = 52
                    self.package()


                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 55
                self.packageOrGroup()
                self.state = 56
                self.match(OverrideParser.T__5)
                self.state = 57
                self.package()
                pass


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


    class PackageOrGroupContext(ParserRuleContext):

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

        def package(self):
            return self.getTypedRuleContext(OverrideParser.PackageContext,0)


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

        def getRuleIndex(self):
            return OverrideParser.RULE_packageOrGroup

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

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

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




    def packageOrGroup(self):

        localctx = OverrideParser.PackageOrGroupContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_packageOrGroup)
        self._la = 0 # Token type
        try:
            self.state = 69
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 61
                self.package()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 62
                self.match(OverrideParser.ID)
                self.state = 65 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 63
                    self.match(OverrideParser.T__6)
                    self.state = 64
                    self.match(OverrideParser.ID)
                    self.state = 67 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==OverrideParser.T__6):
                        break

                pass


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


    class PackageContext(ParserRuleContext):

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

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

        def DOT_PATH(self):
            return self.getToken(OverrideParser.DOT_PATH, 0)

        def getRuleIndex(self):
            return OverrideParser.RULE_package

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

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

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




    def package(self):

        localctx = OverrideParser.PackageContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_package)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 71
            _la = self._input.LA(1)
            if not(_la==OverrideParser.ID or _la==OverrideParser.DOT_PATH):
                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 ValueContext(ParserRuleContext):

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

        def element(self):
            return self.getTypedRuleContext(OverrideParser.ElementContext,0)


        def simpleChoiceSweep(self):
            return self.getTypedRuleContext(OverrideParser.SimpleChoiceSweepContext,0)


        def getRuleIndex(self):
            return OverrideParser.RULE_value

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

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

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




    def value(self):

        localctx = OverrideParser.ValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_value)
        try:
            self.state = 75
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,9,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 73
                self.element()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 74
                self.simpleChoiceSweep()
                pass


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


    class ElementContext(ParserRuleContext):

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

        def primitive(self):
            return self.getTypedRuleContext(OverrideParser.PrimitiveContext,0)


        def listValue(self):
            return self.getTypedRuleContext(OverrideParser.ListValueContext,0)


        def dictValue(self):
            return self.getTypedRuleContext(OverrideParser.DictValueContext,0)


        def function(self):
            return self.getTypedRuleContext(OverrideParser.FunctionContext,0)


        def getRuleIndex(self):
            return OverrideParser.RULE_element

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

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

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




    def element(self):

        localctx = OverrideParser.ElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_element)
        try:
            self.state = 81
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 77
                self.primitive()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 78
                self.listValue()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 79
                self.dictValue()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 80
                self.function()
                pass


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


    class ArgNameContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return OverrideParser.RULE_argName

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

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

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




    def argName(self):

        localctx = OverrideParser.ArgNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_argName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 83
            self.match(OverrideParser.ID)
            self.state = 84
            self.match(OverrideParser.T__0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FunctionContext(ParserRuleContext):

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

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

        def element(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OverrideParser.ElementContext)
            else:
                return self.getTypedRuleContext(OverrideParser.ElementContext,i)


        def argName(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OverrideParser.ArgNameContext)
            else:
                return self.getTypedRuleContext(OverrideParser.ArgNameContext,i)


        def getRuleIndex(self):
            return OverrideParser.RULE_function

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

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

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




    def function(self):

        localctx = OverrideParser.FunctionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_function)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 86
            self.match(OverrideParser.ID)
            self.state = 87
            self.match(OverrideParser.T__7)
            self.state = 102
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OverrideParser.T__2) | (1 << OverrideParser.T__4) | (1 << OverrideParser.T__6) | (1 << OverrideParser.T__10) | (1 << OverrideParser.T__11) | (1 << OverrideParser.T__12) | (1 << OverrideParser.T__13) | (1 << OverrideParser.T__14) | (1 << OverrideParser.T__15) | (1 << OverrideParser.T__17) | (1 << OverrideParser.FLOAT) | (1 << OverrideParser.INT) | (1 << OverrideParser.BOOL) | (1 << OverrideParser.NULL) | (1 << OverrideParser.ID) | (1 << OverrideParser.DOT_PATH) | (1 << OverrideParser.QUOTED_VALUE) | (1 << OverrideParser.INTERPOLATION))) != 0):
                self.state = 89
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,11,self._ctx)
                if la_ == 1:
                    self.state = 88
                    self.argName()


                self.state = 91
                self.element()
                self.state = 99
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==OverrideParser.T__8:
                    self.state = 92
                    self.match(OverrideParser.T__8)
                    self.state = 94
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,12,self._ctx)
                    if la_ == 1:
                        self.state = 93
                        self.argName()


                    self.state = 96
                    self.element()
                    self.state = 101
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 104
            self.match(OverrideParser.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 SimpleChoiceSweepContext(ParserRuleContext):

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

        def element(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OverrideParser.ElementContext)
            else:
                return self.getTypedRuleContext(OverrideParser.ElementContext,i)


        def getRuleIndex(self):
            return OverrideParser.RULE_simpleChoiceSweep

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

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

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




    def simpleChoiceSweep(self):

        localctx = OverrideParser.SimpleChoiceSweepContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_simpleChoiceSweep)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 106
            self.element()
            self.state = 109 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 107
                self.match(OverrideParser.T__8)
                self.state = 108
                self.element()
                self.state = 111 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==OverrideParser.T__8):
                    break

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


    class PrimitiveContext(ParserRuleContext):

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

        def QUOTED_VALUE(self):
            return self.getToken(OverrideParser.QUOTED_VALUE, 0)

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return OverrideParser.RULE_primitive

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

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

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




    def primitive(self):

        localctx = OverrideParser.PrimitiveContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_primitive)
        self._la = 0 # Token type
        try:
            self.state = 119
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OverrideParser.QUOTED_VALUE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 113
                self.match(OverrideParser.QUOTED_VALUE)
                pass
            elif token in [OverrideParser.T__2, OverrideParser.T__4, OverrideParser.T__6, OverrideParser.T__10, OverrideParser.T__11, OverrideParser.T__12, OverrideParser.T__13, OverrideParser.T__14, OverrideParser.FLOAT, OverrideParser.INT, OverrideParser.BOOL, OverrideParser.NULL, OverrideParser.ID, OverrideParser.DOT_PATH, OverrideParser.INTERPOLATION]:
                self.enterOuterAlt(localctx, 2)
                self.state = 115 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 114
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OverrideParser.T__2) | (1 << OverrideParser.T__4) | (1 << OverrideParser.T__6) | (1 << OverrideParser.T__10) | (1 << OverrideParser.T__11) | (1 << OverrideParser.T__12) | (1 << OverrideParser.T__13) | (1 << OverrideParser.T__14) | (1 << OverrideParser.FLOAT) | (1 << OverrideParser.INT) | (1 << OverrideParser.BOOL) | (1 << OverrideParser.NULL) | (1 << OverrideParser.ID) | (1 << OverrideParser.DOT_PATH) | (1 << OverrideParser.INTERPOLATION))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 117 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OverrideParser.T__2) | (1 << OverrideParser.T__4) | (1 << OverrideParser.T__6) | (1 << OverrideParser.T__10) | (1 << OverrideParser.T__11) | (1 << OverrideParser.T__12) | (1 << OverrideParser.T__13) | (1 << OverrideParser.T__14) | (1 << OverrideParser.FLOAT) | (1 << OverrideParser.INT) | (1 << OverrideParser.BOOL) | (1 << OverrideParser.NULL) | (1 << OverrideParser.ID) | (1 << OverrideParser.DOT_PATH) | (1 << OverrideParser.INTERPOLATION))) != 0)):
                        break

                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 ListValueContext(ParserRuleContext):

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

        def element(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OverrideParser.ElementContext)
            else:
                return self.getTypedRuleContext(OverrideParser.ElementContext,i)


        def getRuleIndex(self):
            return OverrideParser.RULE_listValue

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

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

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




    def listValue(self):

        localctx = OverrideParser.ListValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_listValue)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 121
            self.match(OverrideParser.T__15)
            self.state = 130
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OverrideParser.T__2) | (1 << OverrideParser.T__4) | (1 << OverrideParser.T__6) | (1 << OverrideParser.T__10) | (1 << OverrideParser.T__11) | (1 << OverrideParser.T__12) | (1 << OverrideParser.T__13) | (1 << OverrideParser.T__14) | (1 << OverrideParser.T__15) | (1 << OverrideParser.T__17) | (1 << OverrideParser.FLOAT) | (1 << OverrideParser.INT) | (1 << OverrideParser.BOOL) | (1 << OverrideParser.NULL) | (1 << OverrideParser.ID) | (1 << OverrideParser.DOT_PATH) | (1 << OverrideParser.QUOTED_VALUE) | (1 << OverrideParser.INTERPOLATION))) != 0):
                self.state = 122
                self.element()
                self.state = 127
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==OverrideParser.T__8:
                    self.state = 123
                    self.match(OverrideParser.T__8)
                    self.state = 124
                    self.element()
                    self.state = 129
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 132
            self.match(OverrideParser.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 DictValueContext(ParserRuleContext):

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

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

        def element(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OverrideParser.ElementContext)
            else:
                return self.getTypedRuleContext(OverrideParser.ElementContext,i)


        def getRuleIndex(self):
            return OverrideParser.RULE_dictValue

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

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

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




    def dictValue(self):

        localctx = OverrideParser.DictValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_dictValue)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 134
            self.match(OverrideParser.T__17)
            self.state = 147
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==OverrideParser.ID:
                self.state = 135
                self.match(OverrideParser.ID)
                self.state = 136
                self.match(OverrideParser.T__4)
                self.state = 137
                self.element()
                self.state = 144
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==OverrideParser.T__8:
                    self.state = 138
                    self.match(OverrideParser.T__8)
                    self.state = 139
                    self.match(OverrideParser.ID)
                    self.state = 140
                    self.match(OverrideParser.T__4)
                    self.state = 141
                    self.element()
                    self.state = 146
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 149
            self.match(OverrideParser.T__18)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx





