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


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3/")
        buf.write("\u0119\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\3\2\3\2")
        buf.write("\3\2\3\2\7\2?\n\2\f\2\16\2B\13\2\3\3\3\3\6\3F\n\3\r\3")
        buf.write("\16\3G\3\3\3\3\3\4\3\4\6\4N\n\4\r\4\16\4O\3\5\3\5\6\5")
        buf.write("T\n\5\r\5\16\5U\3\5\3\5\3\6\3\6\3\6\6\6]\n\6\r\6\16\6")
        buf.write("^\3\7\3\7\3\7\6\7d\n\7\r\7\16\7e\3\b\3\b\3\t\3\t\6\tl")
        buf.write("\n\t\r\t\16\tm\3\t\3\t\3\n\3\n\3\n\6\nu\n\n\r\n\16\nv")
        buf.write("\3\13\3\13\3\13\5\13|\n\13\3\f\3\f\3\f\6\f\u0081\n\f\r")
        buf.write("\f\16\f\u0082\3\r\3\r\5\r\u0087\n\r\3\16\3\16\3\16\6\16")
        buf.write("\u008c\n\16\r\16\16\16\u008d\3\16\3\16\3\16\6\16\u0093")
        buf.write("\n\16\r\16\16\16\u0094\5\16\u0097\n\16\3\17\3\17\3\17")
        buf.write("\7\17\u009c\n\17\f\17\16\17\u009f\13\17\3\17\3\17\6\17")
        buf.write("\u00a3\n\17\r\17\16\17\u00a4\3\20\3\20\3\20\7\20\u00aa")
        buf.write("\n\20\f\20\16\20\u00ad\13\20\3\20\3\20\6\20\u00b1\n\20")
        buf.write("\r\20\16\20\u00b2\3\21\3\21\6\21\u00b7\n\21\r\21\16\21")
        buf.write("\u00b8\3\21\3\21\3\22\3\22\3\22\6\22\u00c0\n\22\r\22\16")
        buf.write("\22\u00c1\3\23\3\23\3\23\3\23\5\23\u00c8\n\23\3\24\3\24")
        buf.write("\3\24\6\24\u00cd\n\24\r\24\16\24\u00ce\3\25\3\25\3\25")
        buf.write("\3\25\3\25\3\26\3\26\3\26\5\26\u00d9\n\26\3\26\3\26\3")
        buf.write("\27\3\27\3\27\5\27\u00e0\n\27\3\27\6\27\u00e3\n\27\r\27")
        buf.write("\16\27\u00e4\3\30\3\30\3\30\3\30\3\30\5\30\u00ec\n\30")
        buf.write("\3\31\3\31\3\31\6\31\u00f1\n\31\r\31\16\31\u00f2\3\32")
        buf.write("\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32")
        buf.write("\3\32\5\32\u0102\n\32\3\32\3\32\3\32\3\32\3\32\3\32\3")
        buf.write("\32\3\32\3\32\3\32\7\32\u010e\n\32\f\32\16\32\u0111\13")
        buf.write("\32\3\33\3\33\3\34\3\34\3\35\3\35\3\35\2\3\62\36\2\4\6")
        buf.write("\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\66")
        buf.write("8\2\6\3\2*.\3\2()\3\2\35\"\5\2&\'**-.\2\u0124\2@\3\2\2")
        buf.write("\2\4C\3\2\2\2\6K\3\2\2\2\bQ\3\2\2\2\nY\3\2\2\2\f`\3\2")
        buf.write("\2\2\16g\3\2\2\2\20i\3\2\2\2\22q\3\2\2\2\24{\3\2\2\2\26")
        buf.write("}\3\2\2\2\30\u0086\3\2\2\2\32\u0096\3\2\2\2\34\u0098\3")
        buf.write("\2\2\2\36\u00a6\3\2\2\2 \u00b4\3\2\2\2\"\u00bc\3\2\2\2")
        buf.write("$\u00c7\3\2\2\2&\u00c9\3\2\2\2(\u00d0\3\2\2\2*\u00d5\3")
        buf.write("\2\2\2,\u00dc\3\2\2\2.\u00eb\3\2\2\2\60\u00ed\3\2\2\2")
        buf.write("\62\u0101\3\2\2\2\64\u0112\3\2\2\2\66\u0114\3\2\2\28\u0116")
        buf.write("\3\2\2\2:?\5\4\3\2;?\5\b\5\2<?\5 \21\2=?\5\20\t\2>:\3")
        buf.write("\2\2\2>;\3\2\2\2><\3\2\2\2>=\3\2\2\2?B\3\2\2\2@>\3\2\2")
        buf.write("\2@A\3\2\2\2A\3\3\2\2\2B@\3\2\2\2CE\5\6\4\2DF\5\f\7\2")
        buf.write("ED\3\2\2\2FG\3\2\2\2GE\3\2\2\2GH\3\2\2\2HI\3\2\2\2IJ\7")
        buf.write("\f\2\2J\5\3\2\2\2KM\7\3\2\2LN\7\t\2\2ML\3\2\2\2NO\3\2")
        buf.write("\2\2OM\3\2\2\2OP\3\2\2\2P\7\3\2\2\2QS\5\n\6\2RT\5\f\7")
        buf.write("\2SR\3\2\2\2TU\3\2\2\2US\3\2\2\2UV\3\2\2\2VW\3\2\2\2W")
        buf.write("X\7\f\2\2X\t\3\2\2\2YZ\7\6\2\2Z\\\7(\2\2[]\7\t\2\2\\[")
        buf.write("\3\2\2\2]^\3\2\2\2^\\\3\2\2\2^_\3\2\2\2_\13\3\2\2\2`a")
        buf.write("\7\r\2\2ac\5\16\b\2bd\7\t\2\2cb\3\2\2\2de\3\2\2\2ec\3")
        buf.write("\2\2\2ef\3\2\2\2f\r\3\2\2\2gh\t\2\2\2h\17\3\2\2\2ik\5")
        buf.write("\22\n\2jl\5\24\13\2kj\3\2\2\2lm\3\2\2\2mk\3\2\2\2mn\3")
        buf.write("\2\2\2no\3\2\2\2op\7\f\2\2p\21\3\2\2\2qr\7\5\2\2rt\7(")
        buf.write("\2\2su\7\t\2\2ts\3\2\2\2uv\3\2\2\2vt\3\2\2\2vw\3\2\2\2")
        buf.write("w\23\3\2\2\2x|\5\30\r\2y|\5\26\f\2z|\5\36\20\2{x\3\2\2")
        buf.write("\2{y\3\2\2\2{z\3\2\2\2|\25\3\2\2\2}~\7\16\2\2~\u0080\7")
        buf.write("(\2\2\177\u0081\7\t\2\2\u0080\177\3\2\2\2\u0081\u0082")
        buf.write("\3\2\2\2\u0082\u0080\3\2\2\2\u0082\u0083\3\2\2\2\u0083")
        buf.write("\27\3\2\2\2\u0084\u0087\5\32\16\2\u0085\u0087\5\34\17")
        buf.write("\2\u0086\u0084\3\2\2\2\u0086\u0085\3\2\2\2\u0087\31\3")
        buf.write("\2\2\2\u0088\u0089\7\26\2\2\u0089\u008b\5\62\32\2\u008a")
        buf.write("\u008c\7\t\2\2\u008b\u008a\3\2\2\2\u008c\u008d\3\2\2\2")
        buf.write("\u008d\u008b\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u0097\3")
        buf.write("\2\2\2\u008f\u0090\7\27\2\2\u0090\u0092\5\62\32\2\u0091")
        buf.write("\u0093\7\t\2\2\u0092\u0091\3\2\2\2\u0093\u0094\3\2\2\2")
        buf.write("\u0094\u0092\3\2\2\2\u0094\u0095\3\2\2\2\u0095\u0097\3")
        buf.write("\2\2\2\u0096\u0088\3\2\2\2\u0096\u008f\3\2\2\2\u0097\33")
        buf.write("\3\2\2\2\u0098\u009d\7\25\2\2\u0099\u009a\7(\2\2\u009a")
        buf.write("\u009c\7\31\2\2\u009b\u0099\3\2\2\2\u009c\u009f\3\2\2")
        buf.write("\2\u009d\u009b\3\2\2\2\u009d\u009e\3\2\2\2\u009e\u00a0")
        buf.write("\3\2\2\2\u009f\u009d\3\2\2\2\u00a0\u00a2\7(\2\2\u00a1")
        buf.write("\u00a3\7\t\2\2\u00a2\u00a1\3\2\2\2\u00a3\u00a4\3\2\2\2")
        buf.write("\u00a4\u00a2\3\2\2\2\u00a4\u00a5\3\2\2\2\u00a5\35\3\2")
        buf.write("\2\2\u00a6\u00ab\7\17\2\2\u00a7\u00a8\7(\2\2\u00a8\u00aa")
        buf.write("\7\31\2\2\u00a9\u00a7\3\2\2\2\u00aa\u00ad\3\2\2\2\u00ab")
        buf.write("\u00a9\3\2\2\2\u00ab\u00ac\3\2\2\2\u00ac\u00ae\3\2\2\2")
        buf.write("\u00ad\u00ab\3\2\2\2\u00ae\u00b0\7(\2\2\u00af\u00b1\7")
        buf.write("\t\2\2\u00b0\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00b0")
        buf.write("\3\2\2\2\u00b2\u00b3\3\2\2\2\u00b3\37\3\2\2\2\u00b4\u00b6")
        buf.write("\5\"\22\2\u00b5\u00b7\5$\23\2\u00b6\u00b5\3\2\2\2\u00b7")
        buf.write("\u00b8\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b8\u00b9\3\2\2\2")
        buf.write("\u00b9\u00ba\3\2\2\2\u00ba\u00bb\7\f\2\2\u00bb!\3\2\2")
        buf.write("\2\u00bc\u00bd\7\4\2\2\u00bd\u00bf\7(\2\2\u00be\u00c0")
        buf.write("\7\t\2\2\u00bf\u00be\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1")
        buf.write("\u00bf\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2#\3\2\2\2\u00c3")
        buf.write("\u00c8\5(\25\2\u00c4\u00c8\5\30\r\2\u00c5\u00c8\5\60\31")
        buf.write("\2\u00c6\u00c8\5&\24\2\u00c7\u00c3\3\2\2\2\u00c7\u00c4")
        buf.write("\3\2\2\2\u00c7\u00c5\3\2\2\2\u00c7\u00c6\3\2\2\2\u00c8")
        buf.write("%\3\2\2\2\u00c9\u00ca\7\21\2\2\u00ca\u00cc\5\62\32\2\u00cb")
        buf.write("\u00cd\7\t\2\2\u00cc\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2")
        buf.write("\u00ce\u00cc\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cf\'\3\2\2")
        buf.write("\2\u00d0\u00d1\7\22\2\2\u00d1\u00d2\7\t\2\2\u00d2\u00d3")
        buf.write("\5*\26\2\u00d3\u00d4\5,\27\2\u00d4)\3\2\2\2\u00d5\u00d6")
        buf.write("\7\23\2\2\u00d6\u00d8\7(\2\2\u00d7\u00d9\5.\30\2\u00d8")
        buf.write("\u00d7\3\2\2\2\u00d8\u00d9\3\2\2\2\u00d9\u00da\3\2\2\2")
        buf.write("\u00da\u00db\7\t\2\2\u00db+\3\2\2\2\u00dc\u00dd\7\24\2")
        buf.write("\2\u00dd\u00df\7(\2\2\u00de\u00e0\5.\30\2\u00df\u00de")
        buf.write("\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0\u00e2\3\2\2\2\u00e1")
        buf.write("\u00e3\7\t\2\2\u00e2\u00e1\3\2\2\2\u00e3\u00e4\3\2\2\2")
        buf.write("\u00e4\u00e2\3\2\2\2\u00e4\u00e5\3\2\2\2\u00e5-\3\2\2")
        buf.write("\2\u00e6\u00ec\5\16\b\2\u00e7\u00e8\5\16\b\2\u00e8\u00e9")
        buf.write("\7\31\2\2\u00e9\u00ea\5.\30\2\u00ea\u00ec\3\2\2\2\u00eb")
        buf.write("\u00e6\3\2\2\2\u00eb\u00e7\3\2\2\2\u00ec/\3\2\2\2\u00ed")
        buf.write("\u00ee\7\20\2\2\u00ee\u00f0\7-\2\2\u00ef\u00f1\7\t\2\2")
        buf.write("\u00f0\u00ef\3\2\2\2\u00f1\u00f2\3\2\2\2\u00f2\u00f0\3")
        buf.write("\2\2\2\u00f2\u00f3\3\2\2\2\u00f3\61\3\2\2\2\u00f4\u00f5")
        buf.write("\b\32\1\2\u00f5\u0102\7(\2\2\u00f6\u00f7\7(\2\2\u00f7")
        buf.write("\u00f8\7\32\2\2\u00f8\u0102\t\3\2\2\u00f9\u00fa\7\33\2")
        buf.write("\2\u00fa\u00fb\5\62\32\2\u00fb\u00fc\7\34\2\2\u00fc\u0102")
        buf.write("\3\2\2\2\u00fd\u00fe\5\66\34\2\u00fe\u00ff\5\62\32\7\u00ff")
        buf.write("\u0102\3\2\2\2\u0100\u0102\58\35\2\u0101\u00f4\3\2\2\2")
        buf.write("\u0101\u00f6\3\2\2\2\u0101\u00f9\3\2\2\2\u0101\u00fd\3")
        buf.write("\2\2\2\u0101\u0100\3\2\2\2\u0102\u010f\3\2\2\2\u0103\u0104")
        buf.write("\f\6\2\2\u0104\u0105\5\64\33\2\u0105\u0106\5\62\32\7\u0106")
        buf.write("\u010e\3\2\2\2\u0107\u0108\f\5\2\2\u0108\u0109\7#\2\2")
        buf.write("\u0109\u010e\5\62\32\6\u010a\u010b\f\4\2\2\u010b\u010c")
        buf.write("\7$\2\2\u010c\u010e\5\62\32\5\u010d\u0103\3\2\2\2\u010d")
        buf.write("\u0107\3\2\2\2\u010d\u010a\3\2\2\2\u010e\u0111\3\2\2\2")
        buf.write("\u010f\u010d\3\2\2\2\u010f\u0110\3\2\2\2\u0110\63\3\2")
        buf.write("\2\2\u0111\u010f\3\2\2\2\u0112\u0113\t\4\2\2\u0113\65")
        buf.write("\3\2\2\2\u0114\u0115\7%\2\2\u0115\67\3\2\2\2\u0116\u0117")
        buf.write("\t\5\2\2\u01179\3\2\2\2!>@GOU^emv{\u0082\u0086\u008d\u0094")
        buf.write("\u0096\u009d\u00a4\u00ab\u00b2\u00b8\u00c1\u00c7\u00ce")
        buf.write("\u00d8\u00df\u00e4\u00eb\u00f2\u0101\u010d\u010f")
        return buf.getvalue()


class LoTLanParser ( Parser ):

    grammarFileName = "LoTLanParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "'Task '", "'TransportOrderStep '", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'End'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'='", "','", "'.'", "'('", "')'", "'<'", 
                     "'<='", "'>'", "'>='", "'=='", "'!='", "'and'", "'or'", 
                     "'!'", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'\"\"'" ]

    symbolicNames = [ "<INVALID>", "TEMPLATE", "TASK", "TRANSPORT_ORDER_STEP", 
                      "INSTANCE", "WHITESPACE", "COMMENT", "NEW_LINE", "COMMENT_IN_BLOCK", 
                      "COMMENT_LINE_IN_BLOCK", "END_IN_BLOCK", "ASSIGNMENT", 
                      "LOCATION", "PARAMETERS", "REPEAT", "CONSTRAINTS", 
                      "TRANSPORT", "FROM", "TO", "ON_DONE", "TRIGGERED_BY", 
                      "FINISHED_BY", "EQUAL", "COMMA", "DOT", "E_LEFT_PARENTHESIS", 
                      "E_RIGHT_PARENTHESIS", "E_LESS_THAN", "E_LESS_THAN_OR_EQUAL", 
                      "E_GREATER_THAN", "E_GREATER_THAN_OR_EQUAL", "E_EQUAL", 
                      "E_NOT_EQUAL", "E_BOOLEAN_AND", "E_BOOLEAN_OR", "E_BOOLEAN_NOT", 
                      "E_TRUE", "E_FALSE", "STARTS_WITH_LOWER_C_STR", "STARTS_WITH_UPPER_C_STR", 
                      "STRING_VALUE", "NUMERIC_VALUE", "EMPTY_VALUE", "INTEGER", 
                      "FLOAT", "WHITESPACE_BLOCK" ]

    RULE_program = 0
    RULE_template = 1
    RULE_templateStart = 2
    RULE_instance = 3
    RULE_instanceStart = 4
    RULE_memberVariable = 5
    RULE_value = 6
    RULE_transportOrderStep = 7
    RULE_tosStart = 8
    RULE_tosStatement = 9
    RULE_locationStatement = 10
    RULE_optTosStatement = 11
    RULE_eventStatement = 12
    RULE_onDoneStatement = 13
    RULE_parameterStatement = 14
    RULE_task = 15
    RULE_taskStart = 16
    RULE_taskStatement = 17
    RULE_constraintsStatement = 18
    RULE_transportOrder = 19
    RULE_fromStatement = 20
    RULE_toStatement = 21
    RULE_parameters = 22
    RULE_repeatStatement = 23
    RULE_expression = 24
    RULE_binOperation = 25
    RULE_unOperation = 26
    RULE_con = 27

    ruleNames =  [ "program", "template", "templateStart", "instance", "instanceStart", 
                   "memberVariable", "value", "transportOrderStep", "tosStart", 
                   "tosStatement", "locationStatement", "optTosStatement", 
                   "eventStatement", "onDoneStatement", "parameterStatement", 
                   "task", "taskStart", "taskStatement", "constraintsStatement", 
                   "transportOrder", "fromStatement", "toStatement", "parameters", 
                   "repeatStatement", "expression", "binOperation", "unOperation", 
                   "con" ]

    EOF = Token.EOF
    TEMPLATE=1
    TASK=2
    TRANSPORT_ORDER_STEP=3
    INSTANCE=4
    WHITESPACE=5
    COMMENT=6
    NEW_LINE=7
    COMMENT_IN_BLOCK=8
    COMMENT_LINE_IN_BLOCK=9
    END_IN_BLOCK=10
    ASSIGNMENT=11
    LOCATION=12
    PARAMETERS=13
    REPEAT=14
    CONSTRAINTS=15
    TRANSPORT=16
    FROM=17
    TO=18
    ON_DONE=19
    TRIGGERED_BY=20
    FINISHED_BY=21
    EQUAL=22
    COMMA=23
    DOT=24
    E_LEFT_PARENTHESIS=25
    E_RIGHT_PARENTHESIS=26
    E_LESS_THAN=27
    E_LESS_THAN_OR_EQUAL=28
    E_GREATER_THAN=29
    E_GREATER_THAN_OR_EQUAL=30
    E_EQUAL=31
    E_NOT_EQUAL=32
    E_BOOLEAN_AND=33
    E_BOOLEAN_OR=34
    E_BOOLEAN_NOT=35
    E_TRUE=36
    E_FALSE=37
    STARTS_WITH_LOWER_C_STR=38
    STARTS_WITH_UPPER_C_STR=39
    STRING_VALUE=40
    NUMERIC_VALUE=41
    EMPTY_VALUE=42
    INTEGER=43
    FLOAT=44
    WHITESPACE_BLOCK=45

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




    class ProgramContext(ParserRuleContext):

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

        def template(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.TemplateContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.TemplateContext,i)


        def instance(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.InstanceContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.InstanceContext,i)


        def task(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.TaskContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.TaskContext,i)


        def transportOrderStep(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.TransportOrderStepContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.TransportOrderStepContext,i)


        def getRuleIndex(self):
            return LoTLanParser.RULE_program

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

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

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




    def program(self):

        localctx = LoTLanParser.ProgramContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_program)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 62
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.TEMPLATE) | (1 << LoTLanParser.TASK) | (1 << LoTLanParser.TRANSPORT_ORDER_STEP) | (1 << LoTLanParser.INSTANCE))) != 0):
                self.state = 60
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [LoTLanParser.TEMPLATE]:
                    self.state = 56
                    self.template()
                    pass
                elif token in [LoTLanParser.INSTANCE]:
                    self.state = 57
                    self.instance()
                    pass
                elif token in [LoTLanParser.TASK]:
                    self.state = 58
                    self.task()
                    pass
                elif token in [LoTLanParser.TRANSPORT_ORDER_STEP]:
                    self.state = 59
                    self.transportOrderStep()
                    pass
                else:
                    raise NoViableAltException(self)

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

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


    class TemplateContext(ParserRuleContext):

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

        def templateStart(self):
            return self.getTypedRuleContext(LoTLanParser.TemplateStartContext,0)


        def END_IN_BLOCK(self):
            return self.getToken(LoTLanParser.END_IN_BLOCK, 0)

        def memberVariable(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.MemberVariableContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.MemberVariableContext,i)


        def getRuleIndex(self):
            return LoTLanParser.RULE_template

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

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

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




    def template(self):

        localctx = LoTLanParser.TemplateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_template)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 65
            self.templateStart()
            self.state = 67 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 66
                self.memberVariable()
                self.state = 69 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.ASSIGNMENT):
                    break

            self.state = 71
            self.match(LoTLanParser.END_IN_BLOCK)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TemplateStartContext(ParserRuleContext):

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

        def TEMPLATE(self):
            return self.getToken(LoTLanParser.TEMPLATE, 0)

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_templateStart

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

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

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




    def templateStart(self):

        localctx = LoTLanParser.TemplateStartContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_templateStart)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 73
            self.match(LoTLanParser.TEMPLATE)
            self.state = 75 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 74
                self.match(LoTLanParser.NEW_LINE)
                self.state = 77 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class InstanceContext(ParserRuleContext):

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

        def instanceStart(self):
            return self.getTypedRuleContext(LoTLanParser.InstanceStartContext,0)


        def END_IN_BLOCK(self):
            return self.getToken(LoTLanParser.END_IN_BLOCK, 0)

        def memberVariable(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.MemberVariableContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.MemberVariableContext,i)


        def getRuleIndex(self):
            return LoTLanParser.RULE_instance

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

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

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




    def instance(self):

        localctx = LoTLanParser.InstanceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_instance)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 79
            self.instanceStart()
            self.state = 81 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 80
                self.memberVariable()
                self.state = 83 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.ASSIGNMENT):
                    break

            self.state = 85
            self.match(LoTLanParser.END_IN_BLOCK)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class InstanceStartContext(ParserRuleContext):

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

        def INSTANCE(self):
            return self.getToken(LoTLanParser.INSTANCE, 0)

        def STARTS_WITH_LOWER_C_STR(self):
            return self.getToken(LoTLanParser.STARTS_WITH_LOWER_C_STR, 0)

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_instanceStart

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

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

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




    def instanceStart(self):

        localctx = LoTLanParser.InstanceStartContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_instanceStart)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 87
            self.match(LoTLanParser.INSTANCE)
            self.state = 88
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 90 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 89
                self.match(LoTLanParser.NEW_LINE)
                self.state = 92 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class MemberVariableContext(ParserRuleContext):

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

        def ASSIGNMENT(self):
            return self.getToken(LoTLanParser.ASSIGNMENT, 0)

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


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

        def getRuleIndex(self):
            return LoTLanParser.RULE_memberVariable

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

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

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




    def memberVariable(self):

        localctx = LoTLanParser.MemberVariableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_memberVariable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 94
            self.match(LoTLanParser.ASSIGNMENT)
            self.state = 95
            self.value()
            self.state = 97 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 96
                self.match(LoTLanParser.NEW_LINE)
                self.state = 99 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class ValueContext(ParserRuleContext):

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

        def STRING_VALUE(self):
            return self.getToken(LoTLanParser.STRING_VALUE, 0)

        def NUMERIC_VALUE(self):
            return self.getToken(LoTLanParser.NUMERIC_VALUE, 0)

        def EMPTY_VALUE(self):
            return self.getToken(LoTLanParser.EMPTY_VALUE, 0)

        def INTEGER(self):
            return self.getToken(LoTLanParser.INTEGER, 0)

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_value

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

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

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




    def value(self):

        localctx = LoTLanParser.ValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_value)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 101
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.STRING_VALUE) | (1 << LoTLanParser.NUMERIC_VALUE) | (1 << LoTLanParser.EMPTY_VALUE) | (1 << LoTLanParser.INTEGER) | (1 << LoTLanParser.FLOAT))) != 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 TransportOrderStepContext(ParserRuleContext):

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

        def tosStart(self):
            return self.getTypedRuleContext(LoTLanParser.TosStartContext,0)


        def END_IN_BLOCK(self):
            return self.getToken(LoTLanParser.END_IN_BLOCK, 0)

        def tosStatement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.TosStatementContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.TosStatementContext,i)


        def getRuleIndex(self):
            return LoTLanParser.RULE_transportOrderStep

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

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

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




    def transportOrderStep(self):

        localctx = LoTLanParser.TransportOrderStepContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_transportOrderStep)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 103
            self.tosStart()
            self.state = 105 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 104
                self.tosStatement()
                self.state = 107 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.LOCATION) | (1 << LoTLanParser.PARAMETERS) | (1 << LoTLanParser.ON_DONE) | (1 << LoTLanParser.TRIGGERED_BY) | (1 << LoTLanParser.FINISHED_BY))) != 0)):
                    break

            self.state = 109
            self.match(LoTLanParser.END_IN_BLOCK)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TosStartContext(ParserRuleContext):

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

        def TRANSPORT_ORDER_STEP(self):
            return self.getToken(LoTLanParser.TRANSPORT_ORDER_STEP, 0)

        def STARTS_WITH_LOWER_C_STR(self):
            return self.getToken(LoTLanParser.STARTS_WITH_LOWER_C_STR, 0)

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_tosStart

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

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

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




    def tosStart(self):

        localctx = LoTLanParser.TosStartContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_tosStart)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 111
            self.match(LoTLanParser.TRANSPORT_ORDER_STEP)
            self.state = 112
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 114 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 113
                self.match(LoTLanParser.NEW_LINE)
                self.state = 116 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class TosStatementContext(ParserRuleContext):

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

        def optTosStatement(self):
            return self.getTypedRuleContext(LoTLanParser.OptTosStatementContext,0)


        def locationStatement(self):
            return self.getTypedRuleContext(LoTLanParser.LocationStatementContext,0)


        def parameterStatement(self):
            return self.getTypedRuleContext(LoTLanParser.ParameterStatementContext,0)


        def getRuleIndex(self):
            return LoTLanParser.RULE_tosStatement

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

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

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




    def tosStatement(self):

        localctx = LoTLanParser.TosStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_tosStatement)
        try:
            self.state = 121
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LoTLanParser.ON_DONE, LoTLanParser.TRIGGERED_BY, LoTLanParser.FINISHED_BY]:
                self.enterOuterAlt(localctx, 1)
                self.state = 118
                self.optTosStatement()
                pass
            elif token in [LoTLanParser.LOCATION]:
                self.enterOuterAlt(localctx, 2)
                self.state = 119
                self.locationStatement()
                pass
            elif token in [LoTLanParser.PARAMETERS]:
                self.enterOuterAlt(localctx, 3)
                self.state = 120
                self.parameterStatement()
                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 LocationStatementContext(ParserRuleContext):

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

        def LOCATION(self):
            return self.getToken(LoTLanParser.LOCATION, 0)

        def STARTS_WITH_LOWER_C_STR(self):
            return self.getToken(LoTLanParser.STARTS_WITH_LOWER_C_STR, 0)

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_locationStatement

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

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

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




    def locationStatement(self):

        localctx = LoTLanParser.LocationStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_locationStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 123
            self.match(LoTLanParser.LOCATION)
            self.state = 124
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 126 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 125
                self.match(LoTLanParser.NEW_LINE)
                self.state = 128 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class OptTosStatementContext(ParserRuleContext):

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

        def eventStatement(self):
            return self.getTypedRuleContext(LoTLanParser.EventStatementContext,0)


        def onDoneStatement(self):
            return self.getTypedRuleContext(LoTLanParser.OnDoneStatementContext,0)


        def getRuleIndex(self):
            return LoTLanParser.RULE_optTosStatement

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

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

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




    def optTosStatement(self):

        localctx = LoTLanParser.OptTosStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_optTosStatement)
        try:
            self.state = 132
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LoTLanParser.TRIGGERED_BY, LoTLanParser.FINISHED_BY]:
                self.enterOuterAlt(localctx, 1)
                self.state = 130
                self.eventStatement()
                pass
            elif token in [LoTLanParser.ON_DONE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 131
                self.onDoneStatement()
                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 EventStatementContext(ParserRuleContext):

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

        def TRIGGERED_BY(self):
            return self.getToken(LoTLanParser.TRIGGERED_BY, 0)

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


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

        def FINISHED_BY(self):
            return self.getToken(LoTLanParser.FINISHED_BY, 0)

        def getRuleIndex(self):
            return LoTLanParser.RULE_eventStatement

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

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

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




    def eventStatement(self):

        localctx = LoTLanParser.EventStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_eventStatement)
        self._la = 0 # Token type
        try:
            self.state = 148
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LoTLanParser.TRIGGERED_BY]:
                self.enterOuterAlt(localctx, 1)
                self.state = 134
                self.match(LoTLanParser.TRIGGERED_BY)
                self.state = 135
                self.expression(0)
                self.state = 137 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 136
                    self.match(LoTLanParser.NEW_LINE)
                    self.state = 139 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==LoTLanParser.NEW_LINE):
                        break

                pass
            elif token in [LoTLanParser.FINISHED_BY]:
                self.enterOuterAlt(localctx, 2)
                self.state = 141
                self.match(LoTLanParser.FINISHED_BY)
                self.state = 142
                self.expression(0)
                self.state = 144 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 143
                    self.match(LoTLanParser.NEW_LINE)
                    self.state = 146 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==LoTLanParser.NEW_LINE):
                        break

                pass
            else:
                raise NoViableAltException(self)

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


    class OnDoneStatementContext(ParserRuleContext):

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

        def ON_DONE(self):
            return self.getToken(LoTLanParser.ON_DONE, 0)

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

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

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_onDoneStatement

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

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

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




    def onDoneStatement(self):

        localctx = LoTLanParser.OnDoneStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_onDoneStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 150
            self.match(LoTLanParser.ON_DONE)
            self.state = 155
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,15,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 151
                    self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
                    self.state = 152
                    self.match(LoTLanParser.COMMA) 
                self.state = 157
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,15,self._ctx)

            self.state = 158
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 160 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 159
                self.match(LoTLanParser.NEW_LINE)
                self.state = 162 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class ParameterStatementContext(ParserRuleContext):

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

        def PARAMETERS(self):
            return self.getToken(LoTLanParser.PARAMETERS, 0)

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

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

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_parameterStatement

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

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

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




    def parameterStatement(self):

        localctx = LoTLanParser.ParameterStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_parameterStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 164
            self.match(LoTLanParser.PARAMETERS)
            self.state = 169
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,17,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 165
                    self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
                    self.state = 166
                    self.match(LoTLanParser.COMMA) 
                self.state = 171
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,17,self._ctx)

            self.state = 172
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 174 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 173
                self.match(LoTLanParser.NEW_LINE)
                self.state = 176 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class TaskContext(ParserRuleContext):

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

        def taskStart(self):
            return self.getTypedRuleContext(LoTLanParser.TaskStartContext,0)


        def END_IN_BLOCK(self):
            return self.getToken(LoTLanParser.END_IN_BLOCK, 0)

        def taskStatement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LoTLanParser.TaskStatementContext)
            else:
                return self.getTypedRuleContext(LoTLanParser.TaskStatementContext,i)


        def getRuleIndex(self):
            return LoTLanParser.RULE_task

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

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

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




    def task(self):

        localctx = LoTLanParser.TaskContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_task)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 178
            self.taskStart()
            self.state = 180 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 179
                self.taskStatement()
                self.state = 182 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.REPEAT) | (1 << LoTLanParser.CONSTRAINTS) | (1 << LoTLanParser.TRANSPORT) | (1 << LoTLanParser.ON_DONE) | (1 << LoTLanParser.TRIGGERED_BY) | (1 << LoTLanParser.FINISHED_BY))) != 0)):
                    break

            self.state = 184
            self.match(LoTLanParser.END_IN_BLOCK)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TaskStartContext(ParserRuleContext):

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

        def TASK(self):
            return self.getToken(LoTLanParser.TASK, 0)

        def STARTS_WITH_LOWER_C_STR(self):
            return self.getToken(LoTLanParser.STARTS_WITH_LOWER_C_STR, 0)

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_taskStart

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

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

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




    def taskStart(self):

        localctx = LoTLanParser.TaskStartContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_taskStart)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 186
            self.match(LoTLanParser.TASK)
            self.state = 187
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 189 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 188
                self.match(LoTLanParser.NEW_LINE)
                self.state = 191 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class TaskStatementContext(ParserRuleContext):

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

        def transportOrder(self):
            return self.getTypedRuleContext(LoTLanParser.TransportOrderContext,0)


        def optTosStatement(self):
            return self.getTypedRuleContext(LoTLanParser.OptTosStatementContext,0)


        def repeatStatement(self):
            return self.getTypedRuleContext(LoTLanParser.RepeatStatementContext,0)


        def constraintsStatement(self):
            return self.getTypedRuleContext(LoTLanParser.ConstraintsStatementContext,0)


        def getRuleIndex(self):
            return LoTLanParser.RULE_taskStatement

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

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

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




    def taskStatement(self):

        localctx = LoTLanParser.TaskStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_taskStatement)
        try:
            self.state = 197
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LoTLanParser.TRANSPORT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 193
                self.transportOrder()
                pass
            elif token in [LoTLanParser.ON_DONE, LoTLanParser.TRIGGERED_BY, LoTLanParser.FINISHED_BY]:
                self.enterOuterAlt(localctx, 2)
                self.state = 194
                self.optTosStatement()
                pass
            elif token in [LoTLanParser.REPEAT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 195
                self.repeatStatement()
                pass
            elif token in [LoTLanParser.CONSTRAINTS]:
                self.enterOuterAlt(localctx, 4)
                self.state = 196
                self.constraintsStatement()
                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 ConstraintsStatementContext(ParserRuleContext):

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

        def CONSTRAINTS(self):
            return self.getToken(LoTLanParser.CONSTRAINTS, 0)

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


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

        def getRuleIndex(self):
            return LoTLanParser.RULE_constraintsStatement

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

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

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




    def constraintsStatement(self):

        localctx = LoTLanParser.ConstraintsStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_constraintsStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 199
            self.match(LoTLanParser.CONSTRAINTS)
            self.state = 200
            self.expression(0)
            self.state = 202 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 201
                self.match(LoTLanParser.NEW_LINE)
                self.state = 204 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class TransportOrderContext(ParserRuleContext):

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

        def TRANSPORT(self):
            return self.getToken(LoTLanParser.TRANSPORT, 0)

        def NEW_LINE(self):
            return self.getToken(LoTLanParser.NEW_LINE, 0)

        def fromStatement(self):
            return self.getTypedRuleContext(LoTLanParser.FromStatementContext,0)


        def toStatement(self):
            return self.getTypedRuleContext(LoTLanParser.ToStatementContext,0)


        def getRuleIndex(self):
            return LoTLanParser.RULE_transportOrder

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

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

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




    def transportOrder(self):

        localctx = LoTLanParser.TransportOrderContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_transportOrder)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 206
            self.match(LoTLanParser.TRANSPORT)
            self.state = 207
            self.match(LoTLanParser.NEW_LINE)
            self.state = 208
            self.fromStatement()
            self.state = 209
            self.toStatement()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FromStatementContext(ParserRuleContext):

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

        def FROM(self):
            return self.getToken(LoTLanParser.FROM, 0)

        def STARTS_WITH_LOWER_C_STR(self):
            return self.getToken(LoTLanParser.STARTS_WITH_LOWER_C_STR, 0)

        def NEW_LINE(self):
            return self.getToken(LoTLanParser.NEW_LINE, 0)

        def parameters(self):
            return self.getTypedRuleContext(LoTLanParser.ParametersContext,0)


        def getRuleIndex(self):
            return LoTLanParser.RULE_fromStatement

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

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

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




    def fromStatement(self):

        localctx = LoTLanParser.FromStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_fromStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 211
            self.match(LoTLanParser.FROM)
            self.state = 212
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 214
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.STRING_VALUE) | (1 << LoTLanParser.NUMERIC_VALUE) | (1 << LoTLanParser.EMPTY_VALUE) | (1 << LoTLanParser.INTEGER) | (1 << LoTLanParser.FLOAT))) != 0):
                self.state = 213
                self.parameters()


            self.state = 216
            self.match(LoTLanParser.NEW_LINE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ToStatementContext(ParserRuleContext):

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

        def TO(self):
            return self.getToken(LoTLanParser.TO, 0)

        def STARTS_WITH_LOWER_C_STR(self):
            return self.getToken(LoTLanParser.STARTS_WITH_LOWER_C_STR, 0)

        def parameters(self):
            return self.getTypedRuleContext(LoTLanParser.ParametersContext,0)


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

        def getRuleIndex(self):
            return LoTLanParser.RULE_toStatement

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

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

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




    def toStatement(self):

        localctx = LoTLanParser.ToStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_toStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 218
            self.match(LoTLanParser.TO)
            self.state = 219
            self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
            self.state = 221
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.STRING_VALUE) | (1 << LoTLanParser.NUMERIC_VALUE) | (1 << LoTLanParser.EMPTY_VALUE) | (1 << LoTLanParser.INTEGER) | (1 << LoTLanParser.FLOAT))) != 0):
                self.state = 220
                self.parameters()


            self.state = 224 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 223
                self.match(LoTLanParser.NEW_LINE)
                self.state = 226 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class ParametersContext(ParserRuleContext):

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

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


        def COMMA(self):
            return self.getToken(LoTLanParser.COMMA, 0)

        def parameters(self):
            return self.getTypedRuleContext(LoTLanParser.ParametersContext,0)


        def getRuleIndex(self):
            return LoTLanParser.RULE_parameters

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

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

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




    def parameters(self):

        localctx = LoTLanParser.ParametersContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_parameters)
        try:
            self.state = 233
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,26,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 228
                self.value()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 229
                self.value()
                self.state = 230
                self.match(LoTLanParser.COMMA)
                self.state = 231
                self.parameters()
                pass


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


    class RepeatStatementContext(ParserRuleContext):

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

        def REPEAT(self):
            return self.getToken(LoTLanParser.REPEAT, 0)

        def INTEGER(self):
            return self.getToken(LoTLanParser.INTEGER, 0)

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

        def getRuleIndex(self):
            return LoTLanParser.RULE_repeatStatement

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

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

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




    def repeatStatement(self):

        localctx = LoTLanParser.RepeatStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_repeatStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 235
            self.match(LoTLanParser.REPEAT)
            self.state = 236
            self.match(LoTLanParser.INTEGER)
            self.state = 238 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 237
                self.match(LoTLanParser.NEW_LINE)
                self.state = 240 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LoTLanParser.NEW_LINE):
                    break

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


    class ExpressionContext(ParserRuleContext):

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

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

        def DOT(self):
            return self.getToken(LoTLanParser.DOT, 0)

        def STARTS_WITH_UPPER_C_STR(self):
            return self.getToken(LoTLanParser.STARTS_WITH_UPPER_C_STR, 0)

        def E_LEFT_PARENTHESIS(self):
            return self.getToken(LoTLanParser.E_LEFT_PARENTHESIS, 0)

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


        def E_RIGHT_PARENTHESIS(self):
            return self.getToken(LoTLanParser.E_RIGHT_PARENTHESIS, 0)

        def unOperation(self):
            return self.getTypedRuleContext(LoTLanParser.UnOperationContext,0)


        def con(self):
            return self.getTypedRuleContext(LoTLanParser.ConContext,0)


        def binOperation(self):
            return self.getTypedRuleContext(LoTLanParser.BinOperationContext,0)


        def E_BOOLEAN_AND(self):
            return self.getToken(LoTLanParser.E_BOOLEAN_AND, 0)

        def E_BOOLEAN_OR(self):
            return self.getToken(LoTLanParser.E_BOOLEAN_OR, 0)

        def getRuleIndex(self):
            return LoTLanParser.RULE_expression

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

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

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



    def expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = LoTLanParser.ExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 48
        self.enterRecursionRule(localctx, 48, self.RULE_expression, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 255
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,28,self._ctx)
            if la_ == 1:
                self.state = 243
                self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
                pass

            elif la_ == 2:
                self.state = 244
                self.match(LoTLanParser.STARTS_WITH_LOWER_C_STR)
                self.state = 245
                self.match(LoTLanParser.DOT)
                self.state = 246
                _la = self._input.LA(1)
                if not(_la==LoTLanParser.STARTS_WITH_LOWER_C_STR or _la==LoTLanParser.STARTS_WITH_UPPER_C_STR):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 3:
                self.state = 247
                self.match(LoTLanParser.E_LEFT_PARENTHESIS)
                self.state = 248
                self.expression(0)
                self.state = 249
                self.match(LoTLanParser.E_RIGHT_PARENTHESIS)
                pass

            elif la_ == 4:
                self.state = 251
                self.unOperation()
                self.state = 252
                self.expression(5)
                pass

            elif la_ == 5:
                self.state = 254
                self.con()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 269
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,30,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 267
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,29,self._ctx)
                    if la_ == 1:
                        localctx = LoTLanParser.ExpressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 257
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 258
                        self.binOperation()
                        self.state = 259
                        self.expression(5)
                        pass

                    elif la_ == 2:
                        localctx = LoTLanParser.ExpressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 261
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 262
                        self.match(LoTLanParser.E_BOOLEAN_AND)
                        self.state = 263
                        self.expression(4)
                        pass

                    elif la_ == 3:
                        localctx = LoTLanParser.ExpressionContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 264
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 265
                        self.match(LoTLanParser.E_BOOLEAN_OR)
                        self.state = 266
                        self.expression(3)
                        pass

             
                self.state = 271
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,30,self._ctx)

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


    class BinOperationContext(ParserRuleContext):

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

        def E_LESS_THAN(self):
            return self.getToken(LoTLanParser.E_LESS_THAN, 0)

        def E_LESS_THAN_OR_EQUAL(self):
            return self.getToken(LoTLanParser.E_LESS_THAN_OR_EQUAL, 0)

        def E_GREATER_THAN(self):
            return self.getToken(LoTLanParser.E_GREATER_THAN, 0)

        def E_GREATER_THAN_OR_EQUAL(self):
            return self.getToken(LoTLanParser.E_GREATER_THAN_OR_EQUAL, 0)

        def E_EQUAL(self):
            return self.getToken(LoTLanParser.E_EQUAL, 0)

        def E_NOT_EQUAL(self):
            return self.getToken(LoTLanParser.E_NOT_EQUAL, 0)

        def getRuleIndex(self):
            return LoTLanParser.RULE_binOperation

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

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

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




    def binOperation(self):

        localctx = LoTLanParser.BinOperationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_binOperation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 272
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.E_LESS_THAN) | (1 << LoTLanParser.E_LESS_THAN_OR_EQUAL) | (1 << LoTLanParser.E_GREATER_THAN) | (1 << LoTLanParser.E_GREATER_THAN_OR_EQUAL) | (1 << LoTLanParser.E_EQUAL) | (1 << LoTLanParser.E_NOT_EQUAL))) != 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 UnOperationContext(ParserRuleContext):

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

        def E_BOOLEAN_NOT(self):
            return self.getToken(LoTLanParser.E_BOOLEAN_NOT, 0)

        def getRuleIndex(self):
            return LoTLanParser.RULE_unOperation

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

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

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




    def unOperation(self):

        localctx = LoTLanParser.UnOperationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_unOperation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 274
            self.match(LoTLanParser.E_BOOLEAN_NOT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ConContext(ParserRuleContext):

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

        def E_TRUE(self):
            return self.getToken(LoTLanParser.E_TRUE, 0)

        def E_FALSE(self):
            return self.getToken(LoTLanParser.E_FALSE, 0)

        def INTEGER(self):
            return self.getToken(LoTLanParser.INTEGER, 0)

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

        def STRING_VALUE(self):
            return self.getToken(LoTLanParser.STRING_VALUE, 0)

        def getRuleIndex(self):
            return LoTLanParser.RULE_con

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

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

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




    def con(self):

        localctx = LoTLanParser.ConContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_con)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 276
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LoTLanParser.E_TRUE) | (1 << LoTLanParser.E_FALSE) | (1 << LoTLanParser.STRING_VALUE) | (1 << LoTLanParser.INTEGER) | (1 << LoTLanParser.FLOAT))) != 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



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[24] = self.expression_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def expression_sempred(self, localctx:ExpressionContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 4)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 2:
                return self.precpred(self._ctx, 2)
         




