# Generated from Harmony.g4 by ANTLR 4.9.3
# 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("\u0260\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%\4&\t")
        buf.write("&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4")
        buf.write("/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t\64")
        buf.write("\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t")
        buf.write(";\4<\t<\4=\t=\3\2\7\2|\n\2\f\2\16\2\177\13\2\3\2\3\2\3")
        buf.write("\3\3\3\5\3\u0085\n\3\3\3\5\3\u0088\n\3\3\3\3\3\3\4\3\4")
        buf.write("\3\4\3\5\3\5\3\5\3\5\3\5\5\5\u0094\n\5\3\6\3\6\3\6\7\6")
        buf.write("\u0099\n\6\f\6\16\6\u009c\13\6\3\7\3\7\3\7\3\7\3\7\3\7")
        buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u00ab\n\7\3\b\3\b\3\b")
        buf.write("\7\b\u00b0\n\b\f\b\16\b\u00b3\13\b\3\b\3\b\3\t\3\t\3\n")
        buf.write("\3\n\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00c5")
        buf.write("\n\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00cd\n\f\3\f\3\f\3\f")
        buf.write("\5\f\u00d2\n\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00db\n")
        buf.write("\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u00e6\n\r\f")
        buf.write("\r\16\r\u00e9\13\r\5\r\u00eb\n\r\3\r\3\r\3\r\3\r\3\r\7")
        buf.write("\r\u00f2\n\r\f\r\16\r\u00f5\13\r\5\r\u00f7\n\r\3\16\3")
        buf.write("\16\5\16\u00fb\n\16\3\16\3\16\5\16\u00ff\n\16\7\16\u0101")
        buf.write("\n\16\f\16\16\16\u0104\13\16\3\17\3\17\3\17\3\17\3\17")
        buf.write("\3\17\5\17\u010c\n\17\3\17\3\17\3\17\3\20\3\20\3\20\3")
        buf.write("\21\3\21\3\21\3\21\7\21\u0118\n\21\f\21\16\21\u011b\13")
        buf.write("\21\3\21\5\21\u011e\n\21\5\21\u0120\n\21\3\22\3\22\5\22")
        buf.write("\u0124\n\22\3\22\3\22\3\22\5\22\u0129\n\22\3\22\3\22\3")
        buf.write("\22\3\22\3\22\7\22\u0130\n\22\f\22\16\22\u0133\13\22\3")
        buf.write("\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\7\22\u013d\n\22")
        buf.write("\f\22\16\22\u0140\13\22\5\22\u0142\n\22\3\23\3\23\3\23")
        buf.write("\3\23\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u014e\n\23\3")
        buf.write("\24\3\24\3\24\3\24\3\24\3\24\3\24\7\24\u0157\n\24\f\24")
        buf.write("\16\24\u015a\13\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30")
        buf.write("\3\30\3\31\3\31\3\31\6\31\u0167\n\31\r\31\16\31\u0168")
        buf.write("\3\31\3\31\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33")
        buf.write("\3\34\3\34\3\34\3\34\5\34\u017a\n\34\3\35\3\35\3\35\3")
        buf.write("\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3 \3 \3!\3!\3!")
        buf.write("\3\"\3\"\3\"\3#\3#\3#\3$\3$\5$\u0194\n$\3$\3$\3%\3%\3")
        buf.write("%\3%\3&\3&\3&\3\'\3\'\3\'\3\'\7\'\u01a3\n\'\f\'\16\'\u01a6")
        buf.write("\13\'\3(\3(\3(\3(\7(\u01ac\n(\f(\16(\u01af\13(\3)\3)\3")
        buf.write(")\3)\3*\3*\3*\3*\3+\3+\3+\3+\3,\3,\3,\3,\3,\5,\u01c2\n")
        buf.write(",\3-\3-\3-\3-\3-\3-\3-\5-\u01cb\n-\3-\5-\u01ce\n-\3.\3")
        buf.write(".\5.\u01d2\n.\3.\5.\u01d5\n.\3/\3/\3/\3/\3\60\3\60\3\60")
        buf.write("\3\61\3\61\3\61\3\61\5\61\u01e2\n\61\3\61\3\61\3\61\3")
        buf.write("\62\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\64")
        buf.write("\3\64\3\64\3\64\3\65\3\65\3\65\3\65\3\65\7\65\u01fa\n")
        buf.write("\65\f\65\16\65\u01fd\13\65\3\65\5\65\u0200\n\65\3\66\6")
        buf.write("\66\u0203\n\66\r\66\16\66\u0204\3\67\3\67\5\67\u0209\n")
        buf.write("\67\38\38\38\38\58\u020f\n8\38\38\38\58\u0214\n8\39\5")
        buf.write("9\u0217\n9\39\39\39\39\39\39\39\39\39\39\39\39\39\39\3")
        buf.write("9\39\39\39\59\u022b\n9\3:\5:\u022e\n:\3:\3:\3:\3:\3:\3")
        buf.write(":\5:\u0236\n:\3;\3;\5;\u023a\n;\3;\3;\3;\5;\u023f\n;\3")
        buf.write("<\3<\6<\u0243\n<\r<\16<\u0244\3=\5=\u0248\n=\3=\5=\u024b")
        buf.write("\n=\3=\7=\u024e\n=\f=\16=\u0251\13=\3=\3=\3=\3=\5=\u0257")
        buf.write("\n=\3=\3=\5=\u025b\n=\3=\5=\u025e\n=\3=\2\3&>\2\4\6\b")
        buf.write("\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668")
        buf.write(":<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvx\2\6\4\2\3\20@@\3\2\21")
        buf.write("\26\5\2\b\b\27)KK\3\2+:\2\u0289\2}\3\2\2\2\4\u0084\3\2")
        buf.write("\2\2\6\u008b\3\2\2\2\b\u008e\3\2\2\2\n\u0095\3\2\2\2\f")
        buf.write("\u00aa\3\2\2\2\16\u00b1\3\2\2\2\20\u00b6\3\2\2\2\22\u00b8")
        buf.write("\3\2\2\2\24\u00ba\3\2\2\2\26\u00da\3\2\2\2\30\u00dc\3")
        buf.write("\2\2\2\32\u00f8\3\2\2\2\34\u0105\3\2\2\2\36\u0110\3\2")
        buf.write("\2\2 \u0113\3\2\2\2\"\u0121\3\2\2\2$\u014d\3\2\2\2&\u014f")
        buf.write("\3\2\2\2(\u015b\3\2\2\2*\u015d\3\2\2\2,\u015f\3\2\2\2")
        buf.write(".\u0161\3\2\2\2\60\u0166\3\2\2\2\62\u016c\3\2\2\2\64\u0170")
        buf.write("\3\2\2\2\66\u0175\3\2\2\28\u017b\3\2\2\2:\u017e\3\2\2")
        buf.write("\2<\u0183\3\2\2\2>\u0186\3\2\2\2@\u0188\3\2\2\2B\u018b")
        buf.write("\3\2\2\2D\u018e\3\2\2\2F\u0191\3\2\2\2H\u0197\3\2\2\2")
        buf.write("J\u019b\3\2\2\2L\u019e\3\2\2\2N\u01a7\3\2\2\2P\u01b0\3")
        buf.write("\2\2\2R\u01b4\3\2\2\2T\u01b8\3\2\2\2V\u01bc\3\2\2\2X\u01c3")
        buf.write("\3\2\2\2Z\u01d1\3\2\2\2\\\u01d6\3\2\2\2^\u01da\3\2\2\2")
        buf.write("`\u01dd\3\2\2\2b\u01e6\3\2\2\2d\u01eb\3\2\2\2f\u01f0\3")
        buf.write("\2\2\2h\u01f4\3\2\2\2j\u0202\3\2\2\2l\u0208\3\2\2\2n\u020a")
        buf.write("\3\2\2\2p\u0216\3\2\2\2r\u022d\3\2\2\2t\u0237\3\2\2\2")
        buf.write("v\u0242\3\2\2\2x\u025d\3\2\2\2z|\5x=\2{z\3\2\2\2|\177")
        buf.write("\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\u0080\3\2\2\2\177}\3\2\2")
        buf.write("\2\u0080\u0081\7\2\2\3\u0081\3\3\2\2\2\u0082\u0085\5\6")
        buf.write("\4\2\u0083\u0085\5\b\5\2\u0084\u0082\3\2\2\2\u0084\u0083")
        buf.write("\3\2\2\2\u0085\u0087\3\2\2\2\u0086\u0088\7z\2\2\u0087")
        buf.write("\u0086\3\2\2\2\u0087\u0088\3\2\2\2\u0088\u0089\3\2\2\2")
        buf.write("\u0089\u008a\7;\2\2\u008a\5\3\2\2\2\u008b\u008c\7C\2\2")
        buf.write("\u008c\u008d\5\n\6\2\u008d\7\3\2\2\2\u008e\u008f\7E\2")
        buf.write("\2\u008f\u0090\7p\2\2\u0090\u0093\7C\2\2\u0091\u0094\7")
        buf.write("@\2\2\u0092\u0094\5\n\6\2\u0093\u0091\3\2\2\2\u0093\u0092")
        buf.write("\3\2\2\2\u0094\t\3\2\2\2\u0095\u009a\7p\2\2\u0096\u0097")
        buf.write("\7L\2\2\u0097\u0099\7p\2\2\u0098\u0096\3\2\2\2\u0099\u009c")
        buf.write("\3\2\2\2\u009a\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b")
        buf.write("\13\3\2\2\2\u009c\u009a\3\2\2\2\u009d\u00ab\7p\2\2\u009e")
        buf.write("\u009f\7x\2\2\u009f\u00a0\5\16\b\2\u00a0\u00a1\7y\2\2")
        buf.write("\u00a1\u00ab\3\2\2\2\u00a2\u00a3\7t\2\2\u00a3\u00a4\5")
        buf.write("\16\b\2\u00a4\u00a5\7u\2\2\u00a5\u00ab\3\2\2\2\u00a6\u00a7")
        buf.write("\7x\2\2\u00a7\u00ab\7y\2\2\u00a8\u00a9\7t\2\2\u00a9\u00ab")
        buf.write("\7u\2\2\u00aa\u009d\3\2\2\2\u00aa\u009e\3\2\2\2\u00aa")
        buf.write("\u00a2\3\2\2\2\u00aa\u00a6\3\2\2\2\u00aa\u00a8\3\2\2\2")
        buf.write("\u00ab\r\3\2\2\2\u00ac\u00ad\5\f\7\2\u00ad\u00ae\7L\2")
        buf.write("\2\u00ae\u00b0\3\2\2\2\u00af\u00ac\3\2\2\2\u00b0\u00b3")
        buf.write("\3\2\2\2\u00b1\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2")
        buf.write("\u00b4\3\2\2\2\u00b3\u00b1\3\2\2\2\u00b4\u00b5\5\f\7\2")
        buf.write("\u00b5\17\3\2\2\2\u00b6\u00b7\t\2\2\2\u00b7\21\3\2\2\2")
        buf.write("\u00b8\u00b9\t\3\2\2\u00b9\23\3\2\2\2\u00ba\u00bb\t\4")
        buf.write("\2\2\u00bb\25\3\2\2\2\u00bc\u00db\7o\2\2\u00bd\u00db\7")
        buf.write("m\2\2\u00be\u00db\7q\2\2\u00bf\u00db\7p\2\2\u00c0\u00db")
        buf.write("\7{\2\2\u00c1\u00db\7k\2\2\u00c2\u00c4\7v\2\2\u00c3\u00c5")
        buf.write("\5\30\r\2\u00c4\u00c3\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c5")
        buf.write("\u00c6\3\2\2\2\u00c6\u00db\7w\2\2\u00c7\u00c8\7v\2\2\u00c8")
        buf.write("\u00c9\7j\2\2\u00c9\u00db\7w\2\2\u00ca\u00cc\7x\2\2\u00cb")
        buf.write("\u00cd\5 \21\2\u00cc\u00cb\3\2\2\2\u00cc\u00cd\3\2\2\2")
        buf.write("\u00cd\u00ce\3\2\2\2\u00ce\u00db\7y\2\2\u00cf\u00d1\7")
        buf.write("t\2\2\u00d0\u00d2\5 \21\2\u00d1\u00d0\3\2\2\2\u00d1\u00d2")
        buf.write("\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00db\7u\2\2\u00d4")
        buf.write("\u00d5\7J\2\2\u00d5\u00d6\5\16\b\2\u00d6\u00d7\7j\2\2")
        buf.write("\u00d7\u00d8\5\"\22\2\u00d8\u00d9\7*\2\2\u00d9\u00db\3")
        buf.write("\2\2\2\u00da\u00bc\3\2\2\2\u00da\u00bd\3\2\2\2\u00da\u00be")
        buf.write("\3\2\2\2\u00da\u00bf\3\2\2\2\u00da\u00c0\3\2\2\2\u00da")
        buf.write("\u00c1\3\2\2\2\u00da\u00c2\3\2\2\2\u00da\u00c7\3\2\2\2")
        buf.write("\u00da\u00ca\3\2\2\2\u00da\u00cf\3\2\2\2\u00da\u00d4\3")
        buf.write("\2\2\2\u00db\27\3\2\2\2\u00dc\u00f6\5\"\22\2\u00dd\u00de")
        buf.write("\7j\2\2\u00de\u00ea\5\"\22\2\u00df\u00eb\5\32\16\2\u00e0")
        buf.write("\u00e1\7L\2\2\u00e1\u00e2\5\"\22\2\u00e2\u00e3\7j\2\2")
        buf.write("\u00e3\u00e4\5\"\22\2\u00e4\u00e6\3\2\2\2\u00e5\u00e0")
        buf.write("\3\2\2\2\u00e6\u00e9\3\2\2\2\u00e7\u00e5\3\2\2\2\u00e7")
        buf.write("\u00e8\3\2\2\2\u00e8\u00eb\3\2\2\2\u00e9\u00e7\3\2\2\2")
        buf.write("\u00ea\u00df\3\2\2\2\u00ea\u00e7\3\2\2\2\u00eb\u00f7\3")
        buf.write("\2\2\2\u00ec\u00f7\5\32\16\2\u00ed\u00ee\7F\2\2\u00ee")
        buf.write("\u00f7\5\"\22\2\u00ef\u00f0\7L\2\2\u00f0\u00f2\5\"\22")
        buf.write("\2\u00f1\u00ef\3\2\2\2\u00f2\u00f5\3\2\2\2\u00f3\u00f1")
        buf.write("\3\2\2\2\u00f3\u00f4\3\2\2\2\u00f4\u00f7\3\2\2\2\u00f5")
        buf.write("\u00f3\3\2\2\2\u00f6\u00dd\3\2\2\2\u00f6\u00ec\3\2\2\2")
        buf.write("\u00f6\u00ed\3\2\2\2\u00f6\u00f3\3\2\2\2\u00f7\31\3\2")
        buf.write("\2\2\u00f8\u0102\5\34\17\2\u00f9\u00fb\7;\2\2\u00fa\u00f9")
        buf.write("\3\2\2\2\u00fa\u00fb\3\2\2\2\u00fb\u00fe\3\2\2\2\u00fc")
        buf.write("\u00ff\5\34\17\2\u00fd\u00ff\5\36\20\2\u00fe\u00fc\3\2")
        buf.write("\2\2\u00fe\u00fd\3\2\2\2\u00ff\u0101\3\2\2\2\u0100\u00fa")
        buf.write("\3\2\2\2\u0101\u0104\3\2\2\2\u0102\u0100\3\2\2\2\u0102")
        buf.write("\u0103\3\2\2\2\u0103\33\3\2\2\2\u0104\u0102\3\2\2\2\u0105")
        buf.write("\u010b\7g\2\2\u0106\u010c\5\16\b\2\u0107\u0108\5\16\b")
        buf.write("\2\u0108\u0109\7j\2\2\u0109\u010a\5\16\b\2\u010a\u010c")
        buf.write("\3\2\2\2\u010b\u0106\3\2\2\2\u010b\u0107\3\2\2\2\u010c")
        buf.write("\u010d\3\2\2\2\u010d\u010e\7i\2\2\u010e\u010f\5\"\22\2")
        buf.write("\u010f\35\3\2\2\2\u0110\u0111\7e\2\2\u0111\u0112\5\"\22")
        buf.write("\2\u0112\37\3\2\2\2\u0113\u011f\5\"\22\2\u0114\u0120\5")
        buf.write("\32\16\2\u0115\u0116\7L\2\2\u0116\u0118\5\"\22\2\u0117")
        buf.write("\u0115\3\2\2\2\u0118\u011b\3\2\2\2\u0119\u0117\3\2\2\2")
        buf.write("\u0119\u011a\3\2\2\2\u011a\u011d\3\2\2\2\u011b\u0119\3")
        buf.write("\2\2\2\u011c\u011e\7L\2\2\u011d\u011c\3\2\2\2\u011d\u011e")
        buf.write("\3\2\2\2\u011e\u0120\3\2\2\2\u011f\u0114\3\2\2\2\u011f")
        buf.write("\u0119\3\2\2\2\u0120!\3\2\2\2\u0121\u0141\5$\23\2\u0122")
        buf.write("\u0124\7K\2\2\u0123\u0122\3\2\2\2\u0123\u0124\3\2\2\2")
        buf.write("\u0124\u0125\3\2\2\2\u0125\u0126\7i\2\2\u0126\u0142\5")
        buf.write("$\23\2\u0127\u0129\7K\2\2\u0128\u0127\3\2\2\2\u0128\u0129")
        buf.write("\3\2\2\2\u0129\u012a\3\2\2\2\u012a\u012b\7h\2\2\u012b")
        buf.write("\u0142\5$\23\2\u012c\u012d\5\22\n\2\u012d\u012e\5$\23")
        buf.write("\2\u012e\u0130\3\2\2\2\u012f\u012c\3\2\2\2\u0130\u0133")
        buf.write("\3\2\2\2\u0131\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132")
        buf.write("\u0142\3\2\2\2\u0133\u0131\3\2\2\2\u0134\u0135\7\\\2\2")
        buf.write("\u0135\u0136\5\"\22\2\u0136\u0137\7^\2\2\u0137\u0138\5")
        buf.write("$\23\2\u0138\u0142\3\2\2\2\u0139\u013a\5\20\t\2\u013a")
        buf.write("\u013b\5$\23\2\u013b\u013d\3\2\2\2\u013c\u0139\3\2\2\2")
        buf.write("\u013d\u0140\3\2\2\2\u013e\u013c\3\2\2\2\u013e\u013f\3")
        buf.write("\2\2\2\u013f\u0142\3\2\2\2\u0140\u013e\3\2\2\2\u0141\u0123")
        buf.write("\3\2\2\2\u0141\u0128\3\2\2\2\u0141\u0131\3\2\2\2\u0141")
        buf.write("\u0134\3\2\2\2\u0141\u013e\3\2\2\2\u0142#\3\2\2\2\u0143")
        buf.write("\u0144\7G\2\2\u0144\u014e\5$\23\2\u0145\u0146\7H\2\2\u0146")
        buf.write("\u014e\5$\23\2\u0147\u0148\7I\2\2\u0148\u014e\5$\23\2")
        buf.write("\u0149\u014a\5\24\13\2\u014a\u014b\5$\23\2\u014b\u014e")
        buf.write("\3\2\2\2\u014c\u014e\5&\24\2\u014d\u0143\3\2\2\2\u014d")
        buf.write("\u0145\3\2\2\2\u014d\u0147\3\2\2\2\u014d\u0149\3\2\2\2")
        buf.write("\u014d\u014c\3\2\2\2\u014e%\3\2\2\2\u014f\u0150\b\24\1")
        buf.write("\2\u0150\u0151\5\26\f\2\u0151\u0158\3\2\2\2\u0152\u0153")
        buf.write("\f\4\2\2\u0153\u0157\7r\2\2\u0154\u0155\f\3\2\2\u0155")
        buf.write("\u0157\5\26\f\2\u0156\u0152\3\2\2\2\u0156\u0154\3\2\2")
        buf.write("\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2\2\2\u0158\u0159")
        buf.write("\3\2\2\2\u0159\'\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u015c")
        buf.write("\5\"\22\2\u015c)\3\2\2\2\u015d\u015e\7f\2\2\u015e+\3\2")
        buf.write("\2\2\u015f\u0160\t\5\2\2\u0160-\3\2\2\2\u0161\u0162\5")
        buf.write("$\23\2\u0162/\3\2\2\2\u0163\u0164\5 \21\2\u0164\u0165")
        buf.write("\5*\26\2\u0165\u0167\3\2\2\2\u0166\u0163\3\2\2\2\u0167")
        buf.write("\u0168\3\2\2\2\u0168\u0166\3\2\2\2\u0168\u0169\3\2\2\2")
        buf.write("\u0169\u016a\3\2\2\2\u016a\u016b\5 \21\2\u016b\61\3\2")
        buf.write("\2\2\u016c\u016d\5 \21\2\u016d\u016e\5,\27\2\u016e\u016f")
        buf.write("\5 \21\2\u016f\63\3\2\2\2\u0170\u0171\7M\2\2\u0171\u0172")
        buf.write("\5\16\b\2\u0172\u0173\7f\2\2\u0173\u0174\5(\25\2\u0174")
        buf.write("\65\3\2\2\2\u0175\u0176\7O\2\2\u0176\u0179\5(\25\2\u0177")
        buf.write("\u0178\7L\2\2\u0178\u017a\5(\25\2\u0179\u0177\3\2\2\2")
        buf.write("\u0179\u017a\3\2\2\2\u017a\67\3\2\2\2\u017b\u017c\7N\2")
        buf.write("\2\u017c\u017d\5(\25\2\u017d9\3\2\2\2\u017e\u017f\7P\2")
        buf.write("\2\u017f\u0180\5\16\b\2\u0180\u0181\7f\2\2\u0181\u0182")
        buf.write("\5 \21\2\u0182;\3\2\2\2\u0183\u0184\7Q\2\2\u0184\u0185")
        buf.write("\5(\25\2\u0185=\3\2\2\2\u0186\u0187\7R\2\2\u0187?\3\2")
        buf.write("\2\2\u0188\u0189\7U\2\2\u0189\u018a\5(\25\2\u018aA\3\2")
        buf.write("\2\2\u018b\u018c\7V\2\2\u018c\u018d\5(\25\2\u018dC\3\2")
        buf.write("\2\2\u018e\u018f\7S\2\2\u018f\u0190\5(\25\2\u0190E\3\2")
        buf.write("\2\2\u0191\u0193\7T\2\2\u0192\u0194\7n\2\2\u0193\u0192")
        buf.write("\3\2\2\2\u0193\u0194\3\2\2\2\u0194\u0195\3\2\2\2\u0195")
        buf.write("\u0196\5(\25\2\u0196G\3\2\2\2\u0197\u0198\7W\2\2\u0198")
        buf.write("\u0199\5(\25\2\u0199\u019a\5(\25\2\u019aI\3\2\2\2\u019b")
        buf.write("\u019c\7D\2\2\u019c\u019d\5(\25\2\u019dK\3\2\2\2\u019e")
        buf.write("\u019f\7Y\2\2\u019f\u01a4\5(\25\2\u01a0\u01a1\7L\2\2\u01a1")
        buf.write("\u01a3\5(\25\2\u01a2\u01a0\3\2\2\2\u01a3\u01a6\3\2\2\2")
        buf.write("\u01a4\u01a2\3\2\2\2\u01a4\u01a5\3\2\2\2\u01a5M\3\2\2")
        buf.write("\2\u01a6\u01a4\3\2\2\2\u01a7\u01a8\7a\2\2\u01a8\u01ad")
        buf.write("\5(\25\2\u01a9\u01aa\7L\2\2\u01aa\u01ac\5(\25\2\u01ab")
        buf.write("\u01a9\3\2\2\2\u01ac\u01af\3\2\2\2\u01ad\u01ab\3\2\2\2")
        buf.write("\u01ad\u01ae\3\2\2\2\u01aeO\3\2\2\2\u01af\u01ad\3\2\2")
        buf.write("\2\u01b0\u01b1\7X\2\2\u01b1\u01b2\7p\2\2\u01b2\u01b3\7")
        buf.write("{\2\2\u01b3Q\3\2\2\2\u01b4\u01b5\7l\2\2\u01b5\u01b6\7")
        buf.write("j\2\2\u01b6\u01b7\5l\67\2\u01b7S\3\2\2\2\u01b8\u01b9\5")
        buf.write("\32\16\2\u01b9\u01ba\7j\2\2\u01ba\u01bb\5l\67\2\u01bb")
        buf.write("U\3\2\2\2\u01bc\u01bd\7[\2\2\u01bd\u01be\5\16\b\2\u01be")
        buf.write("\u01bf\5*\26\2\u01bf\u01c1\5 \21\2\u01c0\u01c2\7;\2\2")
        buf.write("\u01c1\u01c0\3\2\2\2\u01c1\u01c2\3\2\2\2\u01c2W\3\2\2")
        buf.write("\2\u01c3\u01ca\7Z\2\2\u01c4\u01c5\7d\2\2\u01c5\u01c6\5")
        buf.write("\16\b\2\u01c6\u01c7\7i\2\2\u01c7\u01c8\5(\25\2\u01c8\u01cb")
        buf.write("\3\2\2\2\u01c9\u01cb\5(\25\2\u01ca\u01c4\3\2\2\2\u01ca")
        buf.write("\u01c9\3\2\2\2\u01cb\u01cd\3\2\2\2\u01cc\u01ce\7;\2\2")
        buf.write("\u01cd\u01cc\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ceY\3\2\2")
        buf.write("\2\u01cf\u01d2\5V,\2\u01d0\u01d2\5X-\2\u01d1\u01cf\3\2")
        buf.write("\2\2\u01d1\u01d0\3\2\2\2\u01d2\u01d4\3\2\2\2\u01d3\u01d5")
        buf.write("\5Z.\2\u01d4\u01d3\3\2\2\2\u01d4\u01d5\3\2\2\2\u01d5[")
        buf.write("\3\2\2\2\u01d6\u01d7\5Z.\2\u01d7\u01d8\7j\2\2\u01d8\u01d9")
        buf.write("\5l\67\2\u01d9]\3\2\2\2\u01da\u01db\7c\2\2\u01db\u01dc")
        buf.write("\7p\2\2\u01dc_\3\2\2\2\u01dd\u01de\7b\2\2\u01de\u01df")
        buf.write("\7p\2\2\u01df\u01e1\5\16\b\2\u01e0\u01e2\5^\60\2\u01e1")
        buf.write("\u01e0\3\2\2\2\u01e1\u01e2\3\2\2\2\u01e2\u01e3\3\2\2\2")
        buf.write("\u01e3\u01e4\7j\2\2\u01e4\u01e5\5l\67\2\u01e5a\3\2\2\2")
        buf.write("\u01e6\u01e7\7`\2\2\u01e7\u01e8\5(\25\2\u01e8\u01e9\7")
        buf.write("j\2\2\u01e9\u01ea\5l\67\2\u01eac\3\2\2\2\u01eb\u01ec\7")
        buf.write("]\2\2\u01ec\u01ed\5(\25\2\u01ed\u01ee\7j\2\2\u01ee\u01ef")
        buf.write("\5l\67\2\u01efe\3\2\2\2\u01f0\u01f1\7^\2\2\u01f1\u01f2")
        buf.write("\7j\2\2\u01f2\u01f3\5l\67\2\u01f3g\3\2\2\2\u01f4\u01f5")
        buf.write("\7\\\2\2\u01f5\u01f6\5(\25\2\u01f6\u01f7\7j\2\2\u01f7")
        buf.write("\u01fb\5l\67\2\u01f8\u01fa\5d\63\2\u01f9\u01f8\3\2\2\2")
        buf.write("\u01fa\u01fd\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fb\u01fc\3")
        buf.write("\2\2\2\u01fc\u01ff\3\2\2\2\u01fd\u01fb\3\2\2\2\u01fe\u0200")
        buf.write("\5f\64\2\u01ff\u01fe\3\2\2\2\u01ff\u0200\3\2\2\2\u0200")
        buf.write("i\3\2\2\2\u0201\u0203\5x=\2\u0202\u0201\3\2\2\2\u0203")
        buf.write("\u0204\3\2\2\2\u0204\u0202\3\2\2\2\u0204\u0205\3\2\2\2")
        buf.write("\u0205k\3\2\2\2\u0206\u0209\5n8\2\u0207\u0209\5t;\2\u0208")
        buf.write("\u0206\3\2\2\2\u0208\u0207\3\2\2\2\u0209m\3\2\2\2\u020a")
        buf.write("\u020e\7|\2\2\u020b\u020f\5j\66\2\u020c\u020d\7|\2\2\u020d")
        buf.write("\u020f\5l\67\2\u020e\u020b\3\2\2\2\u020e\u020c\3\2\2\2")
        buf.write("\u020f\u0210\3\2\2\2\u0210\u0213\7}\2\2\u0211\u0212\7")
        buf.write("z\2\2\u0212\u0214\7;\2\2\u0213\u0211\3\2\2\2\u0213\u0214")
        buf.write("\3\2\2\2\u0214o\3\2\2\2\u0215\u0217\7l\2\2\u0216\u0215")
        buf.write("\3\2\2\2\u0216\u0217\3\2\2\2\u0217\u022a\3\2\2\2\u0218")
        buf.write("\u022b\5\60\31\2\u0219\u022b\5\64\33\2\u021a\u022b\58")
        buf.write("\35\2\u021b\u022b\5:\36\2\u021c\u022b\5@!\2\u021d\u022b")
        buf.write("\5B\"\2\u021e\u022b\5D#\2\u021f\u022b\5F$\2\u0220\u022b")
        buf.write("\5<\37\2\u0221\u022b\5H%\2\u0222\u022b\5J&\2\u0223\u022b")
        buf.write("\5> \2\u0224\u022b\5L\'\2\u0225\u022b\5N(\2\u0226\u022b")
        buf.write("\5P)\2\u0227\u022b\5\66\34\2\u0228\u022b\5\62\32\2\u0229")
        buf.write("\u022b\5.\30\2\u022a\u0218\3\2\2\2\u022a\u0219\3\2\2\2")
        buf.write("\u022a\u021a\3\2\2\2\u022a\u021b\3\2\2\2\u022a\u021c\3")
        buf.write("\2\2\2\u022a\u021d\3\2\2\2\u022a\u021e\3\2\2\2\u022a\u021f")
        buf.write("\3\2\2\2\u022a\u0220\3\2\2\2\u022a\u0221\3\2\2\2\u022a")
        buf.write("\u0222\3\2\2\2\u022a\u0223\3\2\2\2\u022a\u0224\3\2\2\2")
        buf.write("\u022a\u0225\3\2\2\2\u022a\u0226\3\2\2\2\u022a\u0227\3")
        buf.write("\2\2\2\u022a\u0228\3\2\2\2\u022a\u0229\3\2\2\2\u022bq")
        buf.write("\3\2\2\2\u022c\u022e\7l\2\2\u022d\u022c\3\2\2\2\u022d")
        buf.write("\u022e\3\2\2\2\u022e\u0235\3\2\2\2\u022f\u0236\5h\65\2")
        buf.write("\u0230\u0236\5b\62\2\u0231\u0236\5T+\2\u0232\u0236\5\\")
        buf.write("/\2\u0233\u0236\5R*\2\u0234\u0236\5`\61\2\u0235\u022f")
        buf.write("\3\2\2\2\u0235\u0230\3\2\2\2\u0235\u0231\3\2\2\2\u0235")
        buf.write("\u0232\3\2\2\2\u0235\u0233\3\2\2\2\u0235\u0234\3\2\2\2")
        buf.write("\u0236s\3\2\2\2\u0237\u023e\5p9\2\u0238\u023a\7z\2\2\u0239")
        buf.write("\u0238\3\2\2\2\u0239\u023a\3\2\2\2\u023a\u023b\3\2\2\2")
        buf.write("\u023b\u023f\7;\2\2\u023c\u023d\7z\2\2\u023d\u023f\5t")
        buf.write(";\2\u023e\u0239\3\2\2\2\u023e\u023c\3\2\2\2\u023fu\3\2")
        buf.write("\2\2\u0240\u0241\7p\2\2\u0241\u0243\7j\2\2\u0242\u0240")
        buf.write("\3\2\2\2\u0243\u0244\3\2\2\2\u0244\u0242\3\2\2\2\u0244")
        buf.write("\u0245\3\2\2\2\u0245w\3\2\2\2\u0246\u0248\5v<\2\u0247")
        buf.write("\u0246\3\2\2\2\u0247\u0248\3\2\2\2\u0248\u024b\3\2\2\2")
        buf.write("\u0249\u024b\7j\2\2\u024a\u0247\3\2\2\2\u024a\u0249\3")
        buf.write("\2\2\2\u024b\u0256\3\2\2\2\u024c\u024e\7z\2\2\u024d\u024c")
        buf.write("\3\2\2\2\u024e\u0251\3\2\2\2\u024f\u024d\3\2\2\2\u024f")
        buf.write("\u0250\3\2\2\2\u0250\u0252\3\2\2\2\u0251\u024f\3\2\2\2")
        buf.write("\u0252\u0257\7;\2\2\u0253\u0257\5t;\2\u0254\u0257\5r:")
        buf.write("\2\u0255\u0257\5\4\3\2\u0256\u024f\3\2\2\2\u0256\u0253")
        buf.write("\3\2\2\2\u0256\u0254\3\2\2\2\u0256\u0255\3\2\2\2\u0257")
        buf.write("\u025e\3\2\2\2\u0258\u025b\5v<\2\u0259\u025b\7j\2\2\u025a")
        buf.write("\u0258\3\2\2\2\u025a\u0259\3\2\2\2\u025b\u025c\3\2\2\2")
        buf.write("\u025c\u025e\5n8\2\u025d\u024a\3\2\2\2\u025d\u025a\3\2")
        buf.write("\2\2\u025ey\3\2\2\2>}\u0084\u0087\u0093\u009a\u00aa\u00b1")
        buf.write("\u00c4\u00cc\u00d1\u00da\u00e7\u00ea\u00f3\u00f6\u00fa")
        buf.write("\u00fe\u0102\u010b\u0119\u011d\u011f\u0123\u0128\u0131")
        buf.write("\u013e\u0141\u014d\u0156\u0158\u0168\u0179\u0193\u01a4")
        buf.write("\u01ad\u01c1\u01ca\u01cd\u01d1\u01d4\u01e1\u01fb\u01ff")
        buf.write("\u0204\u0208\u020e\u0213\u0216\u022a\u022d\u0235\u0239")
        buf.write("\u023e\u0244\u0247\u024a\u024f\u0256\u025a\u025d")
        return buf.getvalue()


class HarmonyParser ( Parser ):

    grammarFileName = "Harmony.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'and'", "'or'", "'&'", "'|'", "'^'", 
                     "'-'", "'+'", "'//'", "'/'", "'%'", "'mod'", "'**'", 
                     "'<<'", "'>>'", "'=='", "'!='", "'<'", "'<='", "'>'", 
                     "'>='", "'~'", "'?'", "'!'", "'abs'", "'atLabel'", 
                     "'countLabel'", "'get_context'", "'get_ident'", "'contexts'", 
                     "'min'", "'max'", "'len'", "'type'", "'str'", "'any'", 
                     "'all'", "'keys'", "'hash'", "'choose'", "'end'", "'and='", 
                     "'or='", "'=>='", "'&='", "'|='", "'^='", "'-='", "'+='", 
                     "'*='", "'/='", "'//='", "'%='", "'mod='", "'**='", 
                     "'>>='", "'<<='", "<INVALID>", "<INVALID>", "'#'", 
                     "'(*'", "'*)'", "'*'", "'as'", "'.'", "'import'", "'print'", 
                     "'from'", "'..'", "'setintlevel'", "'save'", "'stop'", 
                     "'lambda'", "'not'", "','", "'const'", "'await'", "'assert'", 
                     "'var'", "'trap'", "'pass'", "'del'", "'spawn'", "'finally'", 
                     "'invariant'", "'go'", "'builtin'", "'sequential'", 
                     "'when'", "'let'", "'if'", "'elif'", "'else'", "'@'", 
                     "'while'", "'global'", "'def'", "'returns'", "'exists'", 
                     "'where'", "'='", "'for'", "'=>'", "'in'", "':'", "'None'", 
                     "'atomically'", "<INVALID>", "'eternal'", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'['", "']'", "'{'", "'}'", "'('", "')'", "';'" ]

    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>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "NL", "WS", "COMMENT_START", "OPEN_MULTI_COMMENT", 
                      "CLOSE_MULTI_COMMENT", "STAR", "AS", "DOT", "IMPORT", 
                      "PRINT", "FROM", "RANGE", "SETINTLEVEL", "SAVE", "STOP", 
                      "LAMBDA", "NOT", "COMMA", "CONST", "AWAIT", "ASSERT", 
                      "VAR", "TRAP", "PASS", "DEL", "SPAWN", "FINALLY", 
                      "INVARIANT", "GO", "BUILTIN", "SEQUENTIAL", "WHEN", 
                      "LET", "IF", "ELIF", "ELSE", "AT", "WHILE", "GLOBAL", 
                      "DEF", "RETURNS", "EXISTS", "WHERE", "EQ", "FOR", 
                      "IMPLIES", "IN", "COLON", "NONE", "ATOMICALLY", "BOOL", 
                      "ETERNAL", "INT", "NAME", "ATOM", "ARROWID", "HEX_INTEGER", 
                      "OPEN_BRACK", "CLOSE_BRACK", "OPEN_BRACES", "CLOSE_BRACES", 
                      "OPEN_PAREN", "CLOSE_PAREN", "SEMI_COLON", "STRING", 
                      "INDENT", "DEDENT" ]

    RULE_program = 0
    RULE_import_stmt = 1
    RULE_import_name = 2
    RULE_import_from = 3
    RULE_import_names_seq = 4
    RULE_tuple_bound = 5
    RULE_bound = 6
    RULE_arith_op = 7
    RULE_comp_op = 8
    RULE_unary_op = 9
    RULE_basic_expr = 10
    RULE_set_rule = 11
    RULE_iter_parse = 12
    RULE_for_parse = 13
    RULE_where_parse = 14
    RULE_tuple_rule = 15
    RULE_nary_expr = 16
    RULE_expr_rule = 17
    RULE_application = 18
    RULE_expr = 19
    RULE_assign_op = 20
    RULE_aug_assign_op = 21
    RULE_expr_stmt = 22
    RULE_assign_stmt = 23
    RULE_aug_assign_stmt = 24
    RULE_const_assign_stmt = 25
    RULE_assert_stmt = 26
    RULE_await_stmt = 27
    RULE_var_stmt = 28
    RULE_trap_stmt = 29
    RULE_pass_stmt = 30
    RULE_finally_stmt = 31
    RULE_invariant_stmt = 32
    RULE_del_stmt = 33
    RULE_spawn_stmt = 34
    RULE_go_stmt = 35
    RULE_print_stmt = 36
    RULE_sequential_stmt = 37
    RULE_global_stmt = 38
    RULE_builtin_stmt = 39
    RULE_atomic_block = 40
    RULE_for_block = 41
    RULE_let_decl = 42
    RULE_when_decl = 43
    RULE_let_when_decl = 44
    RULE_let_when_block = 45
    RULE_opt_returns = 46
    RULE_method_decl = 47
    RULE_while_block = 48
    RULE_elif_block = 49
    RULE_else_block = 50
    RULE_if_block = 51
    RULE_block_stmts = 52
    RULE_block = 53
    RULE_normal_block = 54
    RULE_simple_stmt = 55
    RULE_compound_stmt = 56
    RULE_one_line_stmt = 57
    RULE_label = 58
    RULE_stmt = 59

    ruleNames =  [ "program", "import_stmt", "import_name", "import_from", 
                   "import_names_seq", "tuple_bound", "bound", "arith_op", 
                   "comp_op", "unary_op", "basic_expr", "set_rule", "iter_parse", 
                   "for_parse", "where_parse", "tuple_rule", "nary_expr", 
                   "expr_rule", "application", "expr", "assign_op", "aug_assign_op", 
                   "expr_stmt", "assign_stmt", "aug_assign_stmt", "const_assign_stmt", 
                   "assert_stmt", "await_stmt", "var_stmt", "trap_stmt", 
                   "pass_stmt", "finally_stmt", "invariant_stmt", "del_stmt", 
                   "spawn_stmt", "go_stmt", "print_stmt", "sequential_stmt", 
                   "global_stmt", "builtin_stmt", "atomic_block", "for_block", 
                   "let_decl", "when_decl", "let_when_decl", "let_when_block", 
                   "opt_returns", "method_decl", "while_block", "elif_block", 
                   "else_block", "if_block", "block_stmts", "block", "normal_block", 
                   "simple_stmt", "compound_stmt", "one_line_stmt", "label", 
                   "stmt" ]

    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
    T__53=54
    T__54=55
    T__55=56
    NL=57
    WS=58
    COMMENT_START=59
    OPEN_MULTI_COMMENT=60
    CLOSE_MULTI_COMMENT=61
    STAR=62
    AS=63
    DOT=64
    IMPORT=65
    PRINT=66
    FROM=67
    RANGE=68
    SETINTLEVEL=69
    SAVE=70
    STOP=71
    LAMBDA=72
    NOT=73
    COMMA=74
    CONST=75
    AWAIT=76
    ASSERT=77
    VAR=78
    TRAP=79
    PASS=80
    DEL=81
    SPAWN=82
    FINALLY=83
    INVARIANT=84
    GO=85
    BUILTIN=86
    SEQUENTIAL=87
    WHEN=88
    LET=89
    IF=90
    ELIF=91
    ELSE=92
    AT=93
    WHILE=94
    GLOBAL=95
    DEF=96
    RETURNS=97
    EXISTS=98
    WHERE=99
    EQ=100
    FOR=101
    IMPLIES=102
    IN=103
    COLON=104
    NONE=105
    ATOMICALLY=106
    BOOL=107
    ETERNAL=108
    INT=109
    NAME=110
    ATOM=111
    ARROWID=112
    HEX_INTEGER=113
    OPEN_BRACK=114
    CLOSE_BRACK=115
    OPEN_BRACES=116
    CLOSE_BRACES=117
    OPEN_PAREN=118
    CLOSE_PAREN=119
    SEMI_COLON=120
    STRING=121
    INDENT=122
    DEDENT=123

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




    class ProgramContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.StmtContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.StmtContext,i)


        def getRuleIndex(self):
            return HarmonyParser.RULE_program

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




    def program(self):

        localctx = HarmonyParser.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 = 123
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__5) | (1 << HarmonyParser.T__20) | (1 << HarmonyParser.T__21) | (1 << HarmonyParser.T__22) | (1 << HarmonyParser.T__23) | (1 << HarmonyParser.T__24) | (1 << HarmonyParser.T__25) | (1 << HarmonyParser.T__26) | (1 << HarmonyParser.T__27) | (1 << HarmonyParser.T__28) | (1 << HarmonyParser.T__29) | (1 << HarmonyParser.T__30) | (1 << HarmonyParser.T__31) | (1 << HarmonyParser.T__32) | (1 << HarmonyParser.T__33) | (1 << HarmonyParser.T__34) | (1 << HarmonyParser.T__35) | (1 << HarmonyParser.T__36) | (1 << HarmonyParser.T__37) | (1 << HarmonyParser.T__38) | (1 << HarmonyParser.NL))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (HarmonyParser.IMPORT - 65)) | (1 << (HarmonyParser.PRINT - 65)) | (1 << (HarmonyParser.FROM - 65)) | (1 << (HarmonyParser.SETINTLEVEL - 65)) | (1 << (HarmonyParser.SAVE - 65)) | (1 << (HarmonyParser.STOP - 65)) | (1 << (HarmonyParser.LAMBDA - 65)) | (1 << (HarmonyParser.NOT - 65)) | (1 << (HarmonyParser.CONST - 65)) | (1 << (HarmonyParser.AWAIT - 65)) | (1 << (HarmonyParser.ASSERT - 65)) | (1 << (HarmonyParser.VAR - 65)) | (1 << (HarmonyParser.TRAP - 65)) | (1 << (HarmonyParser.PASS - 65)) | (1 << (HarmonyParser.DEL - 65)) | (1 << (HarmonyParser.SPAWN - 65)) | (1 << (HarmonyParser.FINALLY - 65)) | (1 << (HarmonyParser.INVARIANT - 65)) | (1 << (HarmonyParser.GO - 65)) | (1 << (HarmonyParser.BUILTIN - 65)) | (1 << (HarmonyParser.SEQUENTIAL - 65)) | (1 << (HarmonyParser.WHEN - 65)) | (1 << (HarmonyParser.LET - 65)) | (1 << (HarmonyParser.IF - 65)) | (1 << (HarmonyParser.WHILE - 65)) | (1 << (HarmonyParser.GLOBAL - 65)) | (1 << (HarmonyParser.DEF - 65)) | (1 << (HarmonyParser.FOR - 65)) | (1 << (HarmonyParser.COLON - 65)) | (1 << (HarmonyParser.NONE - 65)) | (1 << (HarmonyParser.ATOMICALLY - 65)) | (1 << (HarmonyParser.BOOL - 65)) | (1 << (HarmonyParser.INT - 65)) | (1 << (HarmonyParser.NAME - 65)) | (1 << (HarmonyParser.ATOM - 65)) | (1 << (HarmonyParser.OPEN_BRACK - 65)) | (1 << (HarmonyParser.OPEN_BRACES - 65)) | (1 << (HarmonyParser.OPEN_PAREN - 65)) | (1 << (HarmonyParser.SEMI_COLON - 65)) | (1 << (HarmonyParser.STRING - 65)))) != 0):
                self.state = 120
                self.stmt()
                self.state = 125
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class Import_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NL(self):
            return self.getToken(HarmonyParser.NL, 0)

        def import_name(self):
            return self.getTypedRuleContext(HarmonyParser.Import_nameContext,0)


        def import_from(self):
            return self.getTypedRuleContext(HarmonyParser.Import_fromContext,0)


        def SEMI_COLON(self):
            return self.getToken(HarmonyParser.SEMI_COLON, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_import_stmt

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




    def import_stmt(self):

        localctx = HarmonyParser.Import_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_import_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 130
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.IMPORT]:
                self.state = 128
                self.import_name()
                pass
            elif token in [HarmonyParser.FROM]:
                self.state = 129
                self.import_from()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 133
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.SEMI_COLON:
                self.state = 132
                self.match(HarmonyParser.SEMI_COLON)


            self.state = 135
            self.match(HarmonyParser.NL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Import_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IMPORT(self):
            return self.getToken(HarmonyParser.IMPORT, 0)

        def import_names_seq(self):
            return self.getTypedRuleContext(HarmonyParser.Import_names_seqContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_import_name

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




    def import_name(self):

        localctx = HarmonyParser.Import_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_import_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 137
            self.match(HarmonyParser.IMPORT)
            self.state = 138
            self.import_names_seq()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Import_fromContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def IMPORT(self):
            return self.getToken(HarmonyParser.IMPORT, 0)

        def STAR(self):
            return self.getToken(HarmonyParser.STAR, 0)

        def import_names_seq(self):
            return self.getTypedRuleContext(HarmonyParser.Import_names_seqContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_import_from

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




    def import_from(self):

        localctx = HarmonyParser.Import_fromContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_import_from)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 140
            self.match(HarmonyParser.FROM)
            self.state = 141
            self.match(HarmonyParser.NAME)
            self.state = 142
            self.match(HarmonyParser.IMPORT)
            self.state = 145
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.STAR]:
                self.state = 143
                self.match(HarmonyParser.STAR)
                pass
            elif token in [HarmonyParser.NAME]:
                self.state = 144
                self.import_names_seq()
                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 Import_names_seqContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return HarmonyParser.RULE_import_names_seq

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




    def import_names_seq(self):

        localctx = HarmonyParser.Import_names_seqContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_import_names_seq)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 147
            self.match(HarmonyParser.NAME)
            self.state = 152
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==HarmonyParser.COMMA:
                self.state = 148
                self.match(HarmonyParser.COMMA)
                self.state = 149
                self.match(HarmonyParser.NAME)
                self.state = 154
                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 Tuple_boundContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def OPEN_PAREN(self):
            return self.getToken(HarmonyParser.OPEN_PAREN, 0)

        def bound(self):
            return self.getTypedRuleContext(HarmonyParser.BoundContext,0)


        def CLOSE_PAREN(self):
            return self.getToken(HarmonyParser.CLOSE_PAREN, 0)

        def OPEN_BRACK(self):
            return self.getToken(HarmonyParser.OPEN_BRACK, 0)

        def CLOSE_BRACK(self):
            return self.getToken(HarmonyParser.CLOSE_BRACK, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_tuple_bound

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




    def tuple_bound(self):

        localctx = HarmonyParser.Tuple_boundContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_tuple_bound)
        try:
            self.state = 168
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,5,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 155
                self.match(HarmonyParser.NAME)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 156
                self.match(HarmonyParser.OPEN_PAREN)
                self.state = 157
                self.bound()
                self.state = 158
                self.match(HarmonyParser.CLOSE_PAREN)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 160
                self.match(HarmonyParser.OPEN_BRACK)
                self.state = 161
                self.bound()
                self.state = 162
                self.match(HarmonyParser.CLOSE_BRACK)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 164
                self.match(HarmonyParser.OPEN_PAREN)
                self.state = 165
                self.match(HarmonyParser.CLOSE_PAREN)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 166
                self.match(HarmonyParser.OPEN_BRACK)
                self.state = 167
                self.match(HarmonyParser.CLOSE_BRACK)
                pass


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


    class BoundContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def tuple_bound(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Tuple_boundContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Tuple_boundContext,i)


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

        def getRuleIndex(self):
            return HarmonyParser.RULE_bound

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




    def bound(self):

        localctx = HarmonyParser.BoundContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_bound)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 175
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,6,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 170
                    self.tuple_bound()
                    self.state = 171
                    self.match(HarmonyParser.COMMA) 
                self.state = 177
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,6,self._ctx)

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


    class Arith_opContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def STAR(self):
            return self.getToken(HarmonyParser.STAR, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_arith_op

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




    def arith_op(self):

        localctx = HarmonyParser.Arith_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_arith_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 180
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__0) | (1 << HarmonyParser.T__1) | (1 << HarmonyParser.T__2) | (1 << HarmonyParser.T__3) | (1 << HarmonyParser.T__4) | (1 << HarmonyParser.T__5) | (1 << HarmonyParser.T__6) | (1 << HarmonyParser.T__7) | (1 << HarmonyParser.T__8) | (1 << HarmonyParser.T__9) | (1 << HarmonyParser.T__10) | (1 << HarmonyParser.T__11) | (1 << HarmonyParser.T__12) | (1 << HarmonyParser.T__13) | (1 << HarmonyParser.STAR))) != 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 Comp_opContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_comp_op

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




    def comp_op(self):

        localctx = HarmonyParser.Comp_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_comp_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 182
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__14) | (1 << HarmonyParser.T__15) | (1 << HarmonyParser.T__16) | (1 << HarmonyParser.T__17) | (1 << HarmonyParser.T__18) | (1 << HarmonyParser.T__19))) != 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 Unary_opContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NOT(self):
            return self.getToken(HarmonyParser.NOT, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_unary_op

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




    def unary_op(self):

        localctx = HarmonyParser.Unary_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_unary_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 184
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__5) | (1 << HarmonyParser.T__20) | (1 << HarmonyParser.T__21) | (1 << HarmonyParser.T__22) | (1 << HarmonyParser.T__23) | (1 << HarmonyParser.T__24) | (1 << HarmonyParser.T__25) | (1 << HarmonyParser.T__26) | (1 << HarmonyParser.T__27) | (1 << HarmonyParser.T__28) | (1 << HarmonyParser.T__29) | (1 << HarmonyParser.T__30) | (1 << HarmonyParser.T__31) | (1 << HarmonyParser.T__32) | (1 << HarmonyParser.T__33) | (1 << HarmonyParser.T__34) | (1 << HarmonyParser.T__35) | (1 << HarmonyParser.T__36) | (1 << HarmonyParser.T__37) | (1 << HarmonyParser.T__38))) != 0) or _la==HarmonyParser.NOT):
                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 Basic_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_basic_expr

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



    class StrContext(Basic_exprContext):

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

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

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


    class BoolContext(Basic_exprContext):

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

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

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


    class Paren_tupleContext(Basic_exprContext):

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

        def OPEN_PAREN(self):
            return self.getToken(HarmonyParser.OPEN_PAREN, 0)
        def CLOSE_PAREN(self):
            return self.getToken(HarmonyParser.CLOSE_PAREN, 0)
        def tuple_rule(self):
            return self.getTypedRuleContext(HarmonyParser.Tuple_ruleContext,0)


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


    class NameContext(Basic_exprContext):

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

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

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


    class Lambda_exprContext(Basic_exprContext):

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

        def LAMBDA(self):
            return self.getToken(HarmonyParser.LAMBDA, 0)
        def bound(self):
            return self.getTypedRuleContext(HarmonyParser.BoundContext,0)

        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)
        def nary_expr(self):
            return self.getTypedRuleContext(HarmonyParser.Nary_exprContext,0)


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


    class Set_rule_1Context(Basic_exprContext):

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

        def OPEN_BRACES(self):
            return self.getToken(HarmonyParser.OPEN_BRACES, 0)
        def CLOSE_BRACES(self):
            return self.getToken(HarmonyParser.CLOSE_BRACES, 0)
        def set_rule(self):
            return self.getTypedRuleContext(HarmonyParser.Set_ruleContext,0)


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


    class NoneContext(Basic_exprContext):

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

        def NONE(self):
            return self.getToken(HarmonyParser.NONE, 0)

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


    class AtomContext(Basic_exprContext):

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

        def ATOM(self):
            return self.getToken(HarmonyParser.ATOM, 0)

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


    class Bracket_tupleContext(Basic_exprContext):

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

        def OPEN_BRACK(self):
            return self.getToken(HarmonyParser.OPEN_BRACK, 0)
        def CLOSE_BRACK(self):
            return self.getToken(HarmonyParser.CLOSE_BRACK, 0)
        def tuple_rule(self):
            return self.getTypedRuleContext(HarmonyParser.Tuple_ruleContext,0)


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


    class IntContext(Basic_exprContext):

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

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

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


    class Empty_dictContext(Basic_exprContext):

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

        def OPEN_BRACES(self):
            return self.getToken(HarmonyParser.OPEN_BRACES, 0)
        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)
        def CLOSE_BRACES(self):
            return self.getToken(HarmonyParser.CLOSE_BRACES, 0)

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



    def basic_expr(self):

        localctx = HarmonyParser.Basic_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_basic_expr)
        self._la = 0 # Token type
        try:
            self.state = 216
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                localctx = HarmonyParser.IntContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 186
                self.match(HarmonyParser.INT)
                pass

            elif la_ == 2:
                localctx = HarmonyParser.BoolContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 187
                self.match(HarmonyParser.BOOL)
                pass

            elif la_ == 3:
                localctx = HarmonyParser.AtomContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 188
                self.match(HarmonyParser.ATOM)
                pass

            elif la_ == 4:
                localctx = HarmonyParser.NameContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 189
                self.match(HarmonyParser.NAME)
                pass

            elif la_ == 5:
                localctx = HarmonyParser.StrContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 190
                self.match(HarmonyParser.STRING)
                pass

            elif la_ == 6:
                localctx = HarmonyParser.NoneContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 191
                self.match(HarmonyParser.NONE)
                pass

            elif la_ == 7:
                localctx = HarmonyParser.Set_rule_1Context(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 192
                self.match(HarmonyParser.OPEN_BRACES)
                self.state = 194
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__5) | (1 << HarmonyParser.T__20) | (1 << HarmonyParser.T__21) | (1 << HarmonyParser.T__22) | (1 << HarmonyParser.T__23) | (1 << HarmonyParser.T__24) | (1 << HarmonyParser.T__25) | (1 << HarmonyParser.T__26) | (1 << HarmonyParser.T__27) | (1 << HarmonyParser.T__28) | (1 << HarmonyParser.T__29) | (1 << HarmonyParser.T__30) | (1 << HarmonyParser.T__31) | (1 << HarmonyParser.T__32) | (1 << HarmonyParser.T__33) | (1 << HarmonyParser.T__34) | (1 << HarmonyParser.T__35) | (1 << HarmonyParser.T__36) | (1 << HarmonyParser.T__37) | (1 << HarmonyParser.T__38))) != 0) or ((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & ((1 << (HarmonyParser.SETINTLEVEL - 69)) | (1 << (HarmonyParser.SAVE - 69)) | (1 << (HarmonyParser.STOP - 69)) | (1 << (HarmonyParser.LAMBDA - 69)) | (1 << (HarmonyParser.NOT - 69)) | (1 << (HarmonyParser.NONE - 69)) | (1 << (HarmonyParser.BOOL - 69)) | (1 << (HarmonyParser.INT - 69)) | (1 << (HarmonyParser.NAME - 69)) | (1 << (HarmonyParser.ATOM - 69)) | (1 << (HarmonyParser.OPEN_BRACK - 69)) | (1 << (HarmonyParser.OPEN_BRACES - 69)) | (1 << (HarmonyParser.OPEN_PAREN - 69)) | (1 << (HarmonyParser.STRING - 69)))) != 0):
                    self.state = 193
                    self.set_rule()


                self.state = 196
                self.match(HarmonyParser.CLOSE_BRACES)
                pass

            elif la_ == 8:
                localctx = HarmonyParser.Empty_dictContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 197
                self.match(HarmonyParser.OPEN_BRACES)
                self.state = 198
                self.match(HarmonyParser.COLON)
                self.state = 199
                self.match(HarmonyParser.CLOSE_BRACES)
                pass

            elif la_ == 9:
                localctx = HarmonyParser.Paren_tupleContext(self, localctx)
                self.enterOuterAlt(localctx, 9)
                self.state = 200
                self.match(HarmonyParser.OPEN_PAREN)
                self.state = 202
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__5) | (1 << HarmonyParser.T__20) | (1 << HarmonyParser.T__21) | (1 << HarmonyParser.T__22) | (1 << HarmonyParser.T__23) | (1 << HarmonyParser.T__24) | (1 << HarmonyParser.T__25) | (1 << HarmonyParser.T__26) | (1 << HarmonyParser.T__27) | (1 << HarmonyParser.T__28) | (1 << HarmonyParser.T__29) | (1 << HarmonyParser.T__30) | (1 << HarmonyParser.T__31) | (1 << HarmonyParser.T__32) | (1 << HarmonyParser.T__33) | (1 << HarmonyParser.T__34) | (1 << HarmonyParser.T__35) | (1 << HarmonyParser.T__36) | (1 << HarmonyParser.T__37) | (1 << HarmonyParser.T__38))) != 0) or ((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & ((1 << (HarmonyParser.SETINTLEVEL - 69)) | (1 << (HarmonyParser.SAVE - 69)) | (1 << (HarmonyParser.STOP - 69)) | (1 << (HarmonyParser.LAMBDA - 69)) | (1 << (HarmonyParser.NOT - 69)) | (1 << (HarmonyParser.NONE - 69)) | (1 << (HarmonyParser.BOOL - 69)) | (1 << (HarmonyParser.INT - 69)) | (1 << (HarmonyParser.NAME - 69)) | (1 << (HarmonyParser.ATOM - 69)) | (1 << (HarmonyParser.OPEN_BRACK - 69)) | (1 << (HarmonyParser.OPEN_BRACES - 69)) | (1 << (HarmonyParser.OPEN_PAREN - 69)) | (1 << (HarmonyParser.STRING - 69)))) != 0):
                    self.state = 201
                    self.tuple_rule()


                self.state = 204
                self.match(HarmonyParser.CLOSE_PAREN)
                pass

            elif la_ == 10:
                localctx = HarmonyParser.Bracket_tupleContext(self, localctx)
                self.enterOuterAlt(localctx, 10)
                self.state = 205
                self.match(HarmonyParser.OPEN_BRACK)
                self.state = 207
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__5) | (1 << HarmonyParser.T__20) | (1 << HarmonyParser.T__21) | (1 << HarmonyParser.T__22) | (1 << HarmonyParser.T__23) | (1 << HarmonyParser.T__24) | (1 << HarmonyParser.T__25) | (1 << HarmonyParser.T__26) | (1 << HarmonyParser.T__27) | (1 << HarmonyParser.T__28) | (1 << HarmonyParser.T__29) | (1 << HarmonyParser.T__30) | (1 << HarmonyParser.T__31) | (1 << HarmonyParser.T__32) | (1 << HarmonyParser.T__33) | (1 << HarmonyParser.T__34) | (1 << HarmonyParser.T__35) | (1 << HarmonyParser.T__36) | (1 << HarmonyParser.T__37) | (1 << HarmonyParser.T__38))) != 0) or ((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & ((1 << (HarmonyParser.SETINTLEVEL - 69)) | (1 << (HarmonyParser.SAVE - 69)) | (1 << (HarmonyParser.STOP - 69)) | (1 << (HarmonyParser.LAMBDA - 69)) | (1 << (HarmonyParser.NOT - 69)) | (1 << (HarmonyParser.NONE - 69)) | (1 << (HarmonyParser.BOOL - 69)) | (1 << (HarmonyParser.INT - 69)) | (1 << (HarmonyParser.NAME - 69)) | (1 << (HarmonyParser.ATOM - 69)) | (1 << (HarmonyParser.OPEN_BRACK - 69)) | (1 << (HarmonyParser.OPEN_BRACES - 69)) | (1 << (HarmonyParser.OPEN_PAREN - 69)) | (1 << (HarmonyParser.STRING - 69)))) != 0):
                    self.state = 206
                    self.tuple_rule()


                self.state = 209
                self.match(HarmonyParser.CLOSE_BRACK)
                pass

            elif la_ == 11:
                localctx = HarmonyParser.Lambda_exprContext(self, localctx)
                self.enterOuterAlt(localctx, 11)
                self.state = 210
                self.match(HarmonyParser.LAMBDA)
                self.state = 211
                self.bound()
                self.state = 212
                self.match(HarmonyParser.COLON)
                self.state = 213
                self.nary_expr()
                self.state = 214
                self.match(HarmonyParser.T__39)
                pass


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


    class Set_ruleContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def nary_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Nary_exprContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Nary_exprContext,i)


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

        def iter_parse(self):
            return self.getTypedRuleContext(HarmonyParser.Iter_parseContext,0)


        def RANGE(self):
            return self.getToken(HarmonyParser.RANGE, 0)

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

        def getRuleIndex(self):
            return HarmonyParser.RULE_set_rule

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




    def set_rule(self):

        localctx = HarmonyParser.Set_ruleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_set_rule)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 218
            self.nary_expr()
            self.state = 244
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.COLON]:
                self.state = 219
                self.match(HarmonyParser.COLON)
                self.state = 220
                self.nary_expr()
                self.state = 232
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [HarmonyParser.FOR]:
                    self.state = 221
                    self.iter_parse()
                    pass
                elif token in [HarmonyParser.COMMA, HarmonyParser.CLOSE_BRACES]:
                    self.state = 229
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==HarmonyParser.COMMA:
                        self.state = 222
                        self.match(HarmonyParser.COMMA)
                        self.state = 223
                        self.nary_expr()
                        self.state = 224
                        self.match(HarmonyParser.COLON)
                        self.state = 225
                        self.nary_expr()
                        self.state = 231
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)

                    pass
                else:
                    raise NoViableAltException(self)

                pass
            elif token in [HarmonyParser.FOR]:
                self.state = 234
                self.iter_parse()
                pass
            elif token in [HarmonyParser.RANGE]:
                self.state = 235
                self.match(HarmonyParser.RANGE)
                self.state = 236
                self.nary_expr()
                pass
            elif token in [HarmonyParser.COMMA, HarmonyParser.CLOSE_BRACES]:
                self.state = 241
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==HarmonyParser.COMMA:
                    self.state = 237
                    self.match(HarmonyParser.COMMA)
                    self.state = 238
                    self.nary_expr()
                    self.state = 243
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

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

        def for_parse(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.For_parseContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.For_parseContext,i)


        def where_parse(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Where_parseContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Where_parseContext,i)


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

        def getRuleIndex(self):
            return HarmonyParser.RULE_iter_parse

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




    def iter_parse(self):

        localctx = HarmonyParser.Iter_parseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_iter_parse)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 246
            self.for_parse()
            self.state = 256
            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 = 248
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==HarmonyParser.NL:
                        self.state = 247
                        self.match(HarmonyParser.NL)


                    self.state = 252
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [HarmonyParser.FOR]:
                        self.state = 250
                        self.for_parse()
                        pass
                    elif token in [HarmonyParser.WHERE]:
                        self.state = 251
                        self.where_parse()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 258
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,17,self._ctx)

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


    class For_parseContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FOR(self):
            return self.getToken(HarmonyParser.FOR, 0)

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

        def nary_expr(self):
            return self.getTypedRuleContext(HarmonyParser.Nary_exprContext,0)


        def bound(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.BoundContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.BoundContext,i)


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_for_parse

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




    def for_parse(self):

        localctx = HarmonyParser.For_parseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_for_parse)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 259
            self.match(HarmonyParser.FOR)
            self.state = 265
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,18,self._ctx)
            if la_ == 1:
                self.state = 260
                self.bound()
                pass

            elif la_ == 2:
                self.state = 261
                self.bound()
                self.state = 262
                self.match(HarmonyParser.COLON)
                self.state = 263
                self.bound()
                pass


            self.state = 267
            self.match(HarmonyParser.IN)
            self.state = 268
            self.nary_expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Where_parseContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def WHERE(self):
            return self.getToken(HarmonyParser.WHERE, 0)

        def nary_expr(self):
            return self.getTypedRuleContext(HarmonyParser.Nary_exprContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_where_parse

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




    def where_parse(self):

        localctx = HarmonyParser.Where_parseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_where_parse)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 270
            self.match(HarmonyParser.WHERE)
            self.state = 271
            self.nary_expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Tuple_ruleContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def nary_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Nary_exprContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Nary_exprContext,i)


        def iter_parse(self):
            return self.getTypedRuleContext(HarmonyParser.Iter_parseContext,0)


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

        def getRuleIndex(self):
            return HarmonyParser.RULE_tuple_rule

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




    def tuple_rule(self):

        localctx = HarmonyParser.Tuple_ruleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_tuple_rule)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 273
            self.nary_expr()
            self.state = 285
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.FOR]:
                self.state = 274
                self.iter_parse()
                pass
            elif token in [HarmonyParser.T__40, HarmonyParser.T__41, HarmonyParser.T__42, HarmonyParser.T__43, HarmonyParser.T__44, HarmonyParser.T__45, HarmonyParser.T__46, HarmonyParser.T__47, HarmonyParser.T__48, HarmonyParser.T__49, HarmonyParser.T__50, HarmonyParser.T__51, HarmonyParser.T__52, HarmonyParser.T__53, HarmonyParser.T__54, HarmonyParser.T__55, HarmonyParser.NL, HarmonyParser.COMMA, HarmonyParser.WHEN, HarmonyParser.LET, HarmonyParser.EQ, HarmonyParser.COLON, HarmonyParser.CLOSE_BRACK, HarmonyParser.CLOSE_PAREN, HarmonyParser.SEMI_COLON]:
                self.state = 279
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,19,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 275
                        self.match(HarmonyParser.COMMA)
                        self.state = 276
                        self.nary_expr() 
                    self.state = 281
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,19,self._ctx)

                self.state = 283
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==HarmonyParser.COMMA:
                    self.state = 282
                    self.match(HarmonyParser.COMMA)


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

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

        def expr_rule(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Expr_ruleContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Expr_ruleContext,i)


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

        def IMPLIES(self):
            return self.getToken(HarmonyParser.IMPLIES, 0)

        def IF(self):
            return self.getToken(HarmonyParser.IF, 0)

        def nary_expr(self):
            return self.getTypedRuleContext(HarmonyParser.Nary_exprContext,0)


        def ELSE(self):
            return self.getToken(HarmonyParser.ELSE, 0)

        def NOT(self):
            return self.getToken(HarmonyParser.NOT, 0)

        def comp_op(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Comp_opContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Comp_opContext,i)


        def arith_op(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Arith_opContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Arith_opContext,i)


        def getRuleIndex(self):
            return HarmonyParser.RULE_nary_expr

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




    def nary_expr(self):

        localctx = HarmonyParser.Nary_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_nary_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 287
            self.expr_rule()
            self.state = 319
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,26,self._ctx)
            if la_ == 1:
                self.state = 289
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==HarmonyParser.NOT:
                    self.state = 288
                    self.match(HarmonyParser.NOT)


                self.state = 291
                self.match(HarmonyParser.IN)
                self.state = 292
                self.expr_rule()
                pass

            elif la_ == 2:
                self.state = 294
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==HarmonyParser.NOT:
                    self.state = 293
                    self.match(HarmonyParser.NOT)


                self.state = 296
                self.match(HarmonyParser.IMPLIES)
                self.state = 297
                self.expr_rule()
                pass

            elif la_ == 3:
                self.state = 303
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__14) | (1 << HarmonyParser.T__15) | (1 << HarmonyParser.T__16) | (1 << HarmonyParser.T__17) | (1 << HarmonyParser.T__18) | (1 << HarmonyParser.T__19))) != 0):
                    self.state = 298
                    self.comp_op()
                    self.state = 299
                    self.expr_rule()
                    self.state = 305
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

            elif la_ == 4:
                self.state = 306
                self.match(HarmonyParser.IF)
                self.state = 307
                self.nary_expr()
                self.state = 308
                self.match(HarmonyParser.ELSE)
                self.state = 309
                self.expr_rule()
                pass

            elif la_ == 5:
                self.state = 316
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,25,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 311
                        self.arith_op()
                        self.state = 312
                        self.expr_rule() 
                    self.state = 318
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,25,self._ctx)

                pass


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


    class Expr_ruleContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SETINTLEVEL(self):
            return self.getToken(HarmonyParser.SETINTLEVEL, 0)

        def expr_rule(self):
            return self.getTypedRuleContext(HarmonyParser.Expr_ruleContext,0)


        def SAVE(self):
            return self.getToken(HarmonyParser.SAVE, 0)

        def STOP(self):
            return self.getToken(HarmonyParser.STOP, 0)

        def unary_op(self):
            return self.getTypedRuleContext(HarmonyParser.Unary_opContext,0)


        def application(self):
            return self.getTypedRuleContext(HarmonyParser.ApplicationContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_expr_rule

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




    def expr_rule(self):

        localctx = HarmonyParser.Expr_ruleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_expr_rule)
        try:
            self.state = 331
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.SETINTLEVEL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 321
                self.match(HarmonyParser.SETINTLEVEL)
                self.state = 322
                self.expr_rule()
                pass
            elif token in [HarmonyParser.SAVE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 323
                self.match(HarmonyParser.SAVE)
                self.state = 324
                self.expr_rule()
                pass
            elif token in [HarmonyParser.STOP]:
                self.enterOuterAlt(localctx, 3)
                self.state = 325
                self.match(HarmonyParser.STOP)
                self.state = 326
                self.expr_rule()
                pass
            elif token in [HarmonyParser.T__5, HarmonyParser.T__20, HarmonyParser.T__21, HarmonyParser.T__22, HarmonyParser.T__23, HarmonyParser.T__24, HarmonyParser.T__25, HarmonyParser.T__26, HarmonyParser.T__27, HarmonyParser.T__28, HarmonyParser.T__29, HarmonyParser.T__30, HarmonyParser.T__31, HarmonyParser.T__32, HarmonyParser.T__33, HarmonyParser.T__34, HarmonyParser.T__35, HarmonyParser.T__36, HarmonyParser.T__37, HarmonyParser.T__38, HarmonyParser.NOT]:
                self.enterOuterAlt(localctx, 4)
                self.state = 327
                self.unary_op()
                self.state = 328
                self.expr_rule()
                pass
            elif token in [HarmonyParser.LAMBDA, HarmonyParser.NONE, HarmonyParser.BOOL, HarmonyParser.INT, HarmonyParser.NAME, HarmonyParser.ATOM, HarmonyParser.OPEN_BRACK, HarmonyParser.OPEN_BRACES, HarmonyParser.OPEN_PAREN, HarmonyParser.STRING]:
                self.enterOuterAlt(localctx, 5)
                self.state = 330
                self.application(0)
                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 ApplicationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def basic_expr(self):
            return self.getTypedRuleContext(HarmonyParser.Basic_exprContext,0)


        def application(self):
            return self.getTypedRuleContext(HarmonyParser.ApplicationContext,0)


        def ARROWID(self):
            return self.getToken(HarmonyParser.ARROWID, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_application

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



    def application(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = HarmonyParser.ApplicationContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 36
        self.enterRecursionRule(localctx, 36, self.RULE_application, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 334
            self.basic_expr()
            self._ctx.stop = self._input.LT(-1)
            self.state = 342
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,29,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 = 340
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,28,self._ctx)
                    if la_ == 1:
                        localctx = HarmonyParser.ApplicationContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_application)
                        self.state = 336
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 337
                        self.match(HarmonyParser.ARROWID)
                        pass

                    elif la_ == 2:
                        localctx = HarmonyParser.ApplicationContext(self, _parentctx, _parentState)
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_application)
                        self.state = 338
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 339
                        self.basic_expr()
                        pass

             
                self.state = 344
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,29,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 ExprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def nary_expr(self):
            return self.getTypedRuleContext(HarmonyParser.Nary_exprContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_expr

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




    def expr(self):

        localctx = HarmonyParser.ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 345
            self.nary_expr()
        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):
        __slots__ = 'parser'

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

        def EQ(self):
            return self.getToken(HarmonyParser.EQ, 0)

        def getRuleIndex(self):
            return HarmonyParser.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 = HarmonyParser.Assign_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_assign_op)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 347
            self.match(HarmonyParser.EQ)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Aug_assign_opContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_aug_assign_op

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




    def aug_assign_op(self):

        localctx = HarmonyParser.Aug_assign_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_aug_assign_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 349
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__40) | (1 << HarmonyParser.T__41) | (1 << HarmonyParser.T__42) | (1 << HarmonyParser.T__43) | (1 << HarmonyParser.T__44) | (1 << HarmonyParser.T__45) | (1 << HarmonyParser.T__46) | (1 << HarmonyParser.T__47) | (1 << HarmonyParser.T__48) | (1 << HarmonyParser.T__49) | (1 << HarmonyParser.T__50) | (1 << HarmonyParser.T__51) | (1 << HarmonyParser.T__52) | (1 << HarmonyParser.T__53) | (1 << HarmonyParser.T__54) | (1 << HarmonyParser.T__55))) != 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 Expr_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expr_rule(self):
            return self.getTypedRuleContext(HarmonyParser.Expr_ruleContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_expr_stmt

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




    def expr_stmt(self):

        localctx = HarmonyParser.Expr_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_expr_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 351
            self.expr_rule()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Assign_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def tuple_rule(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Tuple_ruleContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Tuple_ruleContext,i)


        def assign_op(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Assign_opContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Assign_opContext,i)


        def getRuleIndex(self):
            return HarmonyParser.RULE_assign_stmt

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




    def assign_stmt(self):

        localctx = HarmonyParser.Assign_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_assign_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 356 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 353
                    self.tuple_rule()
                    self.state = 354
                    self.assign_op()

                else:
                    raise NoViableAltException(self)
                self.state = 358 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,30,self._ctx)

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


    class Aug_assign_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def tuple_rule(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Tuple_ruleContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Tuple_ruleContext,i)


        def aug_assign_op(self):
            return self.getTypedRuleContext(HarmonyParser.Aug_assign_opContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_aug_assign_stmt

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




    def aug_assign_stmt(self):

        localctx = HarmonyParser.Aug_assign_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_aug_assign_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 362
            self.tuple_rule()
            self.state = 363
            self.aug_assign_op()
            self.state = 364
            self.tuple_rule()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Const_assign_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CONST(self):
            return self.getToken(HarmonyParser.CONST, 0)

        def bound(self):
            return self.getTypedRuleContext(HarmonyParser.BoundContext,0)


        def EQ(self):
            return self.getToken(HarmonyParser.EQ, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_const_assign_stmt

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




    def const_assign_stmt(self):

        localctx = HarmonyParser.Const_assign_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_const_assign_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 366
            self.match(HarmonyParser.CONST)
            self.state = 367
            self.bound()
            self.state = 368
            self.match(HarmonyParser.EQ)
            self.state = 369
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Assert_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ASSERT(self):
            return self.getToken(HarmonyParser.ASSERT, 0)

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


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

        def getRuleIndex(self):
            return HarmonyParser.RULE_assert_stmt

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




    def assert_stmt(self):

        localctx = HarmonyParser.Assert_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_assert_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 371
            self.match(HarmonyParser.ASSERT)
            self.state = 372
            self.expr()
            self.state = 375
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.COMMA:
                self.state = 373
                self.match(HarmonyParser.COMMA)
                self.state = 374
                self.expr()


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


    class Await_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def AWAIT(self):
            return self.getToken(HarmonyParser.AWAIT, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_await_stmt

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




    def await_stmt(self):

        localctx = HarmonyParser.Await_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_await_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 377
            self.match(HarmonyParser.AWAIT)
            self.state = 378
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR(self):
            return self.getToken(HarmonyParser.VAR, 0)

        def bound(self):
            return self.getTypedRuleContext(HarmonyParser.BoundContext,0)


        def EQ(self):
            return self.getToken(HarmonyParser.EQ, 0)

        def tuple_rule(self):
            return self.getTypedRuleContext(HarmonyParser.Tuple_ruleContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_var_stmt

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




    def var_stmt(self):

        localctx = HarmonyParser.Var_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_var_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 380
            self.match(HarmonyParser.VAR)
            self.state = 381
            self.bound()
            self.state = 382
            self.match(HarmonyParser.EQ)
            self.state = 383
            self.tuple_rule()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Trap_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def TRAP(self):
            return self.getToken(HarmonyParser.TRAP, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_trap_stmt

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




    def trap_stmt(self):

        localctx = HarmonyParser.Trap_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_trap_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 385
            self.match(HarmonyParser.TRAP)
            self.state = 386
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Pass_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PASS(self):
            return self.getToken(HarmonyParser.PASS, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_pass_stmt

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




    def pass_stmt(self):

        localctx = HarmonyParser.Pass_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_pass_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 388
            self.match(HarmonyParser.PASS)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Finally_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FINALLY(self):
            return self.getToken(HarmonyParser.FINALLY, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_finally_stmt

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




    def finally_stmt(self):

        localctx = HarmonyParser.Finally_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_finally_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 390
            self.match(HarmonyParser.FINALLY)
            self.state = 391
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Invariant_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def INVARIANT(self):
            return self.getToken(HarmonyParser.INVARIANT, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_invariant_stmt

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




    def invariant_stmt(self):

        localctx = HarmonyParser.Invariant_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_invariant_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 393
            self.match(HarmonyParser.INVARIANT)
            self.state = 394
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Del_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEL(self):
            return self.getToken(HarmonyParser.DEL, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_del_stmt

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




    def del_stmt(self):

        localctx = HarmonyParser.Del_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_del_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 396
            self.match(HarmonyParser.DEL)
            self.state = 397
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Spawn_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SPAWN(self):
            return self.getToken(HarmonyParser.SPAWN, 0)

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


        def ETERNAL(self):
            return self.getToken(HarmonyParser.ETERNAL, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_spawn_stmt

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




    def spawn_stmt(self):

        localctx = HarmonyParser.Spawn_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_spawn_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 399
            self.match(HarmonyParser.SPAWN)
            self.state = 401
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.ETERNAL:
                self.state = 400
                self.match(HarmonyParser.ETERNAL)


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


    class Go_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GO(self):
            return self.getToken(HarmonyParser.GO, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_go_stmt

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




    def go_stmt(self):

        localctx = HarmonyParser.Go_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_go_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 405
            self.match(HarmonyParser.GO)
            self.state = 406
            self.expr()
            self.state = 407
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Print_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PRINT(self):
            return self.getToken(HarmonyParser.PRINT, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_print_stmt

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




    def print_stmt(self):

        localctx = HarmonyParser.Print_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_print_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 409
            self.match(HarmonyParser.PRINT)
            self.state = 410
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Sequential_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SEQUENTIAL(self):
            return self.getToken(HarmonyParser.SEQUENTIAL, 0)

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


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

        def getRuleIndex(self):
            return HarmonyParser.RULE_sequential_stmt

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




    def sequential_stmt(self):

        localctx = HarmonyParser.Sequential_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_sequential_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 412
            self.match(HarmonyParser.SEQUENTIAL)
            self.state = 413
            self.expr()
            self.state = 418
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==HarmonyParser.COMMA:
                self.state = 414
                self.match(HarmonyParser.COMMA)
                self.state = 415
                self.expr()
                self.state = 420
                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 Global_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GLOBAL(self):
            return self.getToken(HarmonyParser.GLOBAL, 0)

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


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

        def getRuleIndex(self):
            return HarmonyParser.RULE_global_stmt

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




    def global_stmt(self):

        localctx = HarmonyParser.Global_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_global_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 421
            self.match(HarmonyParser.GLOBAL)
            self.state = 422
            self.expr()
            self.state = 427
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==HarmonyParser.COMMA:
                self.state = 423
                self.match(HarmonyParser.COMMA)
                self.state = 424
                self.expr()
                self.state = 429
                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 Builtin_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BUILTIN(self):
            return self.getToken(HarmonyParser.BUILTIN, 0)

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

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

        def getRuleIndex(self):
            return HarmonyParser.RULE_builtin_stmt

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




    def builtin_stmt(self):

        localctx = HarmonyParser.Builtin_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_builtin_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 430
            self.match(HarmonyParser.BUILTIN)
            self.state = 431
            self.match(HarmonyParser.NAME)
            self.state = 432
            self.match(HarmonyParser.STRING)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Atomic_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ATOMICALLY(self):
            return self.getToken(HarmonyParser.ATOMICALLY, 0)

        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_atomic_block

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




    def atomic_block(self):

        localctx = HarmonyParser.Atomic_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_atomic_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 434
            self.match(HarmonyParser.ATOMICALLY)
            self.state = 435
            self.match(HarmonyParser.COLON)
            self.state = 436
            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 For_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iter_parse(self):
            return self.getTypedRuleContext(HarmonyParser.Iter_parseContext,0)


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_for_block

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




    def for_block(self):

        localctx = HarmonyParser.For_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_for_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 438
            self.iter_parse()
            self.state = 439
            self.match(HarmonyParser.COLON)
            self.state = 440
            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 Let_declContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LET(self):
            return self.getToken(HarmonyParser.LET, 0)

        def bound(self):
            return self.getTypedRuleContext(HarmonyParser.BoundContext,0)


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


        def tuple_rule(self):
            return self.getTypedRuleContext(HarmonyParser.Tuple_ruleContext,0)


        def NL(self):
            return self.getToken(HarmonyParser.NL, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_let_decl

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




    def let_decl(self):

        localctx = HarmonyParser.Let_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_let_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 442
            self.match(HarmonyParser.LET)
            self.state = 443
            self.bound()
            self.state = 444
            self.assign_op()
            self.state = 445
            self.tuple_rule()
            self.state = 447
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.NL:
                self.state = 446
                self.match(HarmonyParser.NL)


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


    class When_declContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def WHEN(self):
            return self.getToken(HarmonyParser.WHEN, 0)

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

        def bound(self):
            return self.getTypedRuleContext(HarmonyParser.BoundContext,0)


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

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


        def NL(self):
            return self.getToken(HarmonyParser.NL, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_when_decl

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




    def when_decl(self):

        localctx = HarmonyParser.When_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_when_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 449
            self.match(HarmonyParser.WHEN)
            self.state = 456
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.EXISTS]:
                self.state = 450
                self.match(HarmonyParser.EXISTS)
                self.state = 451
                self.bound()
                self.state = 452
                self.match(HarmonyParser.IN)
                self.state = 453
                self.expr()
                pass
            elif token in [HarmonyParser.T__5, HarmonyParser.T__20, HarmonyParser.T__21, HarmonyParser.T__22, HarmonyParser.T__23, HarmonyParser.T__24, HarmonyParser.T__25, HarmonyParser.T__26, HarmonyParser.T__27, HarmonyParser.T__28, HarmonyParser.T__29, HarmonyParser.T__30, HarmonyParser.T__31, HarmonyParser.T__32, HarmonyParser.T__33, HarmonyParser.T__34, HarmonyParser.T__35, HarmonyParser.T__36, HarmonyParser.T__37, HarmonyParser.T__38, HarmonyParser.SETINTLEVEL, HarmonyParser.SAVE, HarmonyParser.STOP, HarmonyParser.LAMBDA, HarmonyParser.NOT, HarmonyParser.NONE, HarmonyParser.BOOL, HarmonyParser.INT, HarmonyParser.NAME, HarmonyParser.ATOM, HarmonyParser.OPEN_BRACK, HarmonyParser.OPEN_BRACES, HarmonyParser.OPEN_PAREN, HarmonyParser.STRING]:
                self.state = 455
                self.expr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 459
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.NL:
                self.state = 458
                self.match(HarmonyParser.NL)


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


    class Let_when_declContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def let_decl(self):
            return self.getTypedRuleContext(HarmonyParser.Let_declContext,0)


        def when_decl(self):
            return self.getTypedRuleContext(HarmonyParser.When_declContext,0)


        def let_when_decl(self):
            return self.getTypedRuleContext(HarmonyParser.Let_when_declContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_let_when_decl

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




    def let_when_decl(self):

        localctx = HarmonyParser.Let_when_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_let_when_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 463
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.LET]:
                self.state = 461
                self.let_decl()
                pass
            elif token in [HarmonyParser.WHEN]:
                self.state = 462
                self.when_decl()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 466
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.WHEN or _la==HarmonyParser.LET:
                self.state = 465
                self.let_when_decl()


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


    class Let_when_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def let_when_decl(self):
            return self.getTypedRuleContext(HarmonyParser.Let_when_declContext,0)


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_let_when_block

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




    def let_when_block(self):

        localctx = HarmonyParser.Let_when_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_let_when_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 468
            self.let_when_decl()
            self.state = 469
            self.match(HarmonyParser.COLON)
            self.state = 470
            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 Opt_returnsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def RETURNS(self):
            return self.getToken(HarmonyParser.RETURNS, 0)

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

        def getRuleIndex(self):
            return HarmonyParser.RULE_opt_returns

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




    def opt_returns(self):

        localctx = HarmonyParser.Opt_returnsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_opt_returns)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 472
            self.match(HarmonyParser.RETURNS)
            self.state = 473
            self.match(HarmonyParser.NAME)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Method_declContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEF(self):
            return self.getToken(HarmonyParser.DEF, 0)

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

        def bound(self):
            return self.getTypedRuleContext(HarmonyParser.BoundContext,0)


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def opt_returns(self):
            return self.getTypedRuleContext(HarmonyParser.Opt_returnsContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_method_decl

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




    def method_decl(self):

        localctx = HarmonyParser.Method_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_method_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 475
            self.match(HarmonyParser.DEF)
            self.state = 476
            self.match(HarmonyParser.NAME)
            self.state = 477
            self.bound()
            self.state = 479
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.RETURNS:
                self.state = 478
                self.opt_returns()


            self.state = 481
            self.match(HarmonyParser.COLON)
            self.state = 482
            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 While_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def WHILE(self):
            return self.getToken(HarmonyParser.WHILE, 0)

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


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_while_block

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




    def while_block(self):

        localctx = HarmonyParser.While_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_while_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 484
            self.match(HarmonyParser.WHILE)
            self.state = 485
            self.expr()
            self.state = 486
            self.match(HarmonyParser.COLON)
            self.state = 487
            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 Elif_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ELIF(self):
            return self.getToken(HarmonyParser.ELIF, 0)

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


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_elif_block

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




    def elif_block(self):

        localctx = HarmonyParser.Elif_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_elif_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 489
            self.match(HarmonyParser.ELIF)
            self.state = 490
            self.expr()
            self.state = 491
            self.match(HarmonyParser.COLON)
            self.state = 492
            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 Else_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ELSE(self):
            return self.getToken(HarmonyParser.ELSE, 0)

        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def getRuleIndex(self):
            return HarmonyParser.RULE_else_block

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




    def else_block(self):

        localctx = HarmonyParser.Else_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_else_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 494
            self.match(HarmonyParser.ELSE)
            self.state = 495
            self.match(HarmonyParser.COLON)
            self.state = 496
            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 If_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IF(self):
            return self.getToken(HarmonyParser.IF, 0)

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


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

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


        def elif_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.Elif_blockContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.Elif_blockContext,i)


        def else_block(self):
            return self.getTypedRuleContext(HarmonyParser.Else_blockContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_if_block

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




    def if_block(self):

        localctx = HarmonyParser.If_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_if_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 498
            self.match(HarmonyParser.IF)
            self.state = 499
            self.expr()
            self.state = 500
            self.match(HarmonyParser.COLON)
            self.state = 501
            self.block()
            self.state = 505
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==HarmonyParser.ELIF:
                self.state = 502
                self.elif_block()
                self.state = 507
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 509
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.ELSE:
                self.state = 508
                self.else_block()


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


    class Block_stmtsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HarmonyParser.StmtContext)
            else:
                return self.getTypedRuleContext(HarmonyParser.StmtContext,i)


        def getRuleIndex(self):
            return HarmonyParser.RULE_block_stmts

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




    def block_stmts(self):

        localctx = HarmonyParser.Block_stmtsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_block_stmts)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 512 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 511
                self.stmt()
                self.state = 514 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << HarmonyParser.T__5) | (1 << HarmonyParser.T__20) | (1 << HarmonyParser.T__21) | (1 << HarmonyParser.T__22) | (1 << HarmonyParser.T__23) | (1 << HarmonyParser.T__24) | (1 << HarmonyParser.T__25) | (1 << HarmonyParser.T__26) | (1 << HarmonyParser.T__27) | (1 << HarmonyParser.T__28) | (1 << HarmonyParser.T__29) | (1 << HarmonyParser.T__30) | (1 << HarmonyParser.T__31) | (1 << HarmonyParser.T__32) | (1 << HarmonyParser.T__33) | (1 << HarmonyParser.T__34) | (1 << HarmonyParser.T__35) | (1 << HarmonyParser.T__36) | (1 << HarmonyParser.T__37) | (1 << HarmonyParser.T__38) | (1 << HarmonyParser.NL))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (HarmonyParser.IMPORT - 65)) | (1 << (HarmonyParser.PRINT - 65)) | (1 << (HarmonyParser.FROM - 65)) | (1 << (HarmonyParser.SETINTLEVEL - 65)) | (1 << (HarmonyParser.SAVE - 65)) | (1 << (HarmonyParser.STOP - 65)) | (1 << (HarmonyParser.LAMBDA - 65)) | (1 << (HarmonyParser.NOT - 65)) | (1 << (HarmonyParser.CONST - 65)) | (1 << (HarmonyParser.AWAIT - 65)) | (1 << (HarmonyParser.ASSERT - 65)) | (1 << (HarmonyParser.VAR - 65)) | (1 << (HarmonyParser.TRAP - 65)) | (1 << (HarmonyParser.PASS - 65)) | (1 << (HarmonyParser.DEL - 65)) | (1 << (HarmonyParser.SPAWN - 65)) | (1 << (HarmonyParser.FINALLY - 65)) | (1 << (HarmonyParser.INVARIANT - 65)) | (1 << (HarmonyParser.GO - 65)) | (1 << (HarmonyParser.BUILTIN - 65)) | (1 << (HarmonyParser.SEQUENTIAL - 65)) | (1 << (HarmonyParser.WHEN - 65)) | (1 << (HarmonyParser.LET - 65)) | (1 << (HarmonyParser.IF - 65)) | (1 << (HarmonyParser.WHILE - 65)) | (1 << (HarmonyParser.GLOBAL - 65)) | (1 << (HarmonyParser.DEF - 65)) | (1 << (HarmonyParser.FOR - 65)) | (1 << (HarmonyParser.COLON - 65)) | (1 << (HarmonyParser.NONE - 65)) | (1 << (HarmonyParser.ATOMICALLY - 65)) | (1 << (HarmonyParser.BOOL - 65)) | (1 << (HarmonyParser.INT - 65)) | (1 << (HarmonyParser.NAME - 65)) | (1 << (HarmonyParser.ATOM - 65)) | (1 << (HarmonyParser.OPEN_BRACK - 65)) | (1 << (HarmonyParser.OPEN_BRACES - 65)) | (1 << (HarmonyParser.OPEN_PAREN - 65)) | (1 << (HarmonyParser.SEMI_COLON - 65)) | (1 << (HarmonyParser.STRING - 65)))) != 0)):
                    break

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

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

        def normal_block(self):
            return self.getTypedRuleContext(HarmonyParser.Normal_blockContext,0)


        def one_line_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.One_line_stmtContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_block

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




    def block(self):

        localctx = HarmonyParser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_block)
        try:
            self.state = 518
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.INDENT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 516
                self.normal_block()
                pass
            elif token in [HarmonyParser.T__5, HarmonyParser.T__20, HarmonyParser.T__21, HarmonyParser.T__22, HarmonyParser.T__23, HarmonyParser.T__24, HarmonyParser.T__25, HarmonyParser.T__26, HarmonyParser.T__27, HarmonyParser.T__28, HarmonyParser.T__29, HarmonyParser.T__30, HarmonyParser.T__31, HarmonyParser.T__32, HarmonyParser.T__33, HarmonyParser.T__34, HarmonyParser.T__35, HarmonyParser.T__36, HarmonyParser.T__37, HarmonyParser.T__38, HarmonyParser.PRINT, HarmonyParser.SETINTLEVEL, HarmonyParser.SAVE, HarmonyParser.STOP, HarmonyParser.LAMBDA, HarmonyParser.NOT, HarmonyParser.CONST, HarmonyParser.AWAIT, HarmonyParser.ASSERT, HarmonyParser.VAR, HarmonyParser.TRAP, HarmonyParser.PASS, HarmonyParser.DEL, HarmonyParser.SPAWN, HarmonyParser.FINALLY, HarmonyParser.INVARIANT, HarmonyParser.GO, HarmonyParser.BUILTIN, HarmonyParser.SEQUENTIAL, HarmonyParser.GLOBAL, HarmonyParser.NONE, HarmonyParser.ATOMICALLY, HarmonyParser.BOOL, HarmonyParser.INT, HarmonyParser.NAME, HarmonyParser.ATOM, HarmonyParser.OPEN_BRACK, HarmonyParser.OPEN_BRACES, HarmonyParser.OPEN_PAREN, HarmonyParser.STRING]:
                self.enterOuterAlt(localctx, 2)
                self.state = 517
                self.one_line_stmt()
                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 Normal_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def DEDENT(self):
            return self.getToken(HarmonyParser.DEDENT, 0)

        def block_stmts(self):
            return self.getTypedRuleContext(HarmonyParser.Block_stmtsContext,0)


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


        def SEMI_COLON(self):
            return self.getToken(HarmonyParser.SEMI_COLON, 0)

        def NL(self):
            return self.getToken(HarmonyParser.NL, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_normal_block

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




    def normal_block(self):

        localctx = HarmonyParser.Normal_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_normal_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 520
            self.match(HarmonyParser.INDENT)
            self.state = 524
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.T__5, HarmonyParser.T__20, HarmonyParser.T__21, HarmonyParser.T__22, HarmonyParser.T__23, HarmonyParser.T__24, HarmonyParser.T__25, HarmonyParser.T__26, HarmonyParser.T__27, HarmonyParser.T__28, HarmonyParser.T__29, HarmonyParser.T__30, HarmonyParser.T__31, HarmonyParser.T__32, HarmonyParser.T__33, HarmonyParser.T__34, HarmonyParser.T__35, HarmonyParser.T__36, HarmonyParser.T__37, HarmonyParser.T__38, HarmonyParser.NL, HarmonyParser.IMPORT, HarmonyParser.PRINT, HarmonyParser.FROM, HarmonyParser.SETINTLEVEL, HarmonyParser.SAVE, HarmonyParser.STOP, HarmonyParser.LAMBDA, HarmonyParser.NOT, HarmonyParser.CONST, HarmonyParser.AWAIT, HarmonyParser.ASSERT, HarmonyParser.VAR, HarmonyParser.TRAP, HarmonyParser.PASS, HarmonyParser.DEL, HarmonyParser.SPAWN, HarmonyParser.FINALLY, HarmonyParser.INVARIANT, HarmonyParser.GO, HarmonyParser.BUILTIN, HarmonyParser.SEQUENTIAL, HarmonyParser.WHEN, HarmonyParser.LET, HarmonyParser.IF, HarmonyParser.WHILE, HarmonyParser.GLOBAL, HarmonyParser.DEF, HarmonyParser.FOR, HarmonyParser.COLON, HarmonyParser.NONE, HarmonyParser.ATOMICALLY, HarmonyParser.BOOL, HarmonyParser.INT, HarmonyParser.NAME, HarmonyParser.ATOM, HarmonyParser.OPEN_BRACK, HarmonyParser.OPEN_BRACES, HarmonyParser.OPEN_PAREN, HarmonyParser.SEMI_COLON, HarmonyParser.STRING]:
                self.state = 521
                self.block_stmts()
                pass
            elif token in [HarmonyParser.INDENT]:
                self.state = 522
                self.match(HarmonyParser.INDENT)
                self.state = 523
                self.block()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 526
            self.match(HarmonyParser.DEDENT)
            self.state = 529
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,46,self._ctx)
            if la_ == 1:
                self.state = 527
                self.match(HarmonyParser.SEMI_COLON)
                self.state = 528
                self.match(HarmonyParser.NL)


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


    class Simple_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def assign_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Assign_stmtContext,0)


        def const_assign_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Const_assign_stmtContext,0)


        def await_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Await_stmtContext,0)


        def var_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Var_stmtContext,0)


        def finally_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Finally_stmtContext,0)


        def invariant_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Invariant_stmtContext,0)


        def del_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Del_stmtContext,0)


        def spawn_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Spawn_stmtContext,0)


        def trap_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Trap_stmtContext,0)


        def go_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Go_stmtContext,0)


        def print_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Print_stmtContext,0)


        def pass_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Pass_stmtContext,0)


        def sequential_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Sequential_stmtContext,0)


        def global_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Global_stmtContext,0)


        def builtin_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Builtin_stmtContext,0)


        def assert_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Assert_stmtContext,0)


        def aug_assign_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Aug_assign_stmtContext,0)


        def expr_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Expr_stmtContext,0)


        def ATOMICALLY(self):
            return self.getToken(HarmonyParser.ATOMICALLY, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_simple_stmt

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




    def simple_stmt(self):

        localctx = HarmonyParser.Simple_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_simple_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 532
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==HarmonyParser.ATOMICALLY:
                self.state = 531
                self.match(HarmonyParser.ATOMICALLY)


            self.state = 552
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,48,self._ctx)
            if la_ == 1:
                self.state = 534
                self.assign_stmt()
                pass

            elif la_ == 2:
                self.state = 535
                self.const_assign_stmt()
                pass

            elif la_ == 3:
                self.state = 536
                self.await_stmt()
                pass

            elif la_ == 4:
                self.state = 537
                self.var_stmt()
                pass

            elif la_ == 5:
                self.state = 538
                self.finally_stmt()
                pass

            elif la_ == 6:
                self.state = 539
                self.invariant_stmt()
                pass

            elif la_ == 7:
                self.state = 540
                self.del_stmt()
                pass

            elif la_ == 8:
                self.state = 541
                self.spawn_stmt()
                pass

            elif la_ == 9:
                self.state = 542
                self.trap_stmt()
                pass

            elif la_ == 10:
                self.state = 543
                self.go_stmt()
                pass

            elif la_ == 11:
                self.state = 544
                self.print_stmt()
                pass

            elif la_ == 12:
                self.state = 545
                self.pass_stmt()
                pass

            elif la_ == 13:
                self.state = 546
                self.sequential_stmt()
                pass

            elif la_ == 14:
                self.state = 547
                self.global_stmt()
                pass

            elif la_ == 15:
                self.state = 548
                self.builtin_stmt()
                pass

            elif la_ == 16:
                self.state = 549
                self.assert_stmt()
                pass

            elif la_ == 17:
                self.state = 550
                self.aug_assign_stmt()
                pass

            elif la_ == 18:
                self.state = 551
                self.expr_stmt()
                pass


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


    class Compound_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def if_block(self):
            return self.getTypedRuleContext(HarmonyParser.If_blockContext,0)


        def while_block(self):
            return self.getTypedRuleContext(HarmonyParser.While_blockContext,0)


        def for_block(self):
            return self.getTypedRuleContext(HarmonyParser.For_blockContext,0)


        def let_when_block(self):
            return self.getTypedRuleContext(HarmonyParser.Let_when_blockContext,0)


        def atomic_block(self):
            return self.getTypedRuleContext(HarmonyParser.Atomic_blockContext,0)


        def method_decl(self):
            return self.getTypedRuleContext(HarmonyParser.Method_declContext,0)


        def ATOMICALLY(self):
            return self.getToken(HarmonyParser.ATOMICALLY, 0)

        def getRuleIndex(self):
            return HarmonyParser.RULE_compound_stmt

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




    def compound_stmt(self):

        localctx = HarmonyParser.Compound_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_compound_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 555
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,49,self._ctx)
            if la_ == 1:
                self.state = 554
                self.match(HarmonyParser.ATOMICALLY)


            self.state = 563
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [HarmonyParser.IF]:
                self.state = 557
                self.if_block()
                pass
            elif token in [HarmonyParser.WHILE]:
                self.state = 558
                self.while_block()
                pass
            elif token in [HarmonyParser.FOR]:
                self.state = 559
                self.for_block()
                pass
            elif token in [HarmonyParser.WHEN, HarmonyParser.LET]:
                self.state = 560
                self.let_when_block()
                pass
            elif token in [HarmonyParser.ATOMICALLY]:
                self.state = 561
                self.atomic_block()
                pass
            elif token in [HarmonyParser.DEF]:
                self.state = 562
                self.method_decl()
                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 One_line_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def simple_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Simple_stmtContext,0)


        def NL(self):
            return self.getToken(HarmonyParser.NL, 0)

        def SEMI_COLON(self):
            return self.getToken(HarmonyParser.SEMI_COLON, 0)

        def one_line_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.One_line_stmtContext,0)


        def getRuleIndex(self):
            return HarmonyParser.RULE_one_line_stmt

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




    def one_line_stmt(self):

        localctx = HarmonyParser.One_line_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_one_line_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 565
            self.simple_stmt()
            self.state = 572
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,52,self._ctx)
            if la_ == 1:
                self.state = 567
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==HarmonyParser.SEMI_COLON:
                    self.state = 566
                    self.match(HarmonyParser.SEMI_COLON)


                self.state = 569
                self.match(HarmonyParser.NL)
                pass

            elif la_ == 2:
                self.state = 570
                self.match(HarmonyParser.SEMI_COLON)
                self.state = 571
                self.one_line_stmt()
                pass


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


    class LabelContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return HarmonyParser.RULE_label

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




    def label(self):

        localctx = HarmonyParser.LabelContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_label)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 576 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 574
                    self.match(HarmonyParser.NAME)
                    self.state = 575
                    self.match(HarmonyParser.COLON)

                else:
                    raise NoViableAltException(self)
                self.state = 578 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,53,self._ctx)

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


    class StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def normal_block(self):
            return self.getTypedRuleContext(HarmonyParser.Normal_blockContext,0)


        def COLON(self):
            return self.getToken(HarmonyParser.COLON, 0)

        def NL(self):
            return self.getToken(HarmonyParser.NL, 0)

        def one_line_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.One_line_stmtContext,0)


        def compound_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Compound_stmtContext,0)


        def import_stmt(self):
            return self.getTypedRuleContext(HarmonyParser.Import_stmtContext,0)


        def label(self):
            return self.getTypedRuleContext(HarmonyParser.LabelContext,0)


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

        def getRuleIndex(self):
            return HarmonyParser.RULE_stmt

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




    def stmt(self):

        localctx = HarmonyParser.StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 603
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,59,self._ctx)
            if la_ == 1:
                self.state = 584
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [HarmonyParser.T__5, HarmonyParser.T__20, HarmonyParser.T__21, HarmonyParser.T__22, HarmonyParser.T__23, HarmonyParser.T__24, HarmonyParser.T__25, HarmonyParser.T__26, HarmonyParser.T__27, HarmonyParser.T__28, HarmonyParser.T__29, HarmonyParser.T__30, HarmonyParser.T__31, HarmonyParser.T__32, HarmonyParser.T__33, HarmonyParser.T__34, HarmonyParser.T__35, HarmonyParser.T__36, HarmonyParser.T__37, HarmonyParser.T__38, HarmonyParser.NL, HarmonyParser.IMPORT, HarmonyParser.PRINT, HarmonyParser.FROM, HarmonyParser.SETINTLEVEL, HarmonyParser.SAVE, HarmonyParser.STOP, HarmonyParser.LAMBDA, HarmonyParser.NOT, HarmonyParser.CONST, HarmonyParser.AWAIT, HarmonyParser.ASSERT, HarmonyParser.VAR, HarmonyParser.TRAP, HarmonyParser.PASS, HarmonyParser.DEL, HarmonyParser.SPAWN, HarmonyParser.FINALLY, HarmonyParser.INVARIANT, HarmonyParser.GO, HarmonyParser.BUILTIN, HarmonyParser.SEQUENTIAL, HarmonyParser.WHEN, HarmonyParser.LET, HarmonyParser.IF, HarmonyParser.WHILE, HarmonyParser.GLOBAL, HarmonyParser.DEF, HarmonyParser.FOR, HarmonyParser.NONE, HarmonyParser.ATOMICALLY, HarmonyParser.BOOL, HarmonyParser.INT, HarmonyParser.NAME, HarmonyParser.ATOM, HarmonyParser.OPEN_BRACK, HarmonyParser.OPEN_BRACES, HarmonyParser.OPEN_PAREN, HarmonyParser.SEMI_COLON, HarmonyParser.STRING]:
                    self.state = 581
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,54,self._ctx)
                    if la_ == 1:
                        self.state = 580
                        self.label()


                    pass
                elif token in [HarmonyParser.COLON]:
                    self.state = 583
                    self.match(HarmonyParser.COLON)
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 596
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,57,self._ctx)
                if la_ == 1:
                    self.state = 589
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==HarmonyParser.SEMI_COLON:
                        self.state = 586
                        self.match(HarmonyParser.SEMI_COLON)
                        self.state = 591
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)

                    self.state = 592
                    self.match(HarmonyParser.NL)
                    pass

                elif la_ == 2:
                    self.state = 593
                    self.one_line_stmt()
                    pass

                elif la_ == 3:
                    self.state = 594
                    self.compound_stmt()
                    pass

                elif la_ == 4:
                    self.state = 595
                    self.import_stmt()
                    pass


                pass

            elif la_ == 2:
                self.state = 600
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [HarmonyParser.NAME]:
                    self.state = 598
                    self.label()
                    pass
                elif token in [HarmonyParser.COLON]:
                    self.state = 599
                    self.match(HarmonyParser.COLON)
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 602
                self.normal_block()
                pass


        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[18] = self.application_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 application_sempred(self, localctx:ApplicationContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 2)
         

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




