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

class AlignParser ( Parser ):

    grammarFileName = "Align.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'if'", "'('", "')'", "'{'", "'}'", "'foreach'", 
                     "'duplicate'", "'var'", "'='", "'['", "']'", "'$'", 
                     "'${'", "','", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'not'", "'exists'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'in'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "COMMA", "SPACE", "COMMENT", 
                      "NEWLINE", "BOOL", "NEGATE", "EXISTS", "OPERATOR", 
                      "QUOTED_STRING", "BOOLEAN_OPERATOR", "IN", "NUMBER", 
                      "SIGNED_DECIMAL", "DECIMAL", "SIGNED_INT", "INT", 
                      "DIGIT", "NAME", "WORD", "LETTER", "LCASE_LETTER", 
                      "UCASE_LETTER" ]

    RULE_align = 0
    RULE_operation = 1
    RULE_condition = 2
    RULE_expression = 3
    RULE_subexpression = 4
    RULE_leftside = 5
    RULE_operator = 6
    RULE_negate = 7
    RULE_exists = 8
    RULE_foreach = 9
    RULE_item = 10
    RULE_duplicate = 11
    RULE_variable = 12
    RULE_command = 13
    RULE_assignment = 14
    RULE_valueref = 15
    RULE_key = 16
    RULE_value = 17
    RULE_objmap = 18
    RULE_array = 19
    RULE_variableref = 20

    ruleNames =  [ "align", "operation", "condition", "expression", "subexpression", 
                   "leftside", "operator", "negate", "exists", "foreach", 
                   "item", "duplicate", "variable", "command", "assignment", 
                   "valueref", "key", "value", "objmap", "array", "variableref" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    COMMA=14
    SPACE=15
    COMMENT=16
    NEWLINE=17
    BOOL=18
    NEGATE=19
    EXISTS=20
    OPERATOR=21
    QUOTED_STRING=22
    BOOLEAN_OPERATOR=23
    IN=24
    NUMBER=25
    SIGNED_DECIMAL=26
    DECIMAL=27
    SIGNED_INT=28
    INT=29
    DIGIT=30
    NAME=31
    WORD=32
    LETTER=33
    LCASE_LETTER=34
    UCASE_LETTER=35

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




    class AlignContext(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(AlignParser.EOF, 0)

        def operation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.OperationContext)
            else:
                return self.getTypedRuleContext(AlignParser.OperationContext,i)


        def getRuleIndex(self):
            return AlignParser.RULE_align

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

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




    def align(self):

        localctx = AlignParser.AlignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_align)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 45
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 2147484098) != 0):
                self.state = 42
                self.operation()
                self.state = 47
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class OperationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def command(self):
            return self.getTypedRuleContext(AlignParser.CommandContext,0)


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


        def foreach(self):
            return self.getTypedRuleContext(AlignParser.ForeachContext,0)


        def duplicate(self):
            return self.getTypedRuleContext(AlignParser.DuplicateContext,0)


        def variable(self):
            return self.getTypedRuleContext(AlignParser.VariableContext,0)


        def getRuleIndex(self):
            return AlignParser.RULE_operation

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

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




    def operation(self):

        localctx = AlignParser.OperationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_operation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 55
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [31]:
                self.state = 50
                self.command()
                pass
            elif token in [1]:
                self.state = 51
                self.condition()
                pass
            elif token in [6]:
                self.state = 52
                self.foreach()
                pass
            elif token in [7]:
                self.state = 53
                self.duplicate()
                pass
            elif token in [8]:
                self.state = 54
                self.variable()
                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 ConditionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expression(self):
            return self.getTypedRuleContext(AlignParser.ExpressionContext,0)


        def operation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.OperationContext)
            else:
                return self.getTypedRuleContext(AlignParser.OperationContext,i)


        def getRuleIndex(self):
            return AlignParser.RULE_condition

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

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




    def condition(self):

        localctx = AlignParser.ConditionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_condition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 57
            self.match(AlignParser.T__0)
            self.state = 58
            self.match(AlignParser.T__1)
            self.state = 59
            self.expression()
            self.state = 60
            self.match(AlignParser.T__2)
            self.state = 61
            self.match(AlignParser.T__3)
            self.state = 63 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 62
                self.operation()
                self.state = 65 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 2147484098) != 0)):
                    break

            self.state = 67
            self.match(AlignParser.T__4)
        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):
        __slots__ = 'parser'

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

        def leftside(self):
            return self.getTypedRuleContext(AlignParser.LeftsideContext,0)


        def operator(self):
            return self.getTypedRuleContext(AlignParser.OperatorContext,0)


        def exists(self):
            return self.getTypedRuleContext(AlignParser.ExistsContext,0)


        def negate(self):
            return self.getTypedRuleContext(AlignParser.NegateContext,0)


        def subexpression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.SubexpressionContext)
            else:
                return self.getTypedRuleContext(AlignParser.SubexpressionContext,i)


        def valueref(self):
            return self.getTypedRuleContext(AlignParser.ValuerefContext,0)


        def expression(self):
            return self.getTypedRuleContext(AlignParser.ExpressionContext,0)


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

        localctx = AlignParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_expression)
        self._la = 0 # Token type
        try:
            self.state = 89
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [22]:
                self.enterOuterAlt(localctx, 1)
                self.state = 69
                self.leftside()
                self.state = 71
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==19:
                    self.state = 70
                    self.negate()


                self.state = 77
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [21, 24]:
                    self.state = 73
                    self.operator()

                    self.state = 74
                    self.valueref()
                    pass
                elif token in [20]:
                    self.state = 76
                    self.exists()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 82
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,5,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 79
                        self.subexpression() 
                    self.state = 84
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,5,self._ctx)

                pass
            elif token in [2]:
                self.enterOuterAlt(localctx, 2)
                self.state = 85
                self.match(AlignParser.T__1)
                self.state = 86
                self.expression()
                self.state = 87
                self.match(AlignParser.T__2)
                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 SubexpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BOOLEAN_OPERATOR(self):
            return self.getToken(AlignParser.BOOLEAN_OPERATOR, 0)

        def expression(self):
            return self.getTypedRuleContext(AlignParser.ExpressionContext,0)


        def negate(self):
            return self.getTypedRuleContext(AlignParser.NegateContext,0)


        def getRuleIndex(self):
            return AlignParser.RULE_subexpression

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

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




    def subexpression(self):

        localctx = AlignParser.SubexpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_subexpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 91
            self.match(AlignParser.BOOLEAN_OPERATOR)
            self.state = 93
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 92
                self.negate()


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


    class LeftsideContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def QUOTED_STRING(self):
            return self.getToken(AlignParser.QUOTED_STRING, 0)

        def getRuleIndex(self):
            return AlignParser.RULE_leftside

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

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




    def leftside(self):

        localctx = AlignParser.LeftsideContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_leftside)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 97
            self.match(AlignParser.QUOTED_STRING)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OperatorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPERATOR(self):
            return self.getToken(AlignParser.OPERATOR, 0)

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

        def getRuleIndex(self):
            return AlignParser.RULE_operator

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

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




    def operator(self):

        localctx = AlignParser.OperatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_operator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 99
            _la = self._input.LA(1)
            if not(_la==21 or _la==24):
                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 NegateContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NEGATE(self):
            return self.getToken(AlignParser.NEGATE, 0)

        def getRuleIndex(self):
            return AlignParser.RULE_negate

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

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




    def negate(self):

        localctx = AlignParser.NegateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_negate)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 101
            self.match(AlignParser.NEGATE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExistsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def EXISTS(self):
            return self.getToken(AlignParser.EXISTS, 0)

        def getRuleIndex(self):
            return AlignParser.RULE_exists

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

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




    def exists(self):

        localctx = AlignParser.ExistsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_exists)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 103
            self.match(AlignParser.EXISTS)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ForeachContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def item(self):
            return self.getTypedRuleContext(AlignParser.ItemContext,0)


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

        def leftside(self):
            return self.getTypedRuleContext(AlignParser.LeftsideContext,0)


        def operation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.OperationContext)
            else:
                return self.getTypedRuleContext(AlignParser.OperationContext,i)


        def getRuleIndex(self):
            return AlignParser.RULE_foreach

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

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




    def foreach(self):

        localctx = AlignParser.ForeachContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_foreach)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 105
            self.match(AlignParser.T__5)
            self.state = 106
            self.item()
            self.state = 107
            self.match(AlignParser.IN)
            self.state = 108
            self.leftside()
            self.state = 109
            self.match(AlignParser.T__3)
            self.state = 111 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 110
                self.operation()
                self.state = 113 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 2147484098) != 0)):
                    break

            self.state = 115
            self.match(AlignParser.T__4)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ItemContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def QUOTED_STRING(self):
            return self.getToken(AlignParser.QUOTED_STRING, 0)

        def getRuleIndex(self):
            return AlignParser.RULE_item

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

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




    def item(self):

        localctx = AlignParser.ItemContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_item)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 117
            self.match(AlignParser.QUOTED_STRING)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DuplicateContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def operation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.OperationContext)
            else:
                return self.getTypedRuleContext(AlignParser.OperationContext,i)


        def getRuleIndex(self):
            return AlignParser.RULE_duplicate

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

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




    def duplicate(self):

        localctx = AlignParser.DuplicateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_duplicate)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 119
            self.match(AlignParser.T__6)
            self.state = 120
            self.match(AlignParser.T__3)
            self.state = 122 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 121
                self.operation()
                self.state = 124 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 2147484098) != 0)):
                    break

            self.state = 126
            self.match(AlignParser.T__4)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VariableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NAME(self):
            return self.getToken(AlignParser.NAME, 0)

        def valueref(self):
            return self.getTypedRuleContext(AlignParser.ValuerefContext,0)


        def getRuleIndex(self):
            return AlignParser.RULE_variable

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

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




    def variable(self):

        localctx = AlignParser.VariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 128
            self.match(AlignParser.T__7)
            self.state = 129
            self.match(AlignParser.NAME)
            self.state = 130
            self.match(AlignParser.T__8)
            self.state = 131
            self.valueref()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CommandContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NAME(self):
            return self.getToken(AlignParser.NAME, 0)

        def assignment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.AssignmentContext)
            else:
                return self.getTypedRuleContext(AlignParser.AssignmentContext,i)


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

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

        def getRuleIndex(self):
            return AlignParser.RULE_command

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

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




    def command(self):

        localctx = AlignParser.CommandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_command)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 133
            self.match(AlignParser.NAME)
            self.state = 134
            self.match(AlignParser.T__3)
            self.state = 135
            self.assignment()
            self.state = 145
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 2151837696) != 0):
                self.state = 139
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==14 or _la==17:
                    self.state = 136
                    _la = self._input.LA(1)
                    if not(_la==14 or _la==17):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 141
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 142
                self.assignment()
                self.state = 147
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 148
            self.match(AlignParser.T__4)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AssignmentContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


        def valueref(self):
            return self.getTypedRuleContext(AlignParser.ValuerefContext,0)


        def getRuleIndex(self):
            return AlignParser.RULE_assignment

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

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




    def assignment(self):

        localctx = AlignParser.AssignmentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_assignment)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 150
            self.key()
            self.state = 151
            self.match(AlignParser.T__8)
            self.state = 152
            self.valueref()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ValuerefContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


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


        def variableref(self):
            return self.getTypedRuleContext(AlignParser.VariablerefContext,0)


        def getRuleIndex(self):
            return AlignParser.RULE_valueref

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

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




    def valueref(self):

        localctx = AlignParser.ValuerefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_valueref)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 157
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,12,self._ctx)
            if la_ == 1:
                self.state = 154
                self.value()
                pass

            elif la_ == 2:
                self.state = 155
                self.array()
                pass

            elif la_ == 3:
                self.state = 156
                self.variableref()
                pass


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

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

        def NAME(self):
            return self.getToken(AlignParser.NAME, 0)

        def QUOTED_STRING(self):
            return self.getToken(AlignParser.QUOTED_STRING, 0)

        def variableref(self):
            return self.getTypedRuleContext(AlignParser.VariablerefContext,0)


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

        localctx = AlignParser.KeyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_key)
        try:
            self.state = 162
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [31]:
                self.enterOuterAlt(localctx, 1)
                self.state = 159
                self.match(AlignParser.NAME)
                pass
            elif token in [22]:
                self.enterOuterAlt(localctx, 2)
                self.state = 160
                self.match(AlignParser.QUOTED_STRING)
                pass
            elif token in [12, 13]:
                self.enterOuterAlt(localctx, 3)
                self.state = 161
                self.variableref()
                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 ValueContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def QUOTED_STRING(self):
            return self.getToken(AlignParser.QUOTED_STRING, 0)

        def NUMBER(self):
            return self.getToken(AlignParser.NUMBER, 0)

        def BOOL(self):
            return self.getToken(AlignParser.BOOL, 0)

        def objmap(self):
            return self.getTypedRuleContext(AlignParser.ObjmapContext,0)


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


        def variableref(self):
            return self.getTypedRuleContext(AlignParser.VariablerefContext,0)


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

        localctx = AlignParser.ValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_value)
        try:
            self.state = 170
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [22]:
                self.enterOuterAlt(localctx, 1)
                self.state = 164
                self.match(AlignParser.QUOTED_STRING)
                pass
            elif token in [25]:
                self.enterOuterAlt(localctx, 2)
                self.state = 165
                self.match(AlignParser.NUMBER)
                pass
            elif token in [18]:
                self.enterOuterAlt(localctx, 3)
                self.state = 166
                self.match(AlignParser.BOOL)
                pass
            elif token in [4]:
                self.enterOuterAlt(localctx, 4)
                self.state = 167
                self.objmap()
                pass
            elif token in [10]:
                self.enterOuterAlt(localctx, 5)
                self.state = 168
                self.array()
                pass
            elif token in [12, 13]:
                self.enterOuterAlt(localctx, 6)
                self.state = 169
                self.variableref()
                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 ObjmapContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def assignment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.AssignmentContext)
            else:
                return self.getTypedRuleContext(AlignParser.AssignmentContext,i)


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

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

        def getRuleIndex(self):
            return AlignParser.RULE_objmap

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

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




    def objmap(self):

        localctx = AlignParser.ObjmapContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_objmap)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 172
            self.match(AlignParser.T__3)
            self.state = 186
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & 2151690240) != 0):
                self.state = 173
                self.assignment()
                self.state = 183
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & 2151837696) != 0):
                    self.state = 177
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==14 or _la==17:
                        self.state = 174
                        _la = self._input.LA(1)
                        if not(_la==14 or _la==17):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 179
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)

                    self.state = 180
                    self.assignment()
                    self.state = 185
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 188
            self.match(AlignParser.T__4)
        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):
        __slots__ = 'parser'

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

        def valueref(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(AlignParser.ValuerefContext)
            else:
                return self.getTypedRuleContext(AlignParser.ValuerefContext,i)


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

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

        localctx = AlignParser.ArrayContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_array)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 190
            self.match(AlignParser.T__9)
            self.state = 199
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & 38024208) != 0):
                self.state = 191
                self.valueref()
                self.state = 196
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==14:
                    self.state = 192
                    self.match(AlignParser.COMMA)
                    self.state = 193
                    self.valueref()
                    self.state = 198
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 201
            self.match(AlignParser.T__10)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VariablerefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NAME(self):
            return self.getToken(AlignParser.NAME, 0)

        def getRuleIndex(self):
            return AlignParser.RULE_variableref

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

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




    def variableref(self):

        localctx = AlignParser.VariablerefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_variableref)
        try:
            self.state = 208
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [12]:
                self.enterOuterAlt(localctx, 1)
                self.state = 203
                self.match(AlignParser.T__11)
                self.state = 204
                self.match(AlignParser.NAME)
                pass
            elif token in [13]:
                self.enterOuterAlt(localctx, 2)
                self.state = 205
                self.match(AlignParser.T__12)
                self.state = 206
                self.match(AlignParser.NAME)
                self.state = 207
                self.match(AlignParser.T__4)
                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





