# Generated from XeasyPKParser.g4 by ANTLR 4.13.0
# 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():
    return [
        4,1,40,223,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
        6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,
        2,14,7,14,2,15,7,15,1,0,3,0,34,8,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
        0,1,0,5,0,45,8,0,10,0,12,0,48,9,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,
        2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,4,5,71,8,5,
        11,5,12,5,72,1,5,1,5,1,6,1,6,4,6,79,8,6,11,6,12,6,80,1,6,1,6,1,7,
        4,7,86,8,7,11,7,12,7,87,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,
        1,8,1,8,3,8,102,8,8,1,8,1,8,3,8,106,8,8,1,8,1,8,1,8,3,8,111,8,8,
        1,8,1,8,3,8,115,8,8,5,8,117,8,8,10,8,12,8,120,9,8,1,9,4,9,123,8,
        9,11,9,12,9,124,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,
        1,10,1,10,1,10,1,10,3,10,141,8,10,1,10,1,10,3,10,145,8,10,1,10,1,
        10,1,10,1,10,3,10,151,8,10,1,10,1,10,3,10,155,8,10,5,10,157,8,10,
        10,10,12,10,160,9,10,1,11,4,11,163,8,11,11,11,12,11,164,1,12,1,12,
        1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,
        1,12,3,12,183,8,12,1,12,1,12,3,12,187,8,12,1,12,1,12,1,12,1,12,1,
        12,3,12,194,8,12,1,12,1,12,3,12,198,8,12,5,12,200,8,12,10,12,12,
        12,203,9,12,1,13,1,13,1,14,1,14,1,14,3,14,210,8,14,3,14,212,8,14,
        1,15,1,15,5,15,216,8,15,10,15,12,15,219,9,15,1,15,1,15,1,15,0,0,
        16,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,0,2,2,0,7,9,13,13,
        1,1,40,40,239,0,33,1,0,0,0,2,51,1,0,0,0,4,55,1,0,0,0,6,59,1,0,0,
        0,8,64,1,0,0,0,10,68,1,0,0,0,12,76,1,0,0,0,14,85,1,0,0,0,16,89,1,
        0,0,0,18,122,1,0,0,0,20,126,1,0,0,0,22,162,1,0,0,0,24,166,1,0,0,
        0,26,204,1,0,0,0,28,211,1,0,0,0,30,213,1,0,0,0,32,34,5,15,0,0,33,
        32,1,0,0,0,33,34,1,0,0,0,34,46,1,0,0,0,35,45,3,2,1,0,36,45,3,4,2,
        0,37,45,3,6,3,0,38,45,3,8,4,0,39,45,3,10,5,0,40,45,3,12,6,0,41,45,
        3,14,7,0,42,45,3,18,9,0,43,45,3,22,11,0,44,35,1,0,0,0,44,36,1,0,
        0,0,44,37,1,0,0,0,44,38,1,0,0,0,44,39,1,0,0,0,44,40,1,0,0,0,44,41,
        1,0,0,0,44,42,1,0,0,0,44,43,1,0,0,0,45,48,1,0,0,0,46,44,1,0,0,0,
        46,47,1,0,0,0,47,49,1,0,0,0,48,46,1,0,0,0,49,50,5,0,0,1,50,1,1,0,
        0,0,51,52,5,1,0,0,52,53,5,19,0,0,53,54,5,21,0,0,54,3,1,0,0,0,55,
        56,5,2,0,0,56,57,5,22,0,0,57,58,5,24,0,0,58,5,1,0,0,0,59,60,5,3,
        0,0,60,61,5,25,0,0,61,62,5,26,0,0,62,63,5,28,0,0,63,7,1,0,0,0,64,
        65,5,4,0,0,65,66,5,29,0,0,66,67,5,31,0,0,67,9,1,0,0,0,68,70,5,5,
        0,0,69,71,5,32,0,0,70,69,1,0,0,0,71,72,1,0,0,0,72,70,1,0,0,0,72,
        73,1,0,0,0,73,74,1,0,0,0,74,75,5,34,0,0,75,11,1,0,0,0,76,78,5,6,
        0,0,77,79,5,35,0,0,78,77,1,0,0,0,79,80,1,0,0,0,80,78,1,0,0,0,80,
        81,1,0,0,0,81,82,1,0,0,0,82,83,5,37,0,0,83,13,1,0,0,0,84,86,3,16,
        8,0,85,84,1,0,0,0,86,87,1,0,0,0,87,85,1,0,0,0,87,88,1,0,0,0,88,15,
        1,0,0,0,89,90,5,7,0,0,90,91,5,8,0,0,91,92,5,8,0,0,92,93,5,7,0,0,
        93,94,5,13,0,0,94,95,3,26,13,0,95,96,3,26,13,0,96,97,5,13,0,0,97,
        98,5,7,0,0,98,99,3,28,14,0,99,101,3,28,14,0,100,102,5,7,0,0,101,
        100,1,0,0,0,101,102,1,0,0,0,102,105,1,0,0,0,103,106,5,15,0,0,104,
        106,3,30,15,0,105,103,1,0,0,0,105,104,1,0,0,0,106,118,1,0,0,0,107,
        108,3,28,14,0,108,110,3,28,14,0,109,111,5,7,0,0,110,109,1,0,0,0,
        110,111,1,0,0,0,111,114,1,0,0,0,112,115,5,15,0,0,113,115,3,30,15,
        0,114,112,1,0,0,0,114,113,1,0,0,0,115,117,1,0,0,0,116,107,1,0,0,
        0,117,120,1,0,0,0,118,116,1,0,0,0,118,119,1,0,0,0,119,17,1,0,0,0,
        120,118,1,0,0,0,121,123,3,20,10,0,122,121,1,0,0,0,123,124,1,0,0,
        0,124,122,1,0,0,0,124,125,1,0,0,0,125,19,1,0,0,0,126,127,5,7,0,0,
        127,128,5,8,0,0,128,129,5,8,0,0,129,130,5,8,0,0,130,131,5,7,0,0,
        131,132,5,13,0,0,132,133,3,26,13,0,133,134,3,26,13,0,134,135,5,13,
        0,0,135,136,5,7,0,0,136,137,3,28,14,0,137,138,3,28,14,0,138,140,
        3,28,14,0,139,141,5,7,0,0,140,139,1,0,0,0,140,141,1,0,0,0,141,144,
        1,0,0,0,142,145,5,15,0,0,143,145,3,30,15,0,144,142,1,0,0,0,144,143,
        1,0,0,0,145,158,1,0,0,0,146,147,3,28,14,0,147,148,3,28,14,0,148,
        150,3,28,14,0,149,151,5,7,0,0,150,149,1,0,0,0,150,151,1,0,0,0,151,
        154,1,0,0,0,152,155,5,15,0,0,153,155,3,30,15,0,154,152,1,0,0,0,154,
        153,1,0,0,0,155,157,1,0,0,0,156,146,1,0,0,0,157,160,1,0,0,0,158,
        156,1,0,0,0,158,159,1,0,0,0,159,21,1,0,0,0,160,158,1,0,0,0,161,163,
        3,24,12,0,162,161,1,0,0,0,163,164,1,0,0,0,164,162,1,0,0,0,164,165,
        1,0,0,0,165,23,1,0,0,0,166,167,5,7,0,0,167,168,5,8,0,0,168,169,5,
        8,0,0,169,170,5,8,0,0,170,171,5,8,0,0,171,172,5,7,0,0,172,173,5,
        13,0,0,173,174,3,26,13,0,174,175,3,26,13,0,175,176,5,13,0,0,176,
        177,5,7,0,0,177,178,3,28,14,0,178,179,3,28,14,0,179,180,3,28,14,
        0,180,182,3,28,14,0,181,183,5,7,0,0,182,181,1,0,0,0,182,183,1,0,
        0,0,183,186,1,0,0,0,184,187,5,15,0,0,185,187,3,30,15,0,186,184,1,
        0,0,0,186,185,1,0,0,0,187,201,1,0,0,0,188,189,3,28,14,0,189,190,
        3,28,14,0,190,191,3,28,14,0,191,193,3,28,14,0,192,194,5,7,0,0,193,
        192,1,0,0,0,193,194,1,0,0,0,194,197,1,0,0,0,195,198,5,15,0,0,196,
        198,3,30,15,0,197,195,1,0,0,0,197,196,1,0,0,0,198,200,1,0,0,0,199,
        188,1,0,0,0,200,203,1,0,0,0,201,199,1,0,0,0,201,202,1,0,0,0,202,
        25,1,0,0,0,203,201,1,0,0,0,204,205,7,0,0,0,205,27,1,0,0,0,206,212,
        5,7,0,0,207,209,5,13,0,0,208,210,5,7,0,0,209,208,1,0,0,0,209,210,
        1,0,0,0,210,212,1,0,0,0,211,206,1,0,0,0,211,207,1,0,0,0,212,29,1,
        0,0,0,213,217,5,10,0,0,214,216,5,38,0,0,215,214,1,0,0,0,216,219,
        1,0,0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,220,1,0,0,0,219,217,
        1,0,0,0,220,221,7,1,0,0,221,31,1,0,0,0,26,33,44,46,72,80,87,101,
        105,110,114,118,124,140,144,150,154,158,164,182,186,193,197,201,
        209,211,217
    ]

class XeasyPKParser ( Parser ):

    grammarFileName = "XeasyPKParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "'#FORMAT'", "'#INAME'", 
                     "'#CYANAFORMAT'", "'#SPECTRUM'", "'#TOLERANCE'" ]

    symbolicNames = [ "<INVALID>", "Num_of_dim", "Format", "Iname", "Cyana_format", 
                      "Spectrum", "Tolerance", "Integer", "Float", "Real", 
                      "COMMENT", "EXCLM_COMMENT", "SMCLN_COMMENT", "Simple_name", 
                      "SPACE", "RETURN", "ENCLOSE_COMMENT", "SECTION_COMMENT", 
                      "LINE_COMMENT", "Integer_ND", "SPACE_ND", "RETURN_ND", 
                      "Simple_name_FO", "SPACE_FO", "RETURN_FO", "Integer_IN", 
                      "Simple_name_IN", "SPACE_IN", "RETURN_IN", "Simple_name_CY", 
                      "SPACE_CY", "RETURN_CY", "Simple_name_SP", "SPACE_SP", 
                      "RETURN_SP", "Float_TO", "TOACE_TO", "RETURN_TO", 
                      "Any_name", "SPACE_CM", "RETURN_CM" ]

    RULE_xeasy_pk = 0
    RULE_dimension = 1
    RULE_format = 2
    RULE_iname = 3
    RULE_cyana_format = 4
    RULE_spectrum = 5
    RULE_tolerance = 6
    RULE_peak_list_2d = 7
    RULE_peak_2d = 8
    RULE_peak_list_3d = 9
    RULE_peak_3d = 10
    RULE_peak_list_4d = 11
    RULE_peak_4d = 12
    RULE_number = 13
    RULE_assign = 14
    RULE_comment = 15

    ruleNames =  [ "xeasy_pk", "dimension", "format", "iname", "cyana_format", 
                   "spectrum", "tolerance", "peak_list_2d", "peak_2d", "peak_list_3d", 
                   "peak_3d", "peak_list_4d", "peak_4d", "number", "assign", 
                   "comment" ]

    EOF = Token.EOF
    Num_of_dim=1
    Format=2
    Iname=3
    Cyana_format=4
    Spectrum=5
    Tolerance=6
    Integer=7
    Float=8
    Real=9
    COMMENT=10
    EXCLM_COMMENT=11
    SMCLN_COMMENT=12
    Simple_name=13
    SPACE=14
    RETURN=15
    ENCLOSE_COMMENT=16
    SECTION_COMMENT=17
    LINE_COMMENT=18
    Integer_ND=19
    SPACE_ND=20
    RETURN_ND=21
    Simple_name_FO=22
    SPACE_FO=23
    RETURN_FO=24
    Integer_IN=25
    Simple_name_IN=26
    SPACE_IN=27
    RETURN_IN=28
    Simple_name_CY=29
    SPACE_CY=30
    RETURN_CY=31
    Simple_name_SP=32
    SPACE_SP=33
    RETURN_SP=34
    Float_TO=35
    TOACE_TO=36
    RETURN_TO=37
    Any_name=38
    SPACE_CM=39
    RETURN_CM=40

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




    class Xeasy_pkContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def RETURN(self):
            return self.getToken(XeasyPKParser.RETURN, 0)

        def dimension(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.DimensionContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.DimensionContext,i)


        def format_(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.FormatContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.FormatContext,i)


        def iname(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.InameContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.InameContext,i)


        def cyana_format(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.Cyana_formatContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.Cyana_formatContext,i)


        def spectrum(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.SpectrumContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.SpectrumContext,i)


        def tolerance(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.ToleranceContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.ToleranceContext,i)


        def peak_list_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.Peak_list_2dContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.Peak_list_2dContext,i)


        def peak_list_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.Peak_list_3dContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.Peak_list_3dContext,i)


        def peak_list_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.Peak_list_4dContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.Peak_list_4dContext,i)


        def getRuleIndex(self):
            return XeasyPKParser.RULE_xeasy_pk

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

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




    def xeasy_pk(self):

        localctx = XeasyPKParser.Xeasy_pkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_xeasy_pk)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 33
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==15:
                self.state = 32
                self.match(XeasyPKParser.RETURN)


            self.state = 46
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 254) != 0):
                self.state = 44
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,1,self._ctx)
                if la_ == 1:
                    self.state = 35
                    self.dimension()
                    pass

                elif la_ == 2:
                    self.state = 36
                    self.format_()
                    pass

                elif la_ == 3:
                    self.state = 37
                    self.iname()
                    pass

                elif la_ == 4:
                    self.state = 38
                    self.cyana_format()
                    pass

                elif la_ == 5:
                    self.state = 39
                    self.spectrum()
                    pass

                elif la_ == 6:
                    self.state = 40
                    self.tolerance()
                    pass

                elif la_ == 7:
                    self.state = 41
                    self.peak_list_2d()
                    pass

                elif la_ == 8:
                    self.state = 42
                    self.peak_list_3d()
                    pass

                elif la_ == 9:
                    self.state = 43
                    self.peak_list_4d()
                    pass


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

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


    class DimensionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Num_of_dim(self):
            return self.getToken(XeasyPKParser.Num_of_dim, 0)

        def Integer_ND(self):
            return self.getToken(XeasyPKParser.Integer_ND, 0)

        def RETURN_ND(self):
            return self.getToken(XeasyPKParser.RETURN_ND, 0)

        def getRuleIndex(self):
            return XeasyPKParser.RULE_dimension

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

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




    def dimension(self):

        localctx = XeasyPKParser.DimensionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_dimension)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 51
            self.match(XeasyPKParser.Num_of_dim)
            self.state = 52
            self.match(XeasyPKParser.Integer_ND)
            self.state = 53
            self.match(XeasyPKParser.RETURN_ND)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FormatContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Format(self):
            return self.getToken(XeasyPKParser.Format, 0)

        def Simple_name_FO(self):
            return self.getToken(XeasyPKParser.Simple_name_FO, 0)

        def RETURN_FO(self):
            return self.getToken(XeasyPKParser.RETURN_FO, 0)

        def getRuleIndex(self):
            return XeasyPKParser.RULE_format

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

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




    def format_(self):

        localctx = XeasyPKParser.FormatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_format)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 55
            self.match(XeasyPKParser.Format)
            self.state = 56
            self.match(XeasyPKParser.Simple_name_FO)
            self.state = 57
            self.match(XeasyPKParser.RETURN_FO)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Iname(self):
            return self.getToken(XeasyPKParser.Iname, 0)

        def Integer_IN(self):
            return self.getToken(XeasyPKParser.Integer_IN, 0)

        def Simple_name_IN(self):
            return self.getToken(XeasyPKParser.Simple_name_IN, 0)

        def RETURN_IN(self):
            return self.getToken(XeasyPKParser.RETURN_IN, 0)

        def getRuleIndex(self):
            return XeasyPKParser.RULE_iname

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

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




    def iname(self):

        localctx = XeasyPKParser.InameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_iname)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 59
            self.match(XeasyPKParser.Iname)
            self.state = 60
            self.match(XeasyPKParser.Integer_IN)
            self.state = 61
            self.match(XeasyPKParser.Simple_name_IN)
            self.state = 62
            self.match(XeasyPKParser.RETURN_IN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Cyana_formatContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Cyana_format(self):
            return self.getToken(XeasyPKParser.Cyana_format, 0)

        def Simple_name_CY(self):
            return self.getToken(XeasyPKParser.Simple_name_CY, 0)

        def RETURN_CY(self):
            return self.getToken(XeasyPKParser.RETURN_CY, 0)

        def getRuleIndex(self):
            return XeasyPKParser.RULE_cyana_format

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

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




    def cyana_format(self):

        localctx = XeasyPKParser.Cyana_formatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_cyana_format)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 64
            self.match(XeasyPKParser.Cyana_format)
            self.state = 65
            self.match(XeasyPKParser.Simple_name_CY)
            self.state = 66
            self.match(XeasyPKParser.RETURN_CY)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SpectrumContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Spectrum(self):
            return self.getToken(XeasyPKParser.Spectrum, 0)

        def RETURN_SP(self):
            return self.getToken(XeasyPKParser.RETURN_SP, 0)

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

        def getRuleIndex(self):
            return XeasyPKParser.RULE_spectrum

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

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




    def spectrum(self):

        localctx = XeasyPKParser.SpectrumContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_spectrum)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 68
            self.match(XeasyPKParser.Spectrum)
            self.state = 70 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 69
                self.match(XeasyPKParser.Simple_name_SP)
                self.state = 72 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==32):
                    break

            self.state = 74
            self.match(XeasyPKParser.RETURN_SP)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ToleranceContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Tolerance(self):
            return self.getToken(XeasyPKParser.Tolerance, 0)

        def RETURN_TO(self):
            return self.getToken(XeasyPKParser.RETURN_TO, 0)

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

        def getRuleIndex(self):
            return XeasyPKParser.RULE_tolerance

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

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




    def tolerance(self):

        localctx = XeasyPKParser.ToleranceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_tolerance)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 76
            self.match(XeasyPKParser.Tolerance)
            self.state = 78 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 77
                self.match(XeasyPKParser.Float_TO)
                self.state = 80 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==35):
                    break

            self.state = 82
            self.match(XeasyPKParser.RETURN_TO)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Peak_list_2dContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def peak_2d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.Peak_2dContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.Peak_2dContext,i)


        def getRuleIndex(self):
            return XeasyPKParser.RULE_peak_list_2d

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

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




    def peak_list_2d(self):

        localctx = XeasyPKParser.Peak_list_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_peak_list_2d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 85 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 84
                    self.peak_2d()

                else:
                    raise NoViableAltException(self)
                self.state = 87 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,5,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 Peak_2dContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

        def number(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.NumberContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.NumberContext,i)


        def assign(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.AssignContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.AssignContext,i)


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

        def comment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.CommentContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.CommentContext,i)


        def getRuleIndex(self):
            return XeasyPKParser.RULE_peak_2d

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

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




    def peak_2d(self):

        localctx = XeasyPKParser.Peak_2dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_peak_2d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 89
            self.match(XeasyPKParser.Integer)
            self.state = 90
            self.match(XeasyPKParser.Float)
            self.state = 91
            self.match(XeasyPKParser.Float)
            self.state = 92
            self.match(XeasyPKParser.Integer)
            self.state = 93
            self.match(XeasyPKParser.Simple_name)
            self.state = 94
            self.number()
            self.state = 95
            self.number()
            self.state = 96
            self.match(XeasyPKParser.Simple_name)
            self.state = 97
            self.match(XeasyPKParser.Integer)
            self.state = 98
            self.assign()
            self.state = 99
            self.assign()
            self.state = 101
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 100
                self.match(XeasyPKParser.Integer)


            self.state = 105
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [15]:
                self.state = 103
                self.match(XeasyPKParser.RETURN)
                pass
            elif token in [10]:
                self.state = 104
                self.comment()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 118
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,10,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 107
                    self.assign()
                    self.state = 108
                    self.assign()
                    self.state = 110
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==7:
                        self.state = 109
                        self.match(XeasyPKParser.Integer)


                    self.state = 114
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [15]:
                        self.state = 112
                        self.match(XeasyPKParser.RETURN)
                        pass
                    elif token in [10]:
                        self.state = 113
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 120
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,10,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 Peak_list_3dContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def peak_3d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.Peak_3dContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.Peak_3dContext,i)


        def getRuleIndex(self):
            return XeasyPKParser.RULE_peak_list_3d

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

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




    def peak_list_3d(self):

        localctx = XeasyPKParser.Peak_list_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_peak_list_3d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 122 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 121
                    self.peak_3d()

                else:
                    raise NoViableAltException(self)
                self.state = 124 
                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 Peak_3dContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

        def number(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.NumberContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.NumberContext,i)


        def assign(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.AssignContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.AssignContext,i)


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

        def comment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.CommentContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.CommentContext,i)


        def getRuleIndex(self):
            return XeasyPKParser.RULE_peak_3d

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

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




    def peak_3d(self):

        localctx = XeasyPKParser.Peak_3dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_peak_3d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 126
            self.match(XeasyPKParser.Integer)
            self.state = 127
            self.match(XeasyPKParser.Float)
            self.state = 128
            self.match(XeasyPKParser.Float)
            self.state = 129
            self.match(XeasyPKParser.Float)
            self.state = 130
            self.match(XeasyPKParser.Integer)
            self.state = 131
            self.match(XeasyPKParser.Simple_name)
            self.state = 132
            self.number()
            self.state = 133
            self.number()
            self.state = 134
            self.match(XeasyPKParser.Simple_name)
            self.state = 135
            self.match(XeasyPKParser.Integer)
            self.state = 136
            self.assign()
            self.state = 137
            self.assign()
            self.state = 138
            self.assign()
            self.state = 140
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 139
                self.match(XeasyPKParser.Integer)


            self.state = 144
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [15]:
                self.state = 142
                self.match(XeasyPKParser.RETURN)
                pass
            elif token in [10]:
                self.state = 143
                self.comment()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 158
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,16,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 146
                    self.assign()
                    self.state = 147
                    self.assign()
                    self.state = 148
                    self.assign()
                    self.state = 150
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==7:
                        self.state = 149
                        self.match(XeasyPKParser.Integer)


                    self.state = 154
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [15]:
                        self.state = 152
                        self.match(XeasyPKParser.RETURN)
                        pass
                    elif token in [10]:
                        self.state = 153
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 160
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,16,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 Peak_list_4dContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def peak_4d(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.Peak_4dContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.Peak_4dContext,i)


        def getRuleIndex(self):
            return XeasyPKParser.RULE_peak_list_4d

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

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




    def peak_list_4d(self):

        localctx = XeasyPKParser.Peak_list_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_peak_list_4d)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 162 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 161
                    self.peak_4d()

                else:
                    raise NoViableAltException(self)
                self.state = 164 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,17,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 Peak_4dContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

        def number(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.NumberContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.NumberContext,i)


        def assign(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.AssignContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.AssignContext,i)


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

        def comment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(XeasyPKParser.CommentContext)
            else:
                return self.getTypedRuleContext(XeasyPKParser.CommentContext,i)


        def getRuleIndex(self):
            return XeasyPKParser.RULE_peak_4d

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

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




    def peak_4d(self):

        localctx = XeasyPKParser.Peak_4dContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_peak_4d)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 166
            self.match(XeasyPKParser.Integer)
            self.state = 167
            self.match(XeasyPKParser.Float)
            self.state = 168
            self.match(XeasyPKParser.Float)
            self.state = 169
            self.match(XeasyPKParser.Float)
            self.state = 170
            self.match(XeasyPKParser.Float)
            self.state = 171
            self.match(XeasyPKParser.Integer)
            self.state = 172
            self.match(XeasyPKParser.Simple_name)
            self.state = 173
            self.number()
            self.state = 174
            self.number()
            self.state = 175
            self.match(XeasyPKParser.Simple_name)
            self.state = 176
            self.match(XeasyPKParser.Integer)
            self.state = 177
            self.assign()
            self.state = 178
            self.assign()
            self.state = 179
            self.assign()
            self.state = 180
            self.assign()
            self.state = 182
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 181
                self.match(XeasyPKParser.Integer)


            self.state = 186
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [15]:
                self.state = 184
                self.match(XeasyPKParser.RETURN)
                pass
            elif token in [10]:
                self.state = 185
                self.comment()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 201
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,22,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 188
                    self.assign()
                    self.state = 189
                    self.assign()
                    self.state = 190
                    self.assign()
                    self.state = 191
                    self.assign()
                    self.state = 193
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==7:
                        self.state = 192
                        self.match(XeasyPKParser.Integer)


                    self.state = 197
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [15]:
                        self.state = 195
                        self.match(XeasyPKParser.RETURN)
                        pass
                    elif token in [10]:
                        self.state = 196
                        self.comment()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 203
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,22,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 NumberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Float(self):
            return self.getToken(XeasyPKParser.Float, 0)

        def Real(self):
            return self.getToken(XeasyPKParser.Real, 0)

        def Integer(self):
            return self.getToken(XeasyPKParser.Integer, 0)

        def Simple_name(self):
            return self.getToken(XeasyPKParser.Simple_name, 0)

        def getRuleIndex(self):
            return XeasyPKParser.RULE_number

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

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




    def number(self):

        localctx = XeasyPKParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 204
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 9088) != 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 AssignContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Integer(self):
            return self.getToken(XeasyPKParser.Integer, 0)

        def Simple_name(self):
            return self.getToken(XeasyPKParser.Simple_name, 0)

        def getRuleIndex(self):
            return XeasyPKParser.RULE_assign

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

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




    def assign(self):

        localctx = XeasyPKParser.AssignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_assign)
        try:
            self.state = 211
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [7]:
                self.enterOuterAlt(localctx, 1)
                self.state = 206
                self.match(XeasyPKParser.Integer)
                pass
            elif token in [13]:
                self.enterOuterAlt(localctx, 2)
                self.state = 207
                self.match(XeasyPKParser.Simple_name)
                self.state = 209
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,23,self._ctx)
                if la_ == 1:
                    self.state = 208
                    self.match(XeasyPKParser.Integer)


                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):
        __slots__ = 'parser'

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

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

        def RETURN_CM(self):
            return self.getToken(XeasyPKParser.RETURN_CM, 0)

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

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

        def getRuleIndex(self):
            return XeasyPKParser.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 comment(self):

        localctx = XeasyPKParser.CommentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 213
            self.match(XeasyPKParser.COMMENT)
            self.state = 217
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==38:
                self.state = 214
                self.match(XeasyPKParser.Any_name)
                self.state = 219
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 220
            _la = self._input.LA(1)
            if not(_la==-1 or _la==40):
                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





