# Generated from /Users/npohilets/compiler-peer-group/zeampl/parser/Zeampl.g4 by ANTLR 4.5.3
# encoding: utf-8
from antlr4 import *
from io import StringIO

def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3<")
        buf.write("\u0156\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\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\3\2\7")
        buf.write("\2L\n\2\f\2\16\2O\13\2\3\3\3\3\3\3\3\3\5\3U\n\3\3\4\3")
        buf.write("\4\3\4\3\4\3\4\5\4\\\n\4\3\4\3\4\3\5\3\5\3\5\5\5c\n\5")
        buf.write("\3\5\3\5\5\5g\n\5\3\5\3\5\5\5k\n\5\3\5\3\5\3\6\3\6\3\6")
        buf.write("\7\6r\n\6\f\6\16\6u\13\6\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3")
        buf.write("\b\3\b\3\t\3\t\3\t\3\t\7\t\u0084\n\t\f\t\16\t\u0087\13")
        buf.write("\t\3\t\3\t\3\n\3\n\3\n\5\n\u008e\n\n\3\13\3\13\3\f\3\f")
        buf.write("\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u009c\n\r\f\r\16")
        buf.write("\r\u009f\13\r\5\r\u00a1\n\r\5\r\u00a3\n\r\3\r\3\r\3\16")
        buf.write("\3\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00af\n\16\3")
        buf.write("\17\3\17\7\17\u00b3\n\17\f\17\16\17\u00b6\13\17\3\17\3")
        buf.write("\17\3\20\3\20\3\20\3\20\5\20\u00be\n\20\3\20\3\20\3\21")
        buf.write("\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\7\22\u00cb\n")
        buf.write("\22\f\22\16\22\u00ce\13\22\3\22\3\22\5\22\u00d2\n\22\3")
        buf.write("\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\25")
        buf.write("\3\25\5\25\u00e0\n\25\3\25\3\25\3\26\3\26\3\26\3\27\3")
        buf.write("\27\3\27\3\30\3\30\3\30\3\30\3\30\5\30\u00ef\n\30\3\30")
        buf.write("\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30")
        buf.write("\7\30\u00fd\n\30\f\30\16\30\u0100\13\30\3\31\3\31\3\32")
        buf.write("\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35")
        buf.write("\3\35\3\35\3\35\3\35\3\35\7\35\u0115\n\35\f\35\16\35\u0118")
        buf.write("\13\35\3\35\3\35\7\35\u011c\n\35\f\35\16\35\u011f\13\35")
        buf.write("\3\36\3\36\3\36\3\36\3\36\3\36\5\36\u0127\n\36\3\37\3")
        buf.write("\37\3 \3 \3 \3 \3 \5 \u0130\n \3!\3!\3\"\3\"\3#\3#\3$")
        buf.write("\3$\3$\3$\3$\3$\7$\u013e\n$\f$\16$\u0141\13$\5$\u0143")
        buf.write("\n$\5$\u0145\n$\3$\3$\3%\3%\3%\3%\7%\u014d\n%\f%\16%\u0150")
        buf.write("\13%\5%\u0152\n%\3%\3%\3%\2\4.8&\2\4\6\b\n\f\16\20\22")
        buf.write("\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFH\2\7\4")
        buf.write("\2\4\4\22\34\3\2&+\3\2,/\3\2\60\65\4\2,-\66\66\u015e\2")
        buf.write("M\3\2\2\2\4T\3\2\2\2\6V\3\2\2\2\bb\3\2\2\2\nn\3\2\2\2")
        buf.write("\fv\3\2\2\2\16y\3\2\2\2\20\177\3\2\2\2\22\u008d\3\2\2")
        buf.write("\2\24\u008f\3\2\2\2\26\u0091\3\2\2\2\30\u0095\3\2\2\2")
        buf.write("\32\u00ae\3\2\2\2\34\u00b0\3\2\2\2\36\u00b9\3\2\2\2 \u00c1")
        buf.write("\3\2\2\2\"\u00c3\3\2\2\2$\u00d3\3\2\2\2&\u00d7\3\2\2\2")
        buf.write("(\u00dd\3\2\2\2*\u00e3\3\2\2\2,\u00e6\3\2\2\2.\u00ee\3")
        buf.write("\2\2\2\60\u0101\3\2\2\2\62\u0103\3\2\2\2\64\u0105\3\2")
        buf.write("\2\2\66\u0107\3\2\2\28\u0109\3\2\2\2:\u0126\3\2\2\2<\u0128")
        buf.write("\3\2\2\2>\u012f\3\2\2\2@\u0131\3\2\2\2B\u0133\3\2\2\2")
        buf.write("D\u0135\3\2\2\2F\u0137\3\2\2\2H\u0148\3\2\2\2JL\5\4\3")
        buf.write("\2KJ\3\2\2\2LO\3\2\2\2MK\3\2\2\2MN\3\2\2\2N\3\3\2\2\2")
        buf.write("OM\3\2\2\2PU\5\6\4\2QU\5\b\5\2RU\5\16\b\2SU\5\20\t\2T")
        buf.write("P\3\2\2\2TQ\3\2\2\2TR\3\2\2\2TS\3\2\2\2U\5\3\2\2\2VW\7")
        buf.write("\3\2\2WX\79\2\2X[\5\22\n\2YZ\7\4\2\2Z\\\5.\30\2[Y\3\2")
        buf.write("\2\2[\\\3\2\2\2\\]\3\2\2\2]^\7\5\2\2^\7\3\2\2\2_`\7\6")
        buf.write("\2\2`c\79\2\2ac\7\7\2\2b_\3\2\2\2ba\3\2\2\2cd\3\2\2\2")
        buf.write("df\7\b\2\2eg\5\n\6\2fe\3\2\2\2fg\3\2\2\2gh\3\2\2\2hj\7")
        buf.write("\t\2\2ik\5\22\n\2ji\3\2\2\2jk\3\2\2\2kl\3\2\2\2lm\5\34")
        buf.write("\17\2m\t\3\2\2\2ns\5\f\7\2op\7\n\2\2pr\5\f\7\2qo\3\2\2")
        buf.write("\2ru\3\2\2\2sq\3\2\2\2st\3\2\2\2t\13\3\2\2\2us\3\2\2\2")
        buf.write("vw\7\13\2\2wx\5\22\n\2x\r\3\2\2\2yz\7\f\2\2z{\79\2\2{")
        buf.write("|\7\4\2\2|}\5\22\n\2}~\7\5\2\2~\17\3\2\2\2\177\u0080\7")
        buf.write("\r\2\2\u0080\u0081\79\2\2\u0081\u0085\7\16\2\2\u0082\u0084")
        buf.write("\5\4\3\2\u0083\u0082\3\2\2\2\u0084\u0087\3\2\2\2\u0085")
        buf.write("\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u0088\3\2\2\2")
        buf.write("\u0087\u0085\3\2\2\2\u0088\u0089\7\17\2\2\u0089\21\3\2")
        buf.write("\2\2\u008a\u008e\5\24\13\2\u008b\u008e\5\26\f\2\u008c")
        buf.write("\u008e\5\30\r\2\u008d\u008a\3\2\2\2\u008d\u008b\3\2\2")
        buf.write("\2\u008d\u008c\3\2\2\2\u008e\23\3\2\2\2\u008f\u0090\7")
        buf.write("9\2\2\u0090\25\3\2\2\2\u0091\u0092\7\20\2\2\u0092\u0093")
        buf.write("\5\22\n\2\u0093\u0094\7\21\2\2\u0094\27\3\2\2\2\u0095")
        buf.write("\u00a2\7\b\2\2\u0096\u0097\5\22\n\2\u0097\u00a0\7\n\2")
        buf.write("\2\u0098\u009d\5\22\n\2\u0099\u009a\7\n\2\2\u009a\u009c")
        buf.write("\5\22\n\2\u009b\u0099\3\2\2\2\u009c\u009f\3\2\2\2\u009d")
        buf.write("\u009b\3\2\2\2\u009d\u009e\3\2\2\2\u009e\u00a1\3\2\2\2")
        buf.write("\u009f\u009d\3\2\2\2\u00a0\u0098\3\2\2\2\u00a0\u00a1\3")
        buf.write("\2\2\2\u00a1\u00a3\3\2\2\2\u00a2\u0096\3\2\2\2\u00a2\u00a3")
        buf.write("\3\2\2\2\u00a3\u00a4\3\2\2\2\u00a4\u00a5\7\t\2\2\u00a5")
        buf.write("\31\3\2\2\2\u00a6\u00af\5\34\17\2\u00a7\u00af\5\36\20")
        buf.write("\2\u00a8\u00af\5\"\22\2\u00a9\u00af\5$\23\2\u00aa\u00af")
        buf.write("\5&\24\2\u00ab\u00af\5(\25\2\u00ac\u00af\5*\26\2\u00ad")
        buf.write("\u00af\5,\27\2\u00ae\u00a6\3\2\2\2\u00ae\u00a7\3\2\2\2")
        buf.write("\u00ae\u00a8\3\2\2\2\u00ae\u00a9\3\2\2\2\u00ae\u00aa\3")
        buf.write("\2\2\2\u00ae\u00ab\3\2\2\2\u00ae\u00ac\3\2\2\2\u00ae\u00ad")
        buf.write("\3\2\2\2\u00af\33\3\2\2\2\u00b0\u00b4\7\16\2\2\u00b1\u00b3")
        buf.write("\5\32\16\2\u00b2\u00b1\3\2\2\2\u00b3\u00b6\3\2\2\2\u00b4")
        buf.write("\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\u00b7\3\2\2\2")
        buf.write("\u00b6\u00b4\3\2\2\2\u00b7\u00b8\7\17\2\2\u00b8\35\3\2")
        buf.write("\2\2\u00b9\u00bd\5.\30\2\u00ba\u00bb\5 \21\2\u00bb\u00bc")
        buf.write("\5.\30\2\u00bc\u00be\3\2\2\2\u00bd\u00ba\3\2\2\2\u00bd")
        buf.write("\u00be\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf\u00c0\7\5\2\2")
        buf.write("\u00c0\37\3\2\2\2\u00c1\u00c2\t\2\2\2\u00c2!\3\2\2\2\u00c3")
        buf.write("\u00c4\7\35\2\2\u00c4\u00c5\5.\30\2\u00c5\u00cc\5\34\17")
        buf.write("\2\u00c6\u00c7\7\36\2\2\u00c7\u00c8\5.\30\2\u00c8\u00c9")
        buf.write("\5\34\17\2\u00c9\u00cb\3\2\2\2\u00ca\u00c6\3\2\2\2\u00cb")
        buf.write("\u00ce\3\2\2\2\u00cc\u00ca\3\2\2\2\u00cc\u00cd\3\2\2\2")
        buf.write("\u00cd\u00d1\3\2\2\2\u00ce\u00cc\3\2\2\2\u00cf\u00d0\7")
        buf.write("\37\2\2\u00d0\u00d2\5\34\17\2\u00d1\u00cf\3\2\2\2\u00d1")
        buf.write("\u00d2\3\2\2\2\u00d2#\3\2\2\2\u00d3\u00d4\7 \2\2\u00d4")
        buf.write("\u00d5\5.\30\2\u00d5\u00d6\5\34\17\2\u00d6%\3\2\2\2\u00d7")
        buf.write("\u00d8\7!\2\2\u00d8\u00d9\79\2\2\u00d9\u00da\7\"\2\2\u00da")
        buf.write("\u00db\5.\30\2\u00db\u00dc\5\34\17\2\u00dc\'\3\2\2\2\u00dd")
        buf.write("\u00df\7#\2\2\u00de\u00e0\5.\30\2\u00df\u00de\3\2\2\2")
        buf.write("\u00df\u00e0\3\2\2\2\u00e0\u00e1\3\2\2\2\u00e1\u00e2\7")
        buf.write("\5\2\2\u00e2)\3\2\2\2\u00e3\u00e4\7$\2\2\u00e4\u00e5\7")
        buf.write("\5\2\2\u00e5+\3\2\2\2\u00e6\u00e7\7%\2\2\u00e7\u00e8\7")
        buf.write("\5\2\2\u00e8-\3\2\2\2\u00e9\u00ea\b\30\1\2\u00ea\u00ef")
        buf.write("\58\35\2\u00eb\u00ec\5\66\34\2\u00ec\u00ed\5.\30\6\u00ed")
        buf.write("\u00ef\3\2\2\2\u00ee\u00e9\3\2\2\2\u00ee\u00eb\3\2\2\2")
        buf.write("\u00ef\u00fe\3\2\2\2\u00f0\u00f1\f\5\2\2\u00f1\u00f2\5")
        buf.write("\64\33\2\u00f2\u00f3\5.\30\6\u00f3\u00fd\3\2\2\2\u00f4")
        buf.write("\u00f5\f\4\2\2\u00f5\u00f6\5\62\32\2\u00f6\u00f7\5.\30")
        buf.write("\5\u00f7\u00fd\3\2\2\2\u00f8\u00f9\f\3\2\2\u00f9\u00fa")
        buf.write("\5\60\31\2\u00fa\u00fb\5.\30\4\u00fb\u00fd\3\2\2\2\u00fc")
        buf.write("\u00f0\3\2\2\2\u00fc\u00f4\3\2\2\2\u00fc\u00f8\3\2\2\2")
        buf.write("\u00fd\u0100\3\2\2\2\u00fe\u00fc\3\2\2\2\u00fe\u00ff\3")
        buf.write("\2\2\2\u00ff/\3\2\2\2\u0100\u00fe\3\2\2\2\u0101\u0102")
        buf.write("\t\3\2\2\u0102\61\3\2\2\2\u0103\u0104\t\4\2\2\u0104\63")
        buf.write("\3\2\2\2\u0105\u0106\t\5\2\2\u0106\65\3\2\2\2\u0107\u0108")
        buf.write("\t\6\2\2\u0108\67\3\2\2\2\u0109\u010a\b\35\1\2\u010a\u010b")
        buf.write("\5:\36\2\u010b\u011d\3\2\2\2\u010c\u010d\f\4\2\2\u010d")
        buf.write("\u010e\7\67\2\2\u010e\u011c\79\2\2\u010f\u0110\f\3\2\2")
        buf.write("\u0110\u0111\7\b\2\2\u0111\u0116\5.\30\2\u0112\u0113\7")
        buf.write("\n\2\2\u0113\u0115\5.\30\2\u0114\u0112\3\2\2\2\u0115\u0118")
        buf.write("\3\2\2\2\u0116\u0114\3\2\2\2\u0116\u0117\3\2\2\2\u0117")
        buf.write("\u0119\3\2\2\2\u0118\u0116\3\2\2\2\u0119\u011a\7\t\2\2")
        buf.write("\u011a\u011c\3\2\2\2\u011b\u010c\3\2\2\2\u011b\u010f\3")
        buf.write("\2\2\2\u011c\u011f\3\2\2\2\u011d\u011b\3\2\2\2\u011d\u011e")
        buf.write("\3\2\2\2\u011e9\3\2\2\2\u011f\u011d\3\2\2\2\u0120\u0127")
        buf.write("\5<\37\2\u0121\u0127\5> \2\u0122\u0123\7\b\2\2\u0123\u0124")
        buf.write("\5.\30\2\u0124\u0125\7\t\2\2\u0125\u0127\3\2\2\2\u0126")
        buf.write("\u0120\3\2\2\2\u0126\u0121\3\2\2\2\u0126\u0122\3\2\2\2")
        buf.write("\u0127;\3\2\2\2\u0128\u0129\79\2\2\u0129=\3\2\2\2\u012a")
        buf.write("\u0130\5@!\2\u012b\u0130\5B\"\2\u012c\u0130\5D#\2\u012d")
        buf.write("\u0130\5F$\2\u012e\u0130\5H%\2\u012f\u012a\3\2\2\2\u012f")
        buf.write("\u012b\3\2\2\2\u012f\u012c\3\2\2\2\u012f\u012d\3\2\2\2")
        buf.write("\u012f\u012e\3\2\2\2\u0130?\3\2\2\2\u0131\u0132\7:\2\2")
        buf.write("\u0132A\3\2\2\2\u0133\u0134\78\2\2\u0134C\3\2\2\2\u0135")
        buf.write("\u0136\7;\2\2\u0136E\3\2\2\2\u0137\u0144\7\b\2\2\u0138")
        buf.write("\u0139\5.\30\2\u0139\u0142\7\n\2\2\u013a\u013f\5.\30\2")
        buf.write("\u013b\u013c\7\n\2\2\u013c\u013e\5.\30\2\u013d\u013b\3")
        buf.write("\2\2\2\u013e\u0141\3\2\2\2\u013f\u013d\3\2\2\2\u013f\u0140")
        buf.write("\3\2\2\2\u0140\u0143\3\2\2\2\u0141\u013f\3\2\2\2\u0142")
        buf.write("\u013a\3\2\2\2\u0142\u0143\3\2\2\2\u0143\u0145\3\2\2\2")
        buf.write("\u0144\u0138\3\2\2\2\u0144\u0145\3\2\2\2\u0145\u0146\3")
        buf.write("\2\2\2\u0146\u0147\7\t\2\2\u0147G\3\2\2\2\u0148\u0151")
        buf.write("\7\20\2\2\u0149\u014e\5.\30\2\u014a\u014b\7\n\2\2\u014b")
        buf.write("\u014d\5.\30\2\u014c\u014a\3\2\2\2\u014d\u0150\3\2\2\2")
        buf.write("\u014e\u014c\3\2\2\2\u014e\u014f\3\2\2\2\u014f\u0152\3")
        buf.write("\2\2\2\u0150\u014e\3\2\2\2\u0151\u0149\3\2\2\2\u0151\u0152")
        buf.write("\3\2\2\2\u0152\u0153\3\2\2\2\u0153\u0154\7\21\2\2\u0154")
        buf.write("I\3\2\2\2!MT[bfjs\u0085\u008d\u009d\u00a0\u00a2\u00ae")
        buf.write("\u00b4\u00bd\u00cc\u00d1\u00df\u00ee\u00fc\u00fe\u0116")
        buf.write("\u011b\u011d\u0126\u012f\u013f\u0142\u0144\u014e\u0151")
        return buf.getvalue()


class ZeamplParser ( Parser ):

    grammarFileName = "Zeampl.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'var'", "'='", "';'", "'func'", "'init'", 
                     "'('", "')'", "','", "'ID'", "'type'", "'class'", "'{'", 
                     "'}'", "'['", "']'", "'+='", "'-='", "'~='", "'*='", 
                     "'/='", "'%='", "'&='", "'|='", "'^='", "'<<='", "'>>='", 
                     "'if'", "'elif'", "'else'", "'while'", "'for'", "'in'", 
                     "'return'", "'break'", "'continue'", "'=='", "'!='", 
                     "'<'", "'>'", "'>='", "'<='", "'+'", "'-'", "'|'", 
                     "'^'", "'*'", "'/'", "'%'", "'&'", "'<<'", "'>>'", 
                     "'!'", "'.'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "BOOL", "ID", "INT", "STRING", 
                      "WS" ]

    RULE_module = 0
    RULE_decl = 1
    RULE_varDecl = 2
    RULE_funcDecl = 3
    RULE_argList = 4
    RULE_arg = 5
    RULE_typeDecl = 6
    RULE_classDecl = 7
    RULE_typeExpr = 8
    RULE_idType = 9
    RULE_listType = 10
    RULE_tupleType = 11
    RULE_statement = 12
    RULE_block = 13
    RULE_exprStmt = 14
    RULE_assign_op = 15
    RULE_ifStmt = 16
    RULE_whileStmt = 17
    RULE_forStmt = 18
    RULE_returnStmt = 19
    RULE_breakStmt = 20
    RULE_continueStmt = 21
    RULE_expr = 22
    RULE_expr5op = 23
    RULE_expr4op = 24
    RULE_expr3op = 25
    RULE_expr2op = 26
    RULE_expr1 = 27
    RULE_expr0 = 28
    RULE_identifierExpression = 29
    RULE_literal = 30
    RULE_intLiteral = 31
    RULE_boolLiteral = 32
    RULE_stringLiteral = 33
    RULE_tupleLiteral = 34
    RULE_listLiteral = 35

    ruleNames =  [ "module", "decl", "varDecl", "funcDecl", "argList", "arg", 
                   "typeDecl", "classDecl", "typeExpr", "idType", "listType", 
                   "tupleType", "statement", "block", "exprStmt", "assign_op", 
                   "ifStmt", "whileStmt", "forStmt", "returnStmt", "breakStmt", 
                   "continueStmt", "expr", "expr5op", "expr4op", "expr3op", 
                   "expr2op", "expr1", "expr0", "identifierExpression", 
                   "literal", "intLiteral", "boolLiteral", "stringLiteral", 
                   "tupleLiteral", "listLiteral" ]

    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
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    T__19=20
    T__20=21
    T__21=22
    T__22=23
    T__23=24
    T__24=25
    T__25=26
    T__26=27
    T__27=28
    T__28=29
    T__29=30
    T__30=31
    T__31=32
    T__32=33
    T__33=34
    T__34=35
    T__35=36
    T__36=37
    T__37=38
    T__38=39
    T__39=40
    T__40=41
    T__41=42
    T__42=43
    T__43=44
    T__44=45
    T__45=46
    T__46=47
    T__47=48
    T__48=49
    T__49=50
    T__50=51
    T__51=52
    T__52=53
    BOOL=54
    ID=55
    INT=56
    STRING=57
    WS=58

    def __init__(self, input:TokenStream):
        super().__init__(input)
        self.checkVersion("4.5.3")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None



    class ModuleContext(ParserRuleContext):

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

        def decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.DeclContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.DeclContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_module

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




    def module(self):

        localctx = ZeamplParser.ModuleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_module)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 75
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__0) | (1 << ZeamplParser.T__3) | (1 << ZeamplParser.T__4) | (1 << ZeamplParser.T__9) | (1 << ZeamplParser.T__10))) != 0):
                self.state = 72
                self.decl()
                self.state = 77
                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 DeclContext(ParserRuleContext):

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

        def varDecl(self):
            return self.getTypedRuleContext(ZeamplParser.VarDeclContext,0)


        def funcDecl(self):
            return self.getTypedRuleContext(ZeamplParser.FuncDeclContext,0)


        def typeDecl(self):
            return self.getTypedRuleContext(ZeamplParser.TypeDeclContext,0)


        def classDecl(self):
            return self.getTypedRuleContext(ZeamplParser.ClassDeclContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_decl

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




    def decl(self):

        localctx = ZeamplParser.DeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_decl)
        try:
            self.state = 82
            token = self._input.LA(1)
            if token in [ZeamplParser.T__0]:
                self.enterOuterAlt(localctx, 1)
                self.state = 78
                self.varDecl()

            elif token in [ZeamplParser.T__3, ZeamplParser.T__4]:
                self.enterOuterAlt(localctx, 2)
                self.state = 79
                self.funcDecl()

            elif token in [ZeamplParser.T__9]:
                self.enterOuterAlt(localctx, 3)
                self.state = 80
                self.typeDecl()

            elif token in [ZeamplParser.T__10]:
                self.enterOuterAlt(localctx, 4)
                self.state = 81
                self.classDecl()

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

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

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

        def typeExpr(self):
            return self.getTypedRuleContext(ZeamplParser.TypeExprContext,0)


        def expr(self):
            return self.getTypedRuleContext(ZeamplParser.ExprContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_varDecl

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




    def varDecl(self):

        localctx = ZeamplParser.VarDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_varDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 84
            self.match(ZeamplParser.T__0)
            self.state = 85
            self.match(ZeamplParser.ID)
            self.state = 86
            self.typeExpr()
            self.state = 89
            _la = self._input.LA(1)
            if _la==ZeamplParser.T__1:
                self.state = 87
                self.match(ZeamplParser.T__1)
                self.state = 88
                self.expr(0)


            self.state = 91
            self.match(ZeamplParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FuncDeclContext(ParserRuleContext):

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

        def block(self):
            return self.getTypedRuleContext(ZeamplParser.BlockContext,0)


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

        def argList(self):
            return self.getTypedRuleContext(ZeamplParser.ArgListContext,0)


        def typeExpr(self):
            return self.getTypedRuleContext(ZeamplParser.TypeExprContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_funcDecl

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




    def funcDecl(self):

        localctx = ZeamplParser.FuncDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_funcDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 96
            token = self._input.LA(1)
            if token in [ZeamplParser.T__3]:
                self.state = 93
                self.match(ZeamplParser.T__3)
                self.state = 94
                self.match(ZeamplParser.ID)

            elif token in [ZeamplParser.T__4]:
                self.state = 95
                self.match(ZeamplParser.T__4)

            else:
                raise NoViableAltException(self)

            self.state = 98
            self.match(ZeamplParser.T__5)
            self.state = 100
            _la = self._input.LA(1)
            if _la==ZeamplParser.T__8:
                self.state = 99
                self.argList()


            self.state = 102
            self.match(ZeamplParser.T__6)
            self.state = 104
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.ID))) != 0):
                self.state = 103
                self.typeExpr()


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

    class ArgListContext(ParserRuleContext):

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

        def arg(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.ArgContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.ArgContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_argList

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




    def argList(self):

        localctx = ZeamplParser.ArgListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_argList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 108
            self.arg()
            self.state = 113
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ZeamplParser.T__7:
                self.state = 109
                self.match(ZeamplParser.T__7)
                self.state = 110
                self.arg()
                self.state = 115
                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 ArgContext(ParserRuleContext):

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

        def typeExpr(self):
            return self.getTypedRuleContext(ZeamplParser.TypeExprContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_arg

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




    def arg(self):

        localctx = ZeamplParser.ArgContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_arg)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 116
            self.match(ZeamplParser.T__8)
            self.state = 117
            self.typeExpr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TypeDeclContext(ParserRuleContext):

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

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

        def typeExpr(self):
            return self.getTypedRuleContext(ZeamplParser.TypeExprContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_typeDecl

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




    def typeDecl(self):

        localctx = ZeamplParser.TypeDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_typeDecl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 119
            self.match(ZeamplParser.T__9)
            self.state = 120
            self.match(ZeamplParser.ID)
            self.state = 121
            self.match(ZeamplParser.T__1)
            self.state = 122
            self.typeExpr()
            self.state = 123
            self.match(ZeamplParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ClassDeclContext(ParserRuleContext):

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

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

        def decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.DeclContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.DeclContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_classDecl

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




    def classDecl(self):

        localctx = ZeamplParser.ClassDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_classDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 125
            self.match(ZeamplParser.T__10)
            self.state = 126
            self.match(ZeamplParser.ID)
            self.state = 127
            self.match(ZeamplParser.T__11)
            self.state = 131
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__0) | (1 << ZeamplParser.T__3) | (1 << ZeamplParser.T__4) | (1 << ZeamplParser.T__9) | (1 << ZeamplParser.T__10))) != 0):
                self.state = 128
                self.decl()
                self.state = 133
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 134
            self.match(ZeamplParser.T__12)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TypeExprContext(ParserRuleContext):

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

        def idType(self):
            return self.getTypedRuleContext(ZeamplParser.IdTypeContext,0)


        def listType(self):
            return self.getTypedRuleContext(ZeamplParser.ListTypeContext,0)


        def tupleType(self):
            return self.getTypedRuleContext(ZeamplParser.TupleTypeContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_typeExpr

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




    def typeExpr(self):

        localctx = ZeamplParser.TypeExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_typeExpr)
        try:
            self.state = 139
            token = self._input.LA(1)
            if token in [ZeamplParser.ID]:
                self.enterOuterAlt(localctx, 1)
                self.state = 136
                self.idType()

            elif token in [ZeamplParser.T__13]:
                self.enterOuterAlt(localctx, 2)
                self.state = 137
                self.listType()

            elif token in [ZeamplParser.T__5]:
                self.enterOuterAlt(localctx, 3)
                self.state = 138
                self.tupleType()

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

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

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

        def getRuleIndex(self):
            return ZeamplParser.RULE_idType

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




    def idType(self):

        localctx = ZeamplParser.IdTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_idType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 141
            self.match(ZeamplParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ListTypeContext(ParserRuleContext):

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

        def typeExpr(self):
            return self.getTypedRuleContext(ZeamplParser.TypeExprContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_listType

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




    def listType(self):

        localctx = ZeamplParser.ListTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_listType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 143
            self.match(ZeamplParser.T__13)
            self.state = 144
            self.typeExpr()
            self.state = 145
            self.match(ZeamplParser.T__14)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TupleTypeContext(ParserRuleContext):

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

        def typeExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.TypeExprContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.TypeExprContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_tupleType

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




    def tupleType(self):

        localctx = ZeamplParser.TupleTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_tupleType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 147
            self.match(ZeamplParser.T__5)
            self.state = 160
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.ID))) != 0):
                self.state = 148
                self.typeExpr()
                self.state = 149
                self.match(ZeamplParser.T__7)
                self.state = 158
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.ID))) != 0):
                    self.state = 150
                    self.typeExpr()
                    self.state = 155
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==ZeamplParser.T__7:
                        self.state = 151
                        self.match(ZeamplParser.T__7)
                        self.state = 152
                        self.typeExpr()
                        self.state = 157
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)





            self.state = 162
            self.match(ZeamplParser.T__6)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class StatementContext(ParserRuleContext):

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

        def block(self):
            return self.getTypedRuleContext(ZeamplParser.BlockContext,0)


        def exprStmt(self):
            return self.getTypedRuleContext(ZeamplParser.ExprStmtContext,0)


        def ifStmt(self):
            return self.getTypedRuleContext(ZeamplParser.IfStmtContext,0)


        def whileStmt(self):
            return self.getTypedRuleContext(ZeamplParser.WhileStmtContext,0)


        def forStmt(self):
            return self.getTypedRuleContext(ZeamplParser.ForStmtContext,0)


        def returnStmt(self):
            return self.getTypedRuleContext(ZeamplParser.ReturnStmtContext,0)


        def breakStmt(self):
            return self.getTypedRuleContext(ZeamplParser.BreakStmtContext,0)


        def continueStmt(self):
            return self.getTypedRuleContext(ZeamplParser.ContinueStmtContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_statement

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




    def statement(self):

        localctx = ZeamplParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_statement)
        try:
            self.state = 172
            token = self._input.LA(1)
            if token in [ZeamplParser.T__11]:
                self.enterOuterAlt(localctx, 1)
                self.state = 164
                self.block()

            elif token in [ZeamplParser.T__5, ZeamplParser.T__13, ZeamplParser.T__41, ZeamplParser.T__42, ZeamplParser.T__51, ZeamplParser.BOOL, ZeamplParser.ID, ZeamplParser.INT, ZeamplParser.STRING]:
                self.enterOuterAlt(localctx, 2)
                self.state = 165
                self.exprStmt()

            elif token in [ZeamplParser.T__26]:
                self.enterOuterAlt(localctx, 3)
                self.state = 166
                self.ifStmt()

            elif token in [ZeamplParser.T__29]:
                self.enterOuterAlt(localctx, 4)
                self.state = 167
                self.whileStmt()

            elif token in [ZeamplParser.T__30]:
                self.enterOuterAlt(localctx, 5)
                self.state = 168
                self.forStmt()

            elif token in [ZeamplParser.T__32]:
                self.enterOuterAlt(localctx, 6)
                self.state = 169
                self.returnStmt()

            elif token in [ZeamplParser.T__33]:
                self.enterOuterAlt(localctx, 7)
                self.state = 170
                self.breakStmt()

            elif token in [ZeamplParser.T__34]:
                self.enterOuterAlt(localctx, 8)
                self.state = 171
                self.continueStmt()

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

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

        def statement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.StatementContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.StatementContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_block

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




    def block(self):

        localctx = ZeamplParser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 174
            self.match(ZeamplParser.T__11)
            self.state = 178
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__11) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.T__26) | (1 << ZeamplParser.T__29) | (1 << ZeamplParser.T__30) | (1 << ZeamplParser.T__32) | (1 << ZeamplParser.T__33) | (1 << ZeamplParser.T__34) | (1 << ZeamplParser.T__41) | (1 << ZeamplParser.T__42) | (1 << ZeamplParser.T__51) | (1 << ZeamplParser.BOOL) | (1 << ZeamplParser.ID) | (1 << ZeamplParser.INT) | (1 << ZeamplParser.STRING))) != 0):
                self.state = 175
                self.statement()
                self.state = 180
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 181
            self.match(ZeamplParser.T__12)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ExprStmtContext(ParserRuleContext):

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

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.ExprContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.ExprContext,i)


        def assign_op(self):
            return self.getTypedRuleContext(ZeamplParser.Assign_opContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_exprStmt

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




    def exprStmt(self):

        localctx = ZeamplParser.ExprStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_exprStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 183
            self.expr(0)
            self.state = 187
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__1) | (1 << ZeamplParser.T__15) | (1 << ZeamplParser.T__16) | (1 << ZeamplParser.T__17) | (1 << ZeamplParser.T__18) | (1 << ZeamplParser.T__19) | (1 << ZeamplParser.T__20) | (1 << ZeamplParser.T__21) | (1 << ZeamplParser.T__22) | (1 << ZeamplParser.T__23) | (1 << ZeamplParser.T__24) | (1 << ZeamplParser.T__25))) != 0):
                self.state = 184
                self.assign_op()
                self.state = 185
                self.expr(0)


            self.state = 189
            self.match(ZeamplParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Assign_opContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_assign_op

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




    def assign_op(self):

        localctx = ZeamplParser.Assign_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_assign_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 191
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__1) | (1 << ZeamplParser.T__15) | (1 << ZeamplParser.T__16) | (1 << ZeamplParser.T__17) | (1 << ZeamplParser.T__18) | (1 << ZeamplParser.T__19) | (1 << ZeamplParser.T__20) | (1 << ZeamplParser.T__21) | (1 << ZeamplParser.T__22) | (1 << ZeamplParser.T__23) | (1 << ZeamplParser.T__24) | (1 << ZeamplParser.T__25))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                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 IfStmtContext(ParserRuleContext):

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

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.ExprContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.ExprContext,i)


        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.BlockContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.BlockContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_ifStmt

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




    def ifStmt(self):

        localctx = ZeamplParser.IfStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_ifStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 193
            self.match(ZeamplParser.T__26)
            self.state = 194
            self.expr(0)
            self.state = 195
            self.block()
            self.state = 202
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ZeamplParser.T__27:
                self.state = 196
                self.match(ZeamplParser.T__27)
                self.state = 197
                self.expr(0)
                self.state = 198
                self.block()
                self.state = 204
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 207
            _la = self._input.LA(1)
            if _la==ZeamplParser.T__28:
                self.state = 205
                self.match(ZeamplParser.T__28)
                self.state = 206
                self.block()


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

    class WhileStmtContext(ParserRuleContext):

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

        def expr(self):
            return self.getTypedRuleContext(ZeamplParser.ExprContext,0)


        def block(self):
            return self.getTypedRuleContext(ZeamplParser.BlockContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_whileStmt

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




    def whileStmt(self):

        localctx = ZeamplParser.WhileStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_whileStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 209
            self.match(ZeamplParser.T__29)
            self.state = 210
            self.expr(0)
            self.state = 211
            self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ForStmtContext(ParserRuleContext):

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

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

        def expr(self):
            return self.getTypedRuleContext(ZeamplParser.ExprContext,0)


        def block(self):
            return self.getTypedRuleContext(ZeamplParser.BlockContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_forStmt

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




    def forStmt(self):

        localctx = ZeamplParser.ForStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_forStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 213
            self.match(ZeamplParser.T__30)
            self.state = 214
            self.match(ZeamplParser.ID)
            self.state = 215
            self.match(ZeamplParser.T__31)
            self.state = 216
            self.expr(0)
            self.state = 217
            self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ReturnStmtContext(ParserRuleContext):

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

        def expr(self):
            return self.getTypedRuleContext(ZeamplParser.ExprContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_returnStmt

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




    def returnStmt(self):

        localctx = ZeamplParser.ReturnStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_returnStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 219
            self.match(ZeamplParser.T__32)
            self.state = 221
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.T__41) | (1 << ZeamplParser.T__42) | (1 << ZeamplParser.T__51) | (1 << ZeamplParser.BOOL) | (1 << ZeamplParser.ID) | (1 << ZeamplParser.INT) | (1 << ZeamplParser.STRING))) != 0):
                self.state = 220
                self.expr(0)


            self.state = 223
            self.match(ZeamplParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class BreakStmtContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_breakStmt

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




    def breakStmt(self):

        localctx = ZeamplParser.BreakStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_breakStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 225
            self.match(ZeamplParser.T__33)
            self.state = 226
            self.match(ZeamplParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ContinueStmtContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_continueStmt

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




    def continueStmt(self):

        localctx = ZeamplParser.ContinueStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_continueStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 228
            self.match(ZeamplParser.T__34)
            self.state = 229
            self.match(ZeamplParser.T__2)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ExprContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_expr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class AtomContext(ExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a ZeamplParser.ExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def expr1(self):
            return self.getTypedRuleContext(ZeamplParser.Expr1Context,0)


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


    class PrefixOpContext(ExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a ZeamplParser.ExprContext
            super().__init__(parser)
            self.op = None # Expr2opContext
            self.x = None # ExprContext
            self.copyFrom(ctx)

        def expr2op(self):
            return self.getTypedRuleContext(ZeamplParser.Expr2opContext,0)

        def expr(self):
            return self.getTypedRuleContext(ZeamplParser.ExprContext,0)


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


    class BinaryOpContext(ExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a ZeamplParser.ExprContext
            super().__init__(parser)
            self.lhs = None # ExprContext
            self.op = None # Expr3opContext
            self.rhs = None # ExprContext
            self.copyFrom(ctx)

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.ExprContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.ExprContext,i)

        def expr3op(self):
            return self.getTypedRuleContext(ZeamplParser.Expr3opContext,0)

        def expr4op(self):
            return self.getTypedRuleContext(ZeamplParser.Expr4opContext,0)

        def expr5op(self):
            return self.getTypedRuleContext(ZeamplParser.Expr5opContext,0)


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



    def expr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ZeamplParser.ExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 44
        self.enterRecursionRule(localctx, 44, self.RULE_expr, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 236
            token = self._input.LA(1)
            if token in [ZeamplParser.T__5, ZeamplParser.T__13, ZeamplParser.BOOL, ZeamplParser.ID, ZeamplParser.INT, ZeamplParser.STRING]:
                localctx = ZeamplParser.AtomContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 232
                self.expr1(0)

            elif token in [ZeamplParser.T__41, ZeamplParser.T__42, ZeamplParser.T__51]:
                localctx = ZeamplParser.PrefixOpContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 233
                localctx.op = self.expr2op()
                self.state = 234
                localctx.x = self.expr(4)

            else:
                raise NoViableAltException(self)

            self._ctx.stop = self._input.LT(-1)
            self.state = 252
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,20,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 = 250
                    self._errHandler.sync(self);
                    la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                    if la_ == 1:
                        localctx = ZeamplParser.BinaryOpContext(self, ZeamplParser.ExprContext(self, _parentctx, _parentState))
                        localctx.lhs = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 238
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 239
                        localctx.op = self.expr3op()
                        self.state = 240
                        localctx.rhs = self.expr(4)
                        pass

                    elif la_ == 2:
                        localctx = ZeamplParser.BinaryOpContext(self, ZeamplParser.ExprContext(self, _parentctx, _parentState))
                        localctx.lhs = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 242
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 243
                        localctx.op = self.expr4op()
                        self.state = 244
                        localctx.rhs = self.expr(3)
                        pass

                    elif la_ == 3:
                        localctx = ZeamplParser.BinaryOpContext(self, ZeamplParser.ExprContext(self, _parentctx, _parentState))
                        localctx.lhs = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 246
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 247
                        localctx.op = self.expr5op()
                        self.state = 248
                        localctx.rhs = self.expr(2)
                        pass

             
                self.state = 254
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,20,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 Expr5opContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_expr5op

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




    def expr5op(self):

        localctx = ZeamplParser.Expr5opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_expr5op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 255
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__35) | (1 << ZeamplParser.T__36) | (1 << ZeamplParser.T__37) | (1 << ZeamplParser.T__38) | (1 << ZeamplParser.T__39) | (1 << ZeamplParser.T__40))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                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 Expr4opContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_expr4op

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




    def expr4op(self):

        localctx = ZeamplParser.Expr4opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_expr4op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 257
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__41) | (1 << ZeamplParser.T__42) | (1 << ZeamplParser.T__43) | (1 << ZeamplParser.T__44))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                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 Expr3opContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_expr3op

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




    def expr3op(self):

        localctx = ZeamplParser.Expr3opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_expr3op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 259
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__45) | (1 << ZeamplParser.T__46) | (1 << ZeamplParser.T__47) | (1 << ZeamplParser.T__48) | (1 << ZeamplParser.T__49) | (1 << ZeamplParser.T__50))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                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 Expr2opContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_expr2op

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




    def expr2op(self):

        localctx = ZeamplParser.Expr2opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_expr2op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 261
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__41) | (1 << ZeamplParser.T__42) | (1 << ZeamplParser.T__51))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                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 Expr1Context(ParserRuleContext):

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


        def getRuleIndex(self):
            return ZeamplParser.RULE_expr1

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class CallContext(Expr1Context):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a ZeamplParser.Expr1Context
            super().__init__(parser)
            self._expr = None # ExprContext
            self.args = list() # of ExprContexts
            self.copyFrom(ctx)

        def expr1(self):
            return self.getTypedRuleContext(ZeamplParser.Expr1Context,0)

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.ExprContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.ExprContext,i)


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


    class MemberAccessContext(Expr1Context):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a ZeamplParser.Expr1Context
            super().__init__(parser)
            self.copyFrom(ctx)

        def expr1(self):
            return self.getTypedRuleContext(ZeamplParser.Expr1Context,0)

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

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


    class Atom0Context(Expr1Context):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a ZeamplParser.Expr1Context
            super().__init__(parser)
            self.copyFrom(ctx)

        def expr0(self):
            return self.getTypedRuleContext(ZeamplParser.Expr0Context,0)


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



    def expr1(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ZeamplParser.Expr1Context(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 54
        self.enterRecursionRule(localctx, 54, self.RULE_expr1, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            localctx = ZeamplParser.Atom0Context(self, localctx)
            self._ctx = localctx
            _prevctx = localctx

            self.state = 264
            self.expr0()
            self._ctx.stop = self._input.LT(-1)
            self.state = 283
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,23,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 = 281
                    self._errHandler.sync(self);
                    la_ = self._interp.adaptivePredict(self._input,22,self._ctx)
                    if la_ == 1:
                        localctx = ZeamplParser.MemberAccessContext(self, ZeamplParser.Expr1Context(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr1)
                        self.state = 266
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 267
                        self.match(ZeamplParser.T__52)
                        self.state = 268
                        self.match(ZeamplParser.ID)
                        pass

                    elif la_ == 2:
                        localctx = ZeamplParser.CallContext(self, ZeamplParser.Expr1Context(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr1)
                        self.state = 269
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 270
                        self.match(ZeamplParser.T__5)
                        self.state = 271
                        localctx._expr = self.expr(0)
                        localctx.args.append(localctx._expr)
                        self.state = 276
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        while _la==ZeamplParser.T__7:
                            self.state = 272
                            self.match(ZeamplParser.T__7)
                            self.state = 273
                            localctx._expr = self.expr(0)
                            localctx.args.append(localctx._expr)
                            self.state = 278
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)

                        self.state = 279
                        self.match(ZeamplParser.T__6)
                        pass

             
                self.state = 285
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,23,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 Expr0Context(ParserRuleContext):

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

        def identifierExpression(self):
            return self.getTypedRuleContext(ZeamplParser.IdentifierExpressionContext,0)


        def literal(self):
            return self.getTypedRuleContext(ZeamplParser.LiteralContext,0)


        def expr(self):
            return self.getTypedRuleContext(ZeamplParser.ExprContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_expr0

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




    def expr0(self):

        localctx = ZeamplParser.Expr0Context(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_expr0)
        try:
            self.state = 292
            self._errHandler.sync(self);
            la_ = self._interp.adaptivePredict(self._input,24,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 286
                self.identifierExpression()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 287
                self.literal()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 288
                self.match(ZeamplParser.T__5)
                self.state = 289
                self.expr(0)
                self.state = 290
                self.match(ZeamplParser.T__6)
                pass


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

    class IdentifierExpressionContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return ZeamplParser.RULE_identifierExpression

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




    def identifierExpression(self):

        localctx = ZeamplParser.IdentifierExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_identifierExpression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 294
            self.match(ZeamplParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class LiteralContext(ParserRuleContext):

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

        def intLiteral(self):
            return self.getTypedRuleContext(ZeamplParser.IntLiteralContext,0)


        def boolLiteral(self):
            return self.getTypedRuleContext(ZeamplParser.BoolLiteralContext,0)


        def stringLiteral(self):
            return self.getTypedRuleContext(ZeamplParser.StringLiteralContext,0)


        def tupleLiteral(self):
            return self.getTypedRuleContext(ZeamplParser.TupleLiteralContext,0)


        def listLiteral(self):
            return self.getTypedRuleContext(ZeamplParser.ListLiteralContext,0)


        def getRuleIndex(self):
            return ZeamplParser.RULE_literal

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




    def literal(self):

        localctx = ZeamplParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_literal)
        try:
            self.state = 301
            token = self._input.LA(1)
            if token in [ZeamplParser.INT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 296
                self.intLiteral()

            elif token in [ZeamplParser.BOOL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 297
                self.boolLiteral()

            elif token in [ZeamplParser.STRING]:
                self.enterOuterAlt(localctx, 3)
                self.state = 298
                self.stringLiteral()

            elif token in [ZeamplParser.T__5]:
                self.enterOuterAlt(localctx, 4)
                self.state = 299
                self.tupleLiteral()

            elif token in [ZeamplParser.T__13]:
                self.enterOuterAlt(localctx, 5)
                self.state = 300
                self.listLiteral()

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

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

        def INT(self):
            return self.getToken(ZeamplParser.INT, 0)

        def getRuleIndex(self):
            return ZeamplParser.RULE_intLiteral

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




    def intLiteral(self):

        localctx = ZeamplParser.IntLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_intLiteral)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 303
            self.match(ZeamplParser.INT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class BoolLiteralContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return ZeamplParser.RULE_boolLiteral

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




    def boolLiteral(self):

        localctx = ZeamplParser.BoolLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_boolLiteral)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 305
            self.match(ZeamplParser.BOOL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class StringLiteralContext(ParserRuleContext):

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

        def STRING(self):
            return self.getToken(ZeamplParser.STRING, 0)

        def getRuleIndex(self):
            return ZeamplParser.RULE_stringLiteral

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




    def stringLiteral(self):

        localctx = ZeamplParser.StringLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_stringLiteral)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 307
            self.match(ZeamplParser.STRING)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TupleLiteralContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self._expr = None # ExprContext
            self.x = list() # of ExprContexts

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.ExprContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.ExprContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_tupleLiteral

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




    def tupleLiteral(self):

        localctx = ZeamplParser.TupleLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_tupleLiteral)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 309
            self.match(ZeamplParser.T__5)
            self.state = 322
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.T__41) | (1 << ZeamplParser.T__42) | (1 << ZeamplParser.T__51) | (1 << ZeamplParser.BOOL) | (1 << ZeamplParser.ID) | (1 << ZeamplParser.INT) | (1 << ZeamplParser.STRING))) != 0):
                self.state = 310
                localctx._expr = self.expr(0)
                localctx.x.append(localctx._expr)
                self.state = 311
                self.match(ZeamplParser.T__7)
                self.state = 320
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.T__41) | (1 << ZeamplParser.T__42) | (1 << ZeamplParser.T__51) | (1 << ZeamplParser.BOOL) | (1 << ZeamplParser.ID) | (1 << ZeamplParser.INT) | (1 << ZeamplParser.STRING))) != 0):
                    self.state = 312
                    localctx._expr = self.expr(0)
                    localctx.x.append(localctx._expr)
                    self.state = 317
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==ZeamplParser.T__7:
                        self.state = 313
                        self.match(ZeamplParser.T__7)
                        self.state = 314
                        localctx._expr = self.expr(0)
                        localctx.x.append(localctx._expr)
                        self.state = 319
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)





            self.state = 324
            self.match(ZeamplParser.T__6)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ListLiteralContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self._expr = None # ExprContext
            self.x = list() # of ExprContexts

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(ZeamplParser.ExprContext)
            else:
                return self.getTypedRuleContext(ZeamplParser.ExprContext,i)


        def getRuleIndex(self):
            return ZeamplParser.RULE_listLiteral

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




    def listLiteral(self):

        localctx = ZeamplParser.ListLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_listLiteral)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 326
            self.match(ZeamplParser.T__13)
            self.state = 335
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ZeamplParser.T__5) | (1 << ZeamplParser.T__13) | (1 << ZeamplParser.T__41) | (1 << ZeamplParser.T__42) | (1 << ZeamplParser.T__51) | (1 << ZeamplParser.BOOL) | (1 << ZeamplParser.ID) | (1 << ZeamplParser.INT) | (1 << ZeamplParser.STRING))) != 0):
                self.state = 327
                localctx._expr = self.expr(0)
                localctx.x.append(localctx._expr)
                self.state = 332
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ZeamplParser.T__7:
                    self.state = 328
                    self.match(ZeamplParser.T__7)
                    self.state = 329
                    localctx._expr = self.expr(0)
                    localctx.x.append(localctx._expr)
                    self.state = 334
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 337
            self.match(ZeamplParser.T__14)
        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[22] = self.expr_sempred
        self._predicates[27] = self.expr1_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 expr_sempred(self, localctx:ExprContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 3)
         

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

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

    def expr1_sempred(self, localctx:Expr1Context, predIndex:int):
            if predIndex == 3:
                return self.precpred(self._ctx, 2)
         

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




