# flake8: noqa
# type: ignore
# Generated from Toml.g4 by ANTLR 4.8
# encoding: utf-8
from ....._vendor.antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\37")
        buf.write("\u00a8\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\3\2\3\2\3\2\7\2\66\n\2\f\2\16\29\13\2\3\3\3\3\3")
        buf.write("\3\3\3\3\3\3\3\3\3\5\3B\n\3\3\4\5\4E\n\4\3\5\3\5\3\5\3")
        buf.write("\5\3\6\3\6\5\6M\n\6\3\7\3\7\5\7Q\n\7\3\b\3\b\3\t\3\t\3")
        buf.write("\n\3\n\3\n\6\nZ\n\n\r\n\16\n[\3\13\3\13\3\13\3\13\3\13")
        buf.write("\3\13\3\13\5\13e\n\13\3\f\3\f\3\r\3\r\3\16\3\16\3\17\3")
        buf.write("\17\3\20\3\20\3\21\3\21\5\21s\n\21\3\21\3\21\3\21\3\22")
        buf.write("\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u0081\n")
        buf.write("\22\5\22\u0083\n\22\3\23\5\23\u0086\n\23\3\23\7\23\u0089")
        buf.write("\n\23\f\23\16\23\u008c\13\23\3\24\3\24\5\24\u0090\n\24")
        buf.write("\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\27\5\27\u009b")
        buf.write("\n\27\3\30\3\30\3\30\3\30\3\30\5\30\u00a2\n\30\3\31\3")
        buf.write("\31\3\31\3\31\3\31\2\2\32\2\4\6\b\n\f\16\20\22\24\26\30")
        buf.write("\32\34\36 \"$&(*,.\60\2\7\4\2\20\20\22\22\3\2\20\23\3")
        buf.write("\2\27\32\3\2\24\26\3\2\33\36\2\u00a4\2\62\3\2\2\2\4A\3")
        buf.write("\2\2\2\6D\3\2\2\2\bF\3\2\2\2\nL\3\2\2\2\fP\3\2\2\2\16")
        buf.write("R\3\2\2\2\20T\3\2\2\2\22V\3\2\2\2\24d\3\2\2\2\26f\3\2")
        buf.write("\2\2\30h\3\2\2\2\32j\3\2\2\2\34l\3\2\2\2\36n\3\2\2\2 ")
        buf.write("p\3\2\2\2\"\u0082\3\2\2\2$\u008a\3\2\2\2&\u008f\3\2\2")
        buf.write("\2(\u0091\3\2\2\2*\u0095\3\2\2\2,\u009a\3\2\2\2.\u009c")
        buf.write("\3\2\2\2\60\u00a3\3\2\2\2\62\67\5\4\3\2\63\64\7\r\2\2")
        buf.write("\64\66\5\4\3\2\65\63\3\2\2\2\669\3\2\2\2\67\65\3\2\2\2")
        buf.write("\678\3\2\2\28\3\3\2\2\29\67\3\2\2\2:;\5\b\5\2;<\5\6\4")
        buf.write("\2<B\3\2\2\2=>\5&\24\2>?\5\6\4\2?B\3\2\2\2@B\5\6\4\2A")
        buf.write(":\3\2\2\2A=\3\2\2\2A@\3\2\2\2B\5\3\2\2\2CE\7\16\2\2DC")
        buf.write("\3\2\2\2DE\3\2\2\2E\7\3\2\2\2FG\5\n\6\2GH\7\3\2\2HI\5")
        buf.write("\24\13\2I\t\3\2\2\2JM\5\f\7\2KM\5\22\n\2LJ\3\2\2\2LK\3")
        buf.write("\2\2\2M\13\3\2\2\2NQ\5\20\t\2OQ\5\16\b\2PN\3\2\2\2PO\3")
        buf.write("\2\2\2Q\r\3\2\2\2RS\7\37\2\2S\17\3\2\2\2TU\t\2\2\2U\21")
        buf.write("\3\2\2\2VY\5\f\7\2WX\7\4\2\2XZ\5\f\7\2YW\3\2\2\2Z[\3\2")
        buf.write("\2\2[Y\3\2\2\2[\\\3\2\2\2\\\23\3\2\2\2]e\5\26\f\2^e\5")
        buf.write("\30\r\2_e\5\32\16\2`e\5\34\17\2ae\5\36\20\2be\5 \21\2")
        buf.write("ce\5*\26\2d]\3\2\2\2d^\3\2\2\2d_\3\2\2\2d`\3\2\2\2da\3")
        buf.write("\2\2\2db\3\2\2\2dc\3\2\2\2e\25\3\2\2\2fg\t\3\2\2g\27\3")
        buf.write("\2\2\2hi\t\4\2\2i\31\3\2\2\2jk\t\5\2\2k\33\3\2\2\2lm\7")
        buf.write("\17\2\2m\35\3\2\2\2no\t\6\2\2o\37\3\2\2\2pr\7\5\2\2qs")
        buf.write("\5\"\22\2rq\3\2\2\2rs\3\2\2\2st\3\2\2\2tu\5$\23\2uv\7")
        buf.write("\6\2\2v!\3\2\2\2wx\5$\23\2xy\5\24\13\2yz\7\7\2\2z{\5\"")
        buf.write("\22\2{|\5$\23\2|\u0083\3\2\2\2}~\5$\23\2~\u0080\5\24\13")
        buf.write("\2\177\u0081\7\7\2\2\u0080\177\3\2\2\2\u0080\u0081\3\2")
        buf.write("\2\2\u0081\u0083\3\2\2\2\u0082w\3\2\2\2\u0082}\3\2\2\2")
        buf.write("\u0083#\3\2\2\2\u0084\u0086\7\16\2\2\u0085\u0084\3\2\2")
        buf.write("\2\u0085\u0086\3\2\2\2\u0086\u0087\3\2\2\2\u0087\u0089")
        buf.write("\7\r\2\2\u0088\u0085\3\2\2\2\u0089\u008c\3\2\2\2\u008a")
        buf.write("\u0088\3\2\2\2\u008a\u008b\3\2\2\2\u008b%\3\2\2\2\u008c")
        buf.write("\u008a\3\2\2\2\u008d\u0090\5(\25\2\u008e\u0090\5\60\31")
        buf.write("\2\u008f\u008d\3\2\2\2\u008f\u008e\3\2\2\2\u0090\'\3\2")
        buf.write("\2\2\u0091\u0092\7\5\2\2\u0092\u0093\5\n\6\2\u0093\u0094")
        buf.write("\7\6\2\2\u0094)\3\2\2\2\u0095\u0096\7\b\2\2\u0096\u0097")
        buf.write("\5,\27\2\u0097\u0098\7\t\2\2\u0098+\3\2\2\2\u0099\u009b")
        buf.write("\5.\30\2\u009a\u0099\3\2\2\2\u009a\u009b\3\2\2\2\u009b")
        buf.write("-\3\2\2\2\u009c\u009d\5\n\6\2\u009d\u009e\7\3\2\2\u009e")
        buf.write("\u00a1\5\24\13\2\u009f\u00a0\7\7\2\2\u00a0\u00a2\5.\30")
        buf.write("\2\u00a1\u009f\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2/\3\2")
        buf.write("\2\2\u00a3\u00a4\7\n\2\2\u00a4\u00a5\5\n\6\2\u00a5\u00a6")
        buf.write("\7\13\2\2\u00a6\61\3\2\2\2\21\67ADLP[dr\u0080\u0082\u0085")
        buf.write("\u008a\u008f\u009a\u00a1")
        return buf.getvalue()


class TomlParser ( Parser ):

    grammarFileName = "Toml.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>", "WS", "NL", "COMMENT", "BOOLEAN", 
                      "BASIC_STRING", "ML_BASIC_STRING", "LITERAL_STRING", 
                      "ML_LITERAL_STRING", "FLOAT", "INF", "NAN", "DEC_INT", 
                      "HEX_INT", "OCT_INT", "BIN_INT", "OFFSET_DATE_TIME", 
                      "LOCAL_DATE_TIME", "LOCAL_DATE", "LOCAL_TIME", "UNQUOTED_KEY" ]

    RULE_document = 0
    RULE_expression = 1
    RULE_comment = 2
    RULE_keyValue = 3
    RULE_key = 4
    RULE_simpleKey = 5
    RULE_unquotedKey = 6
    RULE_quotedKey = 7
    RULE_dottedKey = 8
    RULE_value = 9
    RULE_string = 10
    RULE_integer = 11
    RULE_floatingPoint = 12
    RULE_boolean = 13
    RULE_dateTime = 14
    RULE_array = 15
    RULE_arrayValues = 16
    RULE_commentOrNl = 17
    RULE_table = 18
    RULE_standardTable = 19
    RULE_inlineTable = 20
    RULE_inlineTableKeyvals = 21
    RULE_inlineTableKeyvalsNonEmpty = 22
    RULE_arrayTable = 23

    ruleNames =  [ "document", "expression", "comment", "keyValue", "key", 
                   "simpleKey", "unquotedKey", "quotedKey", "dottedKey", 
                   "value", "string", "integer", "floatingPoint", "boolean", 
                   "dateTime", "array", "arrayValues", "commentOrNl", "table", 
                   "standardTable", "inlineTable", "inlineTableKeyvals", 
                   "inlineTableKeyvalsNonEmpty", "arrayTable" ]

    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
    WS=10
    NL=11
    COMMENT=12
    BOOLEAN=13
    BASIC_STRING=14
    ML_BASIC_STRING=15
    LITERAL_STRING=16
    ML_LITERAL_STRING=17
    FLOAT=18
    INF=19
    NAN=20
    DEC_INT=21
    HEX_INT=22
    OCT_INT=23
    BIN_INT=24
    OFFSET_DATE_TIME=25
    LOCAL_DATE_TIME=26
    LOCAL_DATE=27
    LOCAL_TIME=28
    UNQUOTED_KEY=29

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

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

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


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

        def getRuleIndex(self):
            return TomlParser.RULE_document

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

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

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




    def document(self):

        localctx = TomlParser.DocumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_document)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 48
            self.expression()
            self.state = 53
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TomlParser.NL:
                self.state = 49
                self.match(TomlParser.NL)
                self.state = 50
                self.expression()
                self.state = 55
                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 ExpressionContext(ParserRuleContext):

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

        def keyValue(self):
            return self.getTypedRuleContext(TomlParser.KeyValueContext,0)


        def comment(self):
            return self.getTypedRuleContext(TomlParser.CommentContext,0)


        def table(self):
            return self.getTypedRuleContext(TomlParser.TableContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_expression

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

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

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




    def expression(self):

        localctx = TomlParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_expression)
        try:
            self.state = 63
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TomlParser.BASIC_STRING, TomlParser.LITERAL_STRING, TomlParser.UNQUOTED_KEY]:
                self.enterOuterAlt(localctx, 1)
                self.state = 56
                self.keyValue()
                self.state = 57
                self.comment()
                pass
            elif token in [TomlParser.T__2, TomlParser.T__7]:
                self.enterOuterAlt(localctx, 2)
                self.state = 59
                self.table()
                self.state = 60
                self.comment()
                pass
            elif token in [TomlParser.EOF, TomlParser.NL, TomlParser.COMMENT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 62
                self.comment()
                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 CommentContext(ParserRuleContext):

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

        def COMMENT(self):
            return self.getToken(TomlParser.COMMENT, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_comment

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

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

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




    def comment(self):

        localctx = TomlParser.CommentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 66
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TomlParser.COMMENT:
                self.state = 65
                self.match(TomlParser.COMMENT)


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


    class KeyValueContext(ParserRuleContext):

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

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


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


        def getRuleIndex(self):
            return TomlParser.RULE_keyValue

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

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

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




    def keyValue(self):

        localctx = TomlParser.KeyValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_keyValue)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 68
            self.key()
            self.state = 69
            self.match(TomlParser.T__0)
            self.state = 70
            self.value()
        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 simpleKey(self):
            return self.getTypedRuleContext(TomlParser.SimpleKeyContext,0)


        def dottedKey(self):
            return self.getTypedRuleContext(TomlParser.DottedKeyContext,0)


        def getRuleIndex(self):
            return TomlParser.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 = TomlParser.KeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_key)
        try:
            self.state = 74
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 72
                self.simpleKey()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 73
                self.dottedKey()
                pass


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


    class SimpleKeyContext(ParserRuleContext):

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

        def quotedKey(self):
            return self.getTypedRuleContext(TomlParser.QuotedKeyContext,0)


        def unquotedKey(self):
            return self.getTypedRuleContext(TomlParser.UnquotedKeyContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_simpleKey

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

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

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




    def simpleKey(self):

        localctx = TomlParser.SimpleKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_simpleKey)
        try:
            self.state = 78
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TomlParser.BASIC_STRING, TomlParser.LITERAL_STRING]:
                self.enterOuterAlt(localctx, 1)
                self.state = 76
                self.quotedKey()
                pass
            elif token in [TomlParser.UNQUOTED_KEY]:
                self.enterOuterAlt(localctx, 2)
                self.state = 77
                self.unquotedKey()
                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 UnquotedKeyContext(ParserRuleContext):

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

        def UNQUOTED_KEY(self):
            return self.getToken(TomlParser.UNQUOTED_KEY, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_unquotedKey

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

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

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




    def unquotedKey(self):

        localctx = TomlParser.UnquotedKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_unquotedKey)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 80
            self.match(TomlParser.UNQUOTED_KEY)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class QuotedKeyContext(ParserRuleContext):

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

        def BASIC_STRING(self):
            return self.getToken(TomlParser.BASIC_STRING, 0)

        def LITERAL_STRING(self):
            return self.getToken(TomlParser.LITERAL_STRING, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_quotedKey

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

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

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




    def quotedKey(self):

        localctx = TomlParser.QuotedKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_quotedKey)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 82
            _la = self._input.LA(1)
            if not(_la==TomlParser.BASIC_STRING or _la==TomlParser.LITERAL_STRING):
                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 DottedKeyContext(ParserRuleContext):

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

        def simpleKey(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TomlParser.SimpleKeyContext)
            else:
                return self.getTypedRuleContext(TomlParser.SimpleKeyContext,i)


        def getRuleIndex(self):
            return TomlParser.RULE_dottedKey

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

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

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




    def dottedKey(self):

        localctx = TomlParser.DottedKeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_dottedKey)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 84
            self.simpleKey()
            self.state = 87 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 85
                self.match(TomlParser.T__1)
                self.state = 86
                self.simpleKey()
                self.state = 89 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==TomlParser.T__1):
                    break

        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 string(self):
            return self.getTypedRuleContext(TomlParser.StringContext,0)


        def integer(self):
            return self.getTypedRuleContext(TomlParser.IntegerContext,0)


        def floatingPoint(self):
            return self.getTypedRuleContext(TomlParser.FloatingPointContext,0)


        def boolean(self):
            return self.getTypedRuleContext(TomlParser.BooleanContext,0)


        def dateTime(self):
            return self.getTypedRuleContext(TomlParser.DateTimeContext,0)


        def array(self):
            return self.getTypedRuleContext(TomlParser.ArrayContext,0)


        def inlineTable(self):
            return self.getTypedRuleContext(TomlParser.InlineTableContext,0)


        def getRuleIndex(self):
            return TomlParser.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 = TomlParser.ValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_value)
        try:
            self.state = 98
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TomlParser.BASIC_STRING, TomlParser.ML_BASIC_STRING, TomlParser.LITERAL_STRING, TomlParser.ML_LITERAL_STRING]:
                self.enterOuterAlt(localctx, 1)
                self.state = 91
                self.string()
                pass
            elif token in [TomlParser.DEC_INT, TomlParser.HEX_INT, TomlParser.OCT_INT, TomlParser.BIN_INT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 92
                self.integer()
                pass
            elif token in [TomlParser.FLOAT, TomlParser.INF, TomlParser.NAN]:
                self.enterOuterAlt(localctx, 3)
                self.state = 93
                self.floatingPoint()
                pass
            elif token in [TomlParser.BOOLEAN]:
                self.enterOuterAlt(localctx, 4)
                self.state = 94
                self.boolean()
                pass
            elif token in [TomlParser.OFFSET_DATE_TIME, TomlParser.LOCAL_DATE_TIME, TomlParser.LOCAL_DATE, TomlParser.LOCAL_TIME]:
                self.enterOuterAlt(localctx, 5)
                self.state = 95
                self.dateTime()
                pass
            elif token in [TomlParser.T__2]:
                self.enterOuterAlt(localctx, 6)
                self.state = 96
                self.array()
                pass
            elif token in [TomlParser.T__5]:
                self.enterOuterAlt(localctx, 7)
                self.state = 97
                self.inlineTable()
                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 StringContext(ParserRuleContext):

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

        def BASIC_STRING(self):
            return self.getToken(TomlParser.BASIC_STRING, 0)

        def ML_BASIC_STRING(self):
            return self.getToken(TomlParser.ML_BASIC_STRING, 0)

        def LITERAL_STRING(self):
            return self.getToken(TomlParser.LITERAL_STRING, 0)

        def ML_LITERAL_STRING(self):
            return self.getToken(TomlParser.ML_LITERAL_STRING, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_string

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

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

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




    def string(self):

        localctx = TomlParser.StringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_string)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 100
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TomlParser.BASIC_STRING) | (1 << TomlParser.ML_BASIC_STRING) | (1 << TomlParser.LITERAL_STRING) | (1 << TomlParser.ML_LITERAL_STRING))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IntegerContext(ParserRuleContext):

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

        def DEC_INT(self):
            return self.getToken(TomlParser.DEC_INT, 0)

        def HEX_INT(self):
            return self.getToken(TomlParser.HEX_INT, 0)

        def OCT_INT(self):
            return self.getToken(TomlParser.OCT_INT, 0)

        def BIN_INT(self):
            return self.getToken(TomlParser.BIN_INT, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_integer

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

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

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




    def integer(self):

        localctx = TomlParser.IntegerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_integer)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 102
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TomlParser.DEC_INT) | (1 << TomlParser.HEX_INT) | (1 << TomlParser.OCT_INT) | (1 << TomlParser.BIN_INT))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FloatingPointContext(ParserRuleContext):

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

        def FLOAT(self):
            return self.getToken(TomlParser.FLOAT, 0)

        def INF(self):
            return self.getToken(TomlParser.INF, 0)

        def NAN(self):
            return self.getToken(TomlParser.NAN, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_floatingPoint

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

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

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




    def floatingPoint(self):

        localctx = TomlParser.FloatingPointContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_floatingPoint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 104
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TomlParser.FLOAT) | (1 << TomlParser.INF) | (1 << TomlParser.NAN))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BooleanContext(ParserRuleContext):

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

        def BOOLEAN(self):
            return self.getToken(TomlParser.BOOLEAN, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_boolean

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

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

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




    def boolean(self):

        localctx = TomlParser.BooleanContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_boolean)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 106
            self.match(TomlParser.BOOLEAN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DateTimeContext(ParserRuleContext):

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

        def OFFSET_DATE_TIME(self):
            return self.getToken(TomlParser.OFFSET_DATE_TIME, 0)

        def LOCAL_DATE_TIME(self):
            return self.getToken(TomlParser.LOCAL_DATE_TIME, 0)

        def LOCAL_DATE(self):
            return self.getToken(TomlParser.LOCAL_DATE, 0)

        def LOCAL_TIME(self):
            return self.getToken(TomlParser.LOCAL_TIME, 0)

        def getRuleIndex(self):
            return TomlParser.RULE_dateTime

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

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

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




    def dateTime(self):

        localctx = TomlParser.DateTimeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_dateTime)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 108
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TomlParser.OFFSET_DATE_TIME) | (1 << TomlParser.LOCAL_DATE_TIME) | (1 << TomlParser.LOCAL_DATE) | (1 << TomlParser.LOCAL_TIME))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ArrayContext(ParserRuleContext):

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

        def commentOrNl(self):
            return self.getTypedRuleContext(TomlParser.CommentOrNlContext,0)


        def arrayValues(self):
            return self.getTypedRuleContext(TomlParser.ArrayValuesContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_array

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

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

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




    def array(self):

        localctx = TomlParser.ArrayContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_array)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 110
            self.match(TomlParser.T__2)
            self.state = 112
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
            if la_ == 1:
                self.state = 111
                self.arrayValues()


            self.state = 114
            self.commentOrNl()
            self.state = 115
            self.match(TomlParser.T__3)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ArrayValuesContext(ParserRuleContext):

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

        def commentOrNl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(TomlParser.CommentOrNlContext)
            else:
                return self.getTypedRuleContext(TomlParser.CommentOrNlContext,i)


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


        def arrayValues(self):
            return self.getTypedRuleContext(TomlParser.ArrayValuesContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_arrayValues

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

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

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




    def arrayValues(self):

        localctx = TomlParser.ArrayValuesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_arrayValues)
        self._la = 0 # Token type
        try:
            self.state = 128
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,9,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 117
                self.commentOrNl()
                self.state = 118
                self.value()
                self.state = 119
                self.match(TomlParser.T__4)
                self.state = 120
                self.arrayValues()
                self.state = 121
                self.commentOrNl()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 123
                self.commentOrNl()
                self.state = 124
                self.value()
                self.state = 126
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==TomlParser.T__4:
                    self.state = 125
                    self.match(TomlParser.T__4)


                pass


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


    class CommentOrNlContext(ParserRuleContext):

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

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

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

        def getRuleIndex(self):
            return TomlParser.RULE_commentOrNl

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

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

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




    def commentOrNl(self):

        localctx = TomlParser.CommentOrNlContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_commentOrNl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 136
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,11,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 131
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==TomlParser.COMMENT:
                        self.state = 130
                        self.match(TomlParser.COMMENT)


                    self.state = 133
                    self.match(TomlParser.NL) 
                self.state = 138
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,11,self._ctx)

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


    class TableContext(ParserRuleContext):

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

        def standardTable(self):
            return self.getTypedRuleContext(TomlParser.StandardTableContext,0)


        def arrayTable(self):
            return self.getTypedRuleContext(TomlParser.ArrayTableContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_table

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

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

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




    def table(self):

        localctx = TomlParser.TableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_table)
        try:
            self.state = 141
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TomlParser.T__2]:
                self.enterOuterAlt(localctx, 1)
                self.state = 139
                self.standardTable()
                pass
            elif token in [TomlParser.T__7]:
                self.enterOuterAlt(localctx, 2)
                self.state = 140
                self.arrayTable()
                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 StandardTableContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return TomlParser.RULE_standardTable

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

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

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




    def standardTable(self):

        localctx = TomlParser.StandardTableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_standardTable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 143
            self.match(TomlParser.T__2)
            self.state = 144
            self.key()
            self.state = 145
            self.match(TomlParser.T__3)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InlineTableContext(ParserRuleContext):

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

        def inlineTableKeyvals(self):
            return self.getTypedRuleContext(TomlParser.InlineTableKeyvalsContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_inlineTable

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

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

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




    def inlineTable(self):

        localctx = TomlParser.InlineTableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_inlineTable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 147
            self.match(TomlParser.T__5)
            self.state = 148
            self.inlineTableKeyvals()
            self.state = 149
            self.match(TomlParser.T__6)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InlineTableKeyvalsContext(ParserRuleContext):

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

        def inlineTableKeyvalsNonEmpty(self):
            return self.getTypedRuleContext(TomlParser.InlineTableKeyvalsNonEmptyContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_inlineTableKeyvals

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

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

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




    def inlineTableKeyvals(self):

        localctx = TomlParser.InlineTableKeyvalsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_inlineTableKeyvals)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 152
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << TomlParser.BASIC_STRING) | (1 << TomlParser.LITERAL_STRING) | (1 << TomlParser.UNQUOTED_KEY))) != 0):
                self.state = 151
                self.inlineTableKeyvalsNonEmpty()


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


    class InlineTableKeyvalsNonEmptyContext(ParserRuleContext):

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

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


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


        def inlineTableKeyvalsNonEmpty(self):
            return self.getTypedRuleContext(TomlParser.InlineTableKeyvalsNonEmptyContext,0)


        def getRuleIndex(self):
            return TomlParser.RULE_inlineTableKeyvalsNonEmpty

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

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

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




    def inlineTableKeyvalsNonEmpty(self):

        localctx = TomlParser.InlineTableKeyvalsNonEmptyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_inlineTableKeyvalsNonEmpty)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 154
            self.key()
            self.state = 155
            self.match(TomlParser.T__0)
            self.state = 156
            self.value()
            self.state = 159
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TomlParser.T__4:
                self.state = 157
                self.match(TomlParser.T__4)
                self.state = 158
                self.inlineTableKeyvalsNonEmpty()


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


    class ArrayTableContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return TomlParser.RULE_arrayTable

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

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

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




    def arrayTable(self):

        localctx = TomlParser.ArrayTableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_arrayTable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 161
            self.match(TomlParser.T__7)
            self.state = 162
            self.key()
            self.state = 163
            self.match(TomlParser.T__8)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx
