# Generated from /home/omry/dev/omegaconf/omegaconf/grammar/OmegaConfGrammarParser.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\30")
        buf.write("\u00b4\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\3\2\3\2\5\2#\n\2\3\2\3\2\5\2")
        buf.write("\'\n\2\6\2)\n\2\r\2\16\2*\5\2-\n\2\3\2\3\2\3\3\3\3\3\3")
        buf.write("\3\4\6\4\65\n\4\r\4\16\4\66\3\5\3\5\3\5\5\5<\n\5\3\6\3")
        buf.write("\6\5\6@\n\6\3\6\3\6\3\7\3\7\3\7\3\7\7\7H\n\7\f\7\16\7")
        buf.write("K\13\7\5\7M\n\7\3\7\3\7\3\b\3\b\3\b\3\b\3\t\3\t\3\t\5")
        buf.write("\tX\n\t\7\tZ\n\t\f\t\16\t]\13\t\3\t\3\t\5\ta\n\t\6\tc")
        buf.write("\n\t\r\t\16\td\5\tg\n\t\3\n\3\n\5\nk\n\n\3\13\3\13\7\13")
        buf.write("o\n\13\f\13\16\13r\13\13\3\13\3\13\3\13\7\13w\n\13\f\13")
        buf.write("\16\13z\13\13\5\13|\n\13\3\13\3\13\3\f\3\f\3\f\3\f\5\f")
        buf.write("\u0084\n\f\3\f\3\f\3\r\3\r\3\r\5\r\u008b\n\r\3\16\3\16")
        buf.write("\5\16\u008f\n\16\3\16\3\16\3\16\5\16\u0094\n\16\7\16\u0096")
        buf.write("\n\16\f\16\16\16\u0099\13\16\3\17\3\17\3\17\3\17\3\17")
        buf.write("\3\17\3\17\3\17\3\17\3\17\3\17\6\17\u00a6\n\17\r\17\16")
        buf.write("\17\u00a7\5\17\u00aa\n\17\3\20\3\20\6\20\u00ae\n\20\r")
        buf.write("\20\16\20\u00af\5\20\u00b2\n\20\3\20\2\2\21\2\4\6\b\n")
        buf.write("\f\16\20\22\24\26\30\32\34\36\2\4\4\2\3\5\23\23\3\2\r")
        buf.write("\24\2\u00ca\2,\3\2\2\2\4\60\3\2\2\2\6\64\3\2\2\2\b;\3")
        buf.write("\2\2\2\n=\3\2\2\2\fC\3\2\2\2\16P\3\2\2\2\20f\3\2\2\2\22")
        buf.write("j\3\2\2\2\24l\3\2\2\2\26\177\3\2\2\2\30\u008a\3\2\2\2")
        buf.write("\32\u008e\3\2\2\2\34\u00a9\3\2\2\2\36\u00b1\3\2\2\2 -")
        buf.write("\5\6\4\2!#\5\6\4\2\"!\3\2\2\2\"#\3\2\2\2#(\3\2\2\2$&\5")
        buf.write("\22\n\2%\'\5\6\4\2&%\3\2\2\2&\'\3\2\2\2\')\3\2\2\2($\3")
        buf.write("\2\2\2)*\3\2\2\2*(\3\2\2\2*+\3\2\2\2+-\3\2\2\2, \3\2\2")
        buf.write("\2,\"\3\2\2\2-.\3\2\2\2./\7\2\2\3/\3\3\2\2\2\60\61\5\b")
        buf.write("\5\2\61\62\7\2\2\3\62\5\3\2\2\2\63\65\t\2\2\2\64\63\3")
        buf.write("\2\2\2\65\66\3\2\2\2\66\64\3\2\2\2\66\67\3\2\2\2\67\7")
        buf.write("\3\2\2\28<\5\34\17\29<\5\n\6\2:<\5\f\7\2;8\3\2\2\2;9\3")
        buf.write("\2\2\2;:\3\2\2\2<\t\3\2\2\2=?\7\n\2\2>@\5\20\t\2?>\3\2")
        buf.write("\2\2?@\3\2\2\2@A\3\2\2\2AB\7\13\2\2B\13\3\2\2\2CL\7\7")
        buf.write("\2\2DI\5\16\b\2EF\7\t\2\2FH\5\16\b\2GE\3\2\2\2HK\3\2\2")
        buf.write("\2IG\3\2\2\2IJ\3\2\2\2JM\3\2\2\2KI\3\2\2\2LD\3\2\2\2L")
        buf.write("M\3\2\2\2MN\3\2\2\2NO\7\b\2\2O\r\3\2\2\2PQ\5\36\20\2Q")
        buf.write("R\7\f\2\2RS\5\b\5\2S\17\3\2\2\2T[\5\b\5\2UW\7\t\2\2VX")
        buf.write("\5\b\5\2WV\3\2\2\2WX\3\2\2\2XZ\3\2\2\2YU\3\2\2\2Z]\3\2")
        buf.write("\2\2[Y\3\2\2\2[\\\3\2\2\2\\g\3\2\2\2][\3\2\2\2^`\7\t\2")
        buf.write("\2_a\5\b\5\2`_\3\2\2\2`a\3\2\2\2ac\3\2\2\2b^\3\2\2\2c")
        buf.write("d\3\2\2\2db\3\2\2\2de\3\2\2\2eg\3\2\2\2fT\3\2\2\2fb\3")
        buf.write("\2\2\2g\21\3\2\2\2hk\5\24\13\2ik\5\26\f\2jh\3\2\2\2ji")
        buf.write("\3\2\2\2k\23\3\2\2\2lp\7\6\2\2mo\7\27\2\2nm\3\2\2\2or")
        buf.write("\3\2\2\2pn\3\2\2\2pq\3\2\2\2q{\3\2\2\2rp\3\2\2\2sx\5\30")
        buf.write("\r\2tu\7\27\2\2uw\5\30\r\2vt\3\2\2\2wz\3\2\2\2xv\3\2\2")
        buf.write("\2xy\3\2\2\2y|\3\2\2\2zx\3\2\2\2{s\3\2\2\2{|\3\2\2\2|")
        buf.write("}\3\2\2\2}~\7\26\2\2~\25\3\2\2\2\177\u0080\7\6\2\2\u0080")
        buf.write("\u0081\5\32\16\2\u0081\u0083\7\f\2\2\u0082\u0084\5\20")
        buf.write("\t\2\u0083\u0082\3\2\2\2\u0083\u0084\3\2\2\2\u0084\u0085")
        buf.write("\3\2\2\2\u0085\u0086\7\b\2\2\u0086\27\3\2\2\2\u0087\u008b")
        buf.write("\5\22\n\2\u0088\u008b\7\22\2\2\u0089\u008b\7\30\2\2\u008a")
        buf.write("\u0087\3\2\2\2\u008a\u0088\3\2\2\2\u008a\u0089\3\2\2\2")
        buf.write("\u008b\31\3\2\2\2\u008c\u008f\5\22\n\2\u008d\u008f\7\22")
        buf.write("\2\2\u008e\u008c\3\2\2\2\u008e\u008d\3\2\2\2\u008f\u0097")
        buf.write("\3\2\2\2\u0090\u0093\7\27\2\2\u0091\u0094\5\22\n\2\u0092")
        buf.write("\u0094\7\22\2\2\u0093\u0091\3\2\2\2\u0093\u0092\3\2\2")
        buf.write("\2\u0094\u0096\3\2\2\2\u0095\u0090\3\2\2\2\u0096\u0099")
        buf.write("\3\2\2\2\u0097\u0095\3\2\2\2\u0097\u0098\3\2\2\2\u0098")
        buf.write("\33\3\2\2\2\u0099\u0097\3\2\2\2\u009a\u00aa\7\25\2\2\u009b")
        buf.write("\u00a6\7\22\2\2\u009c\u00a6\7\20\2\2\u009d\u00a6\7\16")
        buf.write("\2\2\u009e\u00a6\7\r\2\2\u009f\u00a6\7\17\2\2\u00a0\u00a6")
        buf.write("\7\21\2\2\u00a1\u00a6\7\f\2\2\u00a2\u00a6\7\23\2\2\u00a3")
        buf.write("\u00a6\7\24\2\2\u00a4\u00a6\5\22\n\2\u00a5\u009b\3\2\2")
        buf.write("\2\u00a5\u009c\3\2\2\2\u00a5\u009d\3\2\2\2\u00a5\u009e")
        buf.write("\3\2\2\2\u00a5\u009f\3\2\2\2\u00a5\u00a0\3\2\2\2\u00a5")
        buf.write("\u00a1\3\2\2\2\u00a5\u00a2\3\2\2\2\u00a5\u00a3\3\2\2\2")
        buf.write("\u00a5\u00a4\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a5\3")
        buf.write("\2\2\2\u00a7\u00a8\3\2\2\2\u00a8\u00aa\3\2\2\2\u00a9\u009a")
        buf.write("\3\2\2\2\u00a9\u00a5\3\2\2\2\u00aa\35\3\2\2\2\u00ab\u00b2")
        buf.write("\7\25\2\2\u00ac\u00ae\t\3\2\2\u00ad\u00ac\3\2\2\2\u00ae")
        buf.write("\u00af\3\2\2\2\u00af\u00ad\3\2\2\2\u00af\u00b0\3\2\2\2")
        buf.write("\u00b0\u00b2\3\2\2\2\u00b1\u00ab\3\2\2\2\u00b1\u00ad\3")
        buf.write("\2\2\2\u00b2\37\3\2\2\2\36\"&*,\66;?ILW[`dfjpx{\u0083")
        buf.write("\u008a\u008e\u0093\u0097\u00a5\u00a7\u00a9\u00af\u00b1")
        return buf.getvalue()


class OmegaConfGrammarParser ( Parser ):

    grammarFileName = "OmegaConfGrammarParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'\\${'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'.'" ]

    symbolicNames = [ "<INVALID>", "ESC_INTER", "TOP_CHAR", "TOP_STR", "INTER_OPEN", 
                      "BRACE_OPEN", "BRACE_CLOSE", "COMMA", "BRACKET_OPEN", 
                      "BRACKET_CLOSE", "COLON", "FLOAT", "INT", "BOOL", 
                      "NULL", "UNQUOTED_CHAR", "ID", "ESC", "WS", "QUOTED_VALUE", 
                      "INTER_CLOSE", "DOT", "INTER_KEY" ]

    RULE_configValue = 0
    RULE_singleElement = 1
    RULE_toplevelStr = 2
    RULE_element = 3
    RULE_listContainer = 4
    RULE_dictContainer = 5
    RULE_dictKeyValuePair = 6
    RULE_sequence = 7
    RULE_interpolation = 8
    RULE_interpolationNode = 9
    RULE_interpolationResolver = 10
    RULE_configKey = 11
    RULE_resolverName = 12
    RULE_primitive = 13
    RULE_dictKey = 14

    ruleNames =  [ "configValue", "singleElement", "toplevelStr", "element", 
                   "listContainer", "dictContainer", "dictKeyValuePair", 
                   "sequence", "interpolation", "interpolationNode", "interpolationResolver", 
                   "configKey", "resolverName", "primitive", "dictKey" ]

    EOF = Token.EOF
    ESC_INTER=1
    TOP_CHAR=2
    TOP_STR=3
    INTER_OPEN=4
    BRACE_OPEN=5
    BRACE_CLOSE=6
    COMMA=7
    BRACKET_OPEN=8
    BRACKET_CLOSE=9
    COLON=10
    FLOAT=11
    INT=12
    BOOL=13
    NULL=14
    UNQUOTED_CHAR=15
    ID=16
    ESC=17
    WS=18
    QUOTED_VALUE=19
    INTER_CLOSE=20
    DOT=21
    INTER_KEY=22

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

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

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

        def toplevelStr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OmegaConfGrammarParser.ToplevelStrContext)
            else:
                return self.getTypedRuleContext(OmegaConfGrammarParser.ToplevelStrContext,i)


        def interpolation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OmegaConfGrammarParser.InterpolationContext)
            else:
                return self.getTypedRuleContext(OmegaConfGrammarParser.InterpolationContext,i)


        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_configValue

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

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

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




    def configValue(self):

        localctx = OmegaConfGrammarParser.ConfigValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_configValue)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 42
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.state = 30
                self.toplevelStr()
                pass

            elif la_ == 2:
                self.state = 32
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.ESC_INTER) | (1 << OmegaConfGrammarParser.TOP_CHAR) | (1 << OmegaConfGrammarParser.TOP_STR) | (1 << OmegaConfGrammarParser.ESC))) != 0):
                    self.state = 31
                    self.toplevelStr()


                self.state = 38 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 34
                    self.interpolation()
                    self.state = 36
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.ESC_INTER) | (1 << OmegaConfGrammarParser.TOP_CHAR) | (1 << OmegaConfGrammarParser.TOP_STR) | (1 << OmegaConfGrammarParser.ESC))) != 0):
                        self.state = 35
                        self.toplevelStr()


                    self.state = 40 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==OmegaConfGrammarParser.INTER_OPEN):
                        break

                pass


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


    class SingleElementContext(ParserRuleContext):

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

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


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

        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_singleElement

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

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

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




    def singleElement(self):

        localctx = OmegaConfGrammarParser.SingleElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_singleElement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 46
            self.element()
            self.state = 47
            self.match(OmegaConfGrammarParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ToplevelStrContext(ParserRuleContext):

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

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

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

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

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

        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_toplevelStr

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

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

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




    def toplevelStr(self):

        localctx = OmegaConfGrammarParser.ToplevelStrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_toplevelStr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 50 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 49
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.ESC_INTER) | (1 << OmegaConfGrammarParser.TOP_CHAR) | (1 << OmegaConfGrammarParser.TOP_STR) | (1 << OmegaConfGrammarParser.ESC))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 52 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.ESC_INTER) | (1 << OmegaConfGrammarParser.TOP_CHAR) | (1 << OmegaConfGrammarParser.TOP_STR) | (1 << OmegaConfGrammarParser.ESC))) != 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 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(OmegaConfGrammarParser.PrimitiveContext,0)


        def listContainer(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.ListContainerContext,0)


        def dictContainer(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.DictContainerContext,0)


        def getRuleIndex(self):
            return OmegaConfGrammarParser.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 = OmegaConfGrammarParser.ElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_element)
        try:
            self.state = 57
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OmegaConfGrammarParser.INTER_OPEN, OmegaConfGrammarParser.COLON, OmegaConfGrammarParser.FLOAT, OmegaConfGrammarParser.INT, OmegaConfGrammarParser.BOOL, OmegaConfGrammarParser.NULL, OmegaConfGrammarParser.UNQUOTED_CHAR, OmegaConfGrammarParser.ID, OmegaConfGrammarParser.ESC, OmegaConfGrammarParser.WS, OmegaConfGrammarParser.QUOTED_VALUE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 54
                self.primitive()
                pass
            elif token in [OmegaConfGrammarParser.BRACKET_OPEN]:
                self.enterOuterAlt(localctx, 2)
                self.state = 55
                self.listContainer()
                pass
            elif token in [OmegaConfGrammarParser.BRACE_OPEN]:
                self.enterOuterAlt(localctx, 3)
                self.state = 56
                self.dictContainer()
                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 ListContainerContext(ParserRuleContext):

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

        def BRACKET_OPEN(self):
            return self.getToken(OmegaConfGrammarParser.BRACKET_OPEN, 0)

        def BRACKET_CLOSE(self):
            return self.getToken(OmegaConfGrammarParser.BRACKET_CLOSE, 0)

        def sequence(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.SequenceContext,0)


        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_listContainer

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

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

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




    def listContainer(self):

        localctx = OmegaConfGrammarParser.ListContainerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_listContainer)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 59
            self.match(OmegaConfGrammarParser.BRACKET_OPEN)
            self.state = 61
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.INTER_OPEN) | (1 << OmegaConfGrammarParser.BRACE_OPEN) | (1 << OmegaConfGrammarParser.COMMA) | (1 << OmegaConfGrammarParser.BRACKET_OPEN) | (1 << OmegaConfGrammarParser.COLON) | (1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS) | (1 << OmegaConfGrammarParser.QUOTED_VALUE))) != 0):
                self.state = 60
                self.sequence()


            self.state = 63
            self.match(OmegaConfGrammarParser.BRACKET_CLOSE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DictContainerContext(ParserRuleContext):

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

        def BRACE_OPEN(self):
            return self.getToken(OmegaConfGrammarParser.BRACE_OPEN, 0)

        def BRACE_CLOSE(self):
            return self.getToken(OmegaConfGrammarParser.BRACE_CLOSE, 0)

        def dictKeyValuePair(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OmegaConfGrammarParser.DictKeyValuePairContext)
            else:
                return self.getTypedRuleContext(OmegaConfGrammarParser.DictKeyValuePairContext,i)


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

        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_dictContainer

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

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

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




    def dictContainer(self):

        localctx = OmegaConfGrammarParser.DictContainerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_dictContainer)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 65
            self.match(OmegaConfGrammarParser.BRACE_OPEN)
            self.state = 74
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS) | (1 << OmegaConfGrammarParser.QUOTED_VALUE))) != 0):
                self.state = 66
                self.dictKeyValuePair()
                self.state = 71
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==OmegaConfGrammarParser.COMMA:
                    self.state = 67
                    self.match(OmegaConfGrammarParser.COMMA)
                    self.state = 68
                    self.dictKeyValuePair()
                    self.state = 73
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 76
            self.match(OmegaConfGrammarParser.BRACE_CLOSE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DictKeyValuePairContext(ParserRuleContext):

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

        def dictKey(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.DictKeyContext,0)


        def COLON(self):
            return self.getToken(OmegaConfGrammarParser.COLON, 0)

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


        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_dictKeyValuePair

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

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

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




    def dictKeyValuePair(self):

        localctx = OmegaConfGrammarParser.DictKeyValuePairContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_dictKeyValuePair)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 78
            self.dictKey()
            self.state = 79
            self.match(OmegaConfGrammarParser.COLON)
            self.state = 80
            self.element()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SequenceContext(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(OmegaConfGrammarParser.ElementContext)
            else:
                return self.getTypedRuleContext(OmegaConfGrammarParser.ElementContext,i)


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

        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_sequence

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

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

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




    def sequence(self):

        localctx = OmegaConfGrammarParser.SequenceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_sequence)
        self._la = 0 # Token type
        try:
            self.state = 100
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OmegaConfGrammarParser.INTER_OPEN, OmegaConfGrammarParser.BRACE_OPEN, OmegaConfGrammarParser.BRACKET_OPEN, OmegaConfGrammarParser.COLON, OmegaConfGrammarParser.FLOAT, OmegaConfGrammarParser.INT, OmegaConfGrammarParser.BOOL, OmegaConfGrammarParser.NULL, OmegaConfGrammarParser.UNQUOTED_CHAR, OmegaConfGrammarParser.ID, OmegaConfGrammarParser.ESC, OmegaConfGrammarParser.WS, OmegaConfGrammarParser.QUOTED_VALUE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 82
                self.element()
                self.state = 89
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==OmegaConfGrammarParser.COMMA:
                    self.state = 83
                    self.match(OmegaConfGrammarParser.COMMA)
                    self.state = 85
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.INTER_OPEN) | (1 << OmegaConfGrammarParser.BRACE_OPEN) | (1 << OmegaConfGrammarParser.BRACKET_OPEN) | (1 << OmegaConfGrammarParser.COLON) | (1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS) | (1 << OmegaConfGrammarParser.QUOTED_VALUE))) != 0):
                        self.state = 84
                        self.element()


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

                pass
            elif token in [OmegaConfGrammarParser.COMMA]:
                self.enterOuterAlt(localctx, 2)
                self.state = 96 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 92
                    self.match(OmegaConfGrammarParser.COMMA)
                    self.state = 94
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.INTER_OPEN) | (1 << OmegaConfGrammarParser.BRACE_OPEN) | (1 << OmegaConfGrammarParser.BRACKET_OPEN) | (1 << OmegaConfGrammarParser.COLON) | (1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS) | (1 << OmegaConfGrammarParser.QUOTED_VALUE))) != 0):
                        self.state = 93
                        self.element()


                    self.state = 98 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==OmegaConfGrammarParser.COMMA):
                        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 InterpolationContext(ParserRuleContext):

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

        def interpolationNode(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.InterpolationNodeContext,0)


        def interpolationResolver(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.InterpolationResolverContext,0)


        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_interpolation

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

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

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




    def interpolation(self):

        localctx = OmegaConfGrammarParser.InterpolationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_interpolation)
        try:
            self.state = 104
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 102
                self.interpolationNode()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 103
                self.interpolationResolver()
                pass


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


    class InterpolationNodeContext(ParserRuleContext):

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

        def INTER_OPEN(self):
            return self.getToken(OmegaConfGrammarParser.INTER_OPEN, 0)

        def INTER_CLOSE(self):
            return self.getToken(OmegaConfGrammarParser.INTER_CLOSE, 0)

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

        def configKey(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OmegaConfGrammarParser.ConfigKeyContext)
            else:
                return self.getTypedRuleContext(OmegaConfGrammarParser.ConfigKeyContext,i)


        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_interpolationNode

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

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

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




    def interpolationNode(self):

        localctx = OmegaConfGrammarParser.InterpolationNodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_interpolationNode)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 106
            self.match(OmegaConfGrammarParser.INTER_OPEN)
            self.state = 110
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==OmegaConfGrammarParser.DOT:
                self.state = 107
                self.match(OmegaConfGrammarParser.DOT)
                self.state = 112
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 121
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.INTER_OPEN) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.INTER_KEY))) != 0):
                self.state = 113
                self.configKey()
                self.state = 118
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==OmegaConfGrammarParser.DOT:
                    self.state = 114
                    self.match(OmegaConfGrammarParser.DOT)
                    self.state = 115
                    self.configKey()
                    self.state = 120
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 123
            self.match(OmegaConfGrammarParser.INTER_CLOSE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InterpolationResolverContext(ParserRuleContext):

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

        def INTER_OPEN(self):
            return self.getToken(OmegaConfGrammarParser.INTER_OPEN, 0)

        def resolverName(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.ResolverNameContext,0)


        def COLON(self):
            return self.getToken(OmegaConfGrammarParser.COLON, 0)

        def BRACE_CLOSE(self):
            return self.getToken(OmegaConfGrammarParser.BRACE_CLOSE, 0)

        def sequence(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.SequenceContext,0)


        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_interpolationResolver

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

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

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




    def interpolationResolver(self):

        localctx = OmegaConfGrammarParser.InterpolationResolverContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_interpolationResolver)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 125
            self.match(OmegaConfGrammarParser.INTER_OPEN)
            self.state = 126
            self.resolverName()
            self.state = 127
            self.match(OmegaConfGrammarParser.COLON)
            self.state = 129
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.INTER_OPEN) | (1 << OmegaConfGrammarParser.BRACE_OPEN) | (1 << OmegaConfGrammarParser.COMMA) | (1 << OmegaConfGrammarParser.BRACKET_OPEN) | (1 << OmegaConfGrammarParser.COLON) | (1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS) | (1 << OmegaConfGrammarParser.QUOTED_VALUE))) != 0):
                self.state = 128
                self.sequence()


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


    class ConfigKeyContext(ParserRuleContext):

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

        def interpolation(self):
            return self.getTypedRuleContext(OmegaConfGrammarParser.InterpolationContext,0)


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

        def INTER_KEY(self):
            return self.getToken(OmegaConfGrammarParser.INTER_KEY, 0)

        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_configKey

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

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

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




    def configKey(self):

        localctx = OmegaConfGrammarParser.ConfigKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_configKey)
        try:
            self.state = 136
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OmegaConfGrammarParser.INTER_OPEN]:
                self.enterOuterAlt(localctx, 1)
                self.state = 133
                self.interpolation()
                pass
            elif token in [OmegaConfGrammarParser.ID]:
                self.enterOuterAlt(localctx, 2)
                self.state = 134
                self.match(OmegaConfGrammarParser.ID)
                pass
            elif token in [OmegaConfGrammarParser.INTER_KEY]:
                self.enterOuterAlt(localctx, 3)
                self.state = 135
                self.match(OmegaConfGrammarParser.INTER_KEY)
                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 ResolverNameContext(ParserRuleContext):

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

        def interpolation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OmegaConfGrammarParser.InterpolationContext)
            else:
                return self.getTypedRuleContext(OmegaConfGrammarParser.InterpolationContext,i)


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

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

        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_resolverName

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

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

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




    def resolverName(self):

        localctx = OmegaConfGrammarParser.ResolverNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_resolverName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 140
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OmegaConfGrammarParser.INTER_OPEN]:
                self.state = 138
                self.interpolation()
                pass
            elif token in [OmegaConfGrammarParser.ID]:
                self.state = 139
                self.match(OmegaConfGrammarParser.ID)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 149
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==OmegaConfGrammarParser.DOT:
                self.state = 142
                self.match(OmegaConfGrammarParser.DOT)
                self.state = 145
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [OmegaConfGrammarParser.INTER_OPEN]:
                    self.state = 143
                    self.interpolation()
                    pass
                elif token in [OmegaConfGrammarParser.ID]:
                    self.state = 144
                    self.match(OmegaConfGrammarParser.ID)
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 151
                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 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(OmegaConfGrammarParser.QUOTED_VALUE, 0)

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

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

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

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

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

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

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

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

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

        def interpolation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(OmegaConfGrammarParser.InterpolationContext)
            else:
                return self.getTypedRuleContext(OmegaConfGrammarParser.InterpolationContext,i)


        def getRuleIndex(self):
            return OmegaConfGrammarParser.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 = OmegaConfGrammarParser.PrimitiveContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_primitive)
        self._la = 0 # Token type
        try:
            self.state = 167
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OmegaConfGrammarParser.QUOTED_VALUE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 152
                self.match(OmegaConfGrammarParser.QUOTED_VALUE)
                pass
            elif token in [OmegaConfGrammarParser.INTER_OPEN, OmegaConfGrammarParser.COLON, OmegaConfGrammarParser.FLOAT, OmegaConfGrammarParser.INT, OmegaConfGrammarParser.BOOL, OmegaConfGrammarParser.NULL, OmegaConfGrammarParser.UNQUOTED_CHAR, OmegaConfGrammarParser.ID, OmegaConfGrammarParser.ESC, OmegaConfGrammarParser.WS]:
                self.enterOuterAlt(localctx, 2)
                self.state = 163 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 163
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [OmegaConfGrammarParser.ID]:
                        self.state = 153
                        self.match(OmegaConfGrammarParser.ID)
                        pass
                    elif token in [OmegaConfGrammarParser.NULL]:
                        self.state = 154
                        self.match(OmegaConfGrammarParser.NULL)
                        pass
                    elif token in [OmegaConfGrammarParser.INT]:
                        self.state = 155
                        self.match(OmegaConfGrammarParser.INT)
                        pass
                    elif token in [OmegaConfGrammarParser.FLOAT]:
                        self.state = 156
                        self.match(OmegaConfGrammarParser.FLOAT)
                        pass
                    elif token in [OmegaConfGrammarParser.BOOL]:
                        self.state = 157
                        self.match(OmegaConfGrammarParser.BOOL)
                        pass
                    elif token in [OmegaConfGrammarParser.UNQUOTED_CHAR]:
                        self.state = 158
                        self.match(OmegaConfGrammarParser.UNQUOTED_CHAR)
                        pass
                    elif token in [OmegaConfGrammarParser.COLON]:
                        self.state = 159
                        self.match(OmegaConfGrammarParser.COLON)
                        pass
                    elif token in [OmegaConfGrammarParser.ESC]:
                        self.state = 160
                        self.match(OmegaConfGrammarParser.ESC)
                        pass
                    elif token in [OmegaConfGrammarParser.WS]:
                        self.state = 161
                        self.match(OmegaConfGrammarParser.WS)
                        pass
                    elif token in [OmegaConfGrammarParser.INTER_OPEN]:
                        self.state = 162
                        self.interpolation()
                        pass
                    else:
                        raise NoViableAltException(self)

                    self.state = 165 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.INTER_OPEN) | (1 << OmegaConfGrammarParser.COLON) | (1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS))) != 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 DictKeyContext(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(OmegaConfGrammarParser.QUOTED_VALUE, 0)

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

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return OmegaConfGrammarParser.RULE_dictKey

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

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

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




    def dictKey(self):

        localctx = OmegaConfGrammarParser.DictKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_dictKey)
        self._la = 0 # Token type
        try:
            self.state = 175
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [OmegaConfGrammarParser.QUOTED_VALUE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 169
                self.match(OmegaConfGrammarParser.QUOTED_VALUE)
                pass
            elif token in [OmegaConfGrammarParser.FLOAT, OmegaConfGrammarParser.INT, OmegaConfGrammarParser.BOOL, OmegaConfGrammarParser.NULL, OmegaConfGrammarParser.UNQUOTED_CHAR, OmegaConfGrammarParser.ID, OmegaConfGrammarParser.ESC, OmegaConfGrammarParser.WS]:
                self.enterOuterAlt(localctx, 2)
                self.state = 171 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 170
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 173 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << OmegaConfGrammarParser.FLOAT) | (1 << OmegaConfGrammarParser.INT) | (1 << OmegaConfGrammarParser.BOOL) | (1 << OmegaConfGrammarParser.NULL) | (1 << OmegaConfGrammarParser.UNQUOTED_CHAR) | (1 << OmegaConfGrammarParser.ID) | (1 << OmegaConfGrammarParser.ESC) | (1 << OmegaConfGrammarParser.WS))) != 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





