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


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3F")
        buf.write("\u0198\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 \3\2\7\2B\n\2\f\2\16\2E\13\2\3\2\7\2H")
        buf.write("\n\2\f\2\16\2K\13\2\3\2\3\2\3\3\3\3\3\3\3\3\5\3S\n\3\3")
        buf.write("\3\3\3\3\3\5\3X\n\3\7\3Z\n\3\f\3\16\3]\13\3\3\3\3\3\3")
        buf.write("\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\7\5i\n\5\f\5\16\5l\13\5")
        buf.write("\3\6\3\6\3\6\3\6\3\6\5\6s\n\6\3\7\3\7\3\7\3\7\7\7y\n\7")
        buf.write("\f\7\16\7|\13\7\5\7~\n\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3")
        buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\7\t\u008e\n\t\f\t\16\t\u0091")
        buf.write("\13\t\5\t\u0093\n\t\3\n\3\n\3\n\7\n\u0098\n\n\f\n\16\n")
        buf.write("\u009b\13\n\3\n\7\n\u009e\n\n\f\n\16\n\u00a1\13\n\3\n")
        buf.write("\3\n\3\n\3\13\3\13\3\13\3\13\3\13\5\13\u00ab\n\13\3\f")
        buf.write("\3\f\3\f\3\f\3\f\3\f\7\f\u00b3\n\f\f\f\16\f\u00b6\13\f")
        buf.write("\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u00be\n\r\f\r\16\r\u00c1")
        buf.write("\13\r\3\16\3\16\3\16\3\16\3\16\3\16\7\16\u00c9\n\16\f")
        buf.write("\16\16\16\u00cc\13\16\3\17\3\17\3\17\5\17\u00d1\n\17\3")
        buf.write("\20\3\20\3\20\5\20\u00d6\n\20\3\21\3\21\3\21\3\21\3\21")
        buf.write("\7\21\u00dd\n\21\f\21\16\21\u00e0\13\21\3\22\3\22\3\22")
        buf.write("\3\22\3\22\3\22\3\22\5\22\u00e9\n\22\3\23\3\23\3\23\3")
        buf.write("\23\6\23\u00ef\n\23\r\23\16\23\u00f0\3\24\3\24\3\24\3")
        buf.write("\24\3\24\7\24\u00f8\n\24\f\24\16\24\u00fb\13\24\5\24\u00fd")
        buf.write("\n\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25")
        buf.write("\3\25\5\25\u010a\n\25\3\26\3\26\3\26\3\26\3\27\3\27\3")
        buf.write("\30\3\30\3\30\3\31\3\31\3\31\3\31\7\31\u0119\n\31\f\31")
        buf.write("\16\31\u011c\13\31\3\31\7\31\u011f\n\31\f\31\16\31\u0122")
        buf.write("\13\31\3\31\3\31\3\31\3\31\7\31\u0128\n\31\f\31\16\31")
        buf.write("\u012b\13\31\3\31\7\31\u012e\n\31\f\31\16\31\u0131\13")
        buf.write("\31\7\31\u0133\n\31\f\31\16\31\u0136\13\31\3\31\3\31\7")
        buf.write("\31\u013a\n\31\f\31\16\31\u013d\13\31\3\31\7\31\u0140")
        buf.write("\n\31\f\31\16\31\u0143\13\31\5\31\u0145\n\31\3\31\3\31")
        buf.write("\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32")
        buf.write("\3\32\3\32\3\32\7\32\u0157\n\32\f\32\16\32\u015a\13\32")
        buf.write("\3\32\7\32\u015d\n\32\f\32\16\32\u0160\13\32\3\32\3\32")
        buf.write("\3\32\3\33\3\33\3\33\3\33\7\33\u0169\n\33\f\33\16\33\u016c")
        buf.write("\13\33\3\33\7\33\u016f\n\33\f\33\16\33\u0172\13\33\3\33")
        buf.write("\3\33\3\33\3\34\3\34\7\34\u0179\n\34\f\34\16\34\u017c")
        buf.write("\13\34\3\34\7\34\u017f\n\34\f\34\16\34\u0182\13\34\3\34")
        buf.write("\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\36\3\36\3\36\3\37")
        buf.write("\3\37\3\37\3 \3 \5 \u0194\n \3 \3 \3 \2\6\26\30\32 !\2")
        buf.write("\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64")
        buf.write("\668:<>\2\6\3\2,-\4\2\"#\'(\4\2$&)*\4\2##((\2\u01ac\2")
        buf.write("C\3\2\2\2\4N\3\2\2\2\6`\3\2\2\2\bd\3\2\2\2\nr\3\2\2\2")
        buf.write("\ft\3\2\2\2\16\u0081\3\2\2\2\20\u0084\3\2\2\2\22\u0094")
        buf.write("\3\2\2\2\24\u00aa\3\2\2\2\26\u00ac\3\2\2\2\30\u00b7\3")
        buf.write("\2\2\2\32\u00c2\3\2\2\2\34\u00d0\3\2\2\2\36\u00d5\3\2")
        buf.write("\2\2 \u00d7\3\2\2\2\"\u00e8\3\2\2\2$\u00ee\3\2\2\2&\u00f2")
        buf.write("\3\2\2\2(\u0109\3\2\2\2*\u010b\3\2\2\2,\u010f\3\2\2\2")
        buf.write(".\u0111\3\2\2\2\60\u0114\3\2\2\2\62\u0149\3\2\2\2\64\u0164")
        buf.write("\3\2\2\2\66\u0176\3\2\2\28\u0188\3\2\2\2:\u018b\3\2\2")
        buf.write("\2<\u018e\3\2\2\2>\u0191\3\2\2\2@B\5\4\3\2A@\3\2\2\2B")
        buf.write("E\3\2\2\2CA\3\2\2\2CD\3\2\2\2DI\3\2\2\2EC\3\2\2\2FH\5")
        buf.write("\16\b\2GF\3\2\2\2HK\3\2\2\2IG\3\2\2\2IJ\3\2\2\2JL\3\2")
        buf.write("\2\2KI\3\2\2\2LM\7\2\2\3M\3\3\2\2\2NO\7\16\2\2OR\7\5\2")
        buf.write("\2PS\5\b\5\2QS\5\6\4\2RP\3\2\2\2RQ\3\2\2\2S[\3\2\2\2T")
        buf.write("W\7\3\2\2UX\5\b\5\2VX\5\6\4\2WU\3\2\2\2WV\3\2\2\2XZ\3")
        buf.write("\2\2\2YT\3\2\2\2Z]\3\2\2\2[Y\3\2\2\2[\\\3\2\2\2\\^\3\2")
        buf.write("\2\2][\3\2\2\2^_\7\4\2\2_\5\3\2\2\2`a\5\b\5\2ab\7\f\2")
        buf.write("\2bc\5\n\6\2c\7\3\2\2\2dj\79\2\2ef\7\n\2\2fg\7:\2\2gi")
        buf.write("\7\13\2\2he\3\2\2\2il\3\2\2\2jh\3\2\2\2jk\3\2\2\2k\t\3")
        buf.write("\2\2\2lj\3\2\2\2ms\7:\2\2ns\7>\2\2os\7?\2\2ps\7@\2\2q")
        buf.write("s\5\f\7\2rm\3\2\2\2rn\3\2\2\2ro\3\2\2\2rp\3\2\2\2rq\3")
        buf.write("\2\2\2s\13\3\2\2\2t}\7\6\2\2uz\5\n\6\2vw\7\3\2\2wy\5\n")
        buf.write("\6\2xv\3\2\2\2y|\3\2\2\2zx\3\2\2\2z{\3\2\2\2{~\3\2\2\2")
        buf.write("|z\3\2\2\2}u\3\2\2\2}~\3\2\2\2~\177\3\2\2\2\177\u0080")
        buf.write("\7\7\2\2\u0080\r\3\2\2\2\u0081\u0082\5\20\t\2\u0082\u0083")
        buf.write("\5\22\n\2\u0083\17\3\2\2\2\u0084\u0085\7\17\2\2\u0085")
        buf.write("\u0086\7\5\2\2\u0086\u0087\79\2\2\u0087\u0092\3\2\2\2")
        buf.write("\u0088\u0089\7\20\2\2\u0089\u008a\7\5\2\2\u008a\u008f")
        buf.write("\5\b\5\2\u008b\u008c\7\3\2\2\u008c\u008e\5\b\5\2\u008d")
        buf.write("\u008b\3\2\2\2\u008e\u0091\3\2\2\2\u008f\u008d\3\2\2\2")
        buf.write("\u008f\u0090\3\2\2\2\u0090\u0093\3\2\2\2\u0091\u008f\3")
        buf.write("\2\2\2\u0092\u0088\3\2\2\2\u0092\u0093\3\2\2\2\u0093\21")
        buf.write("\3\2\2\2\u0094\u0095\7\21\2\2\u0095\u0099\7\5\2\2\u0096")
        buf.write("\u0098\5\4\3\2\u0097\u0096\3\2\2\2\u0098\u009b\3\2\2\2")
        buf.write("\u0099\u0097\3\2\2\2\u0099\u009a\3\2\2\2\u009a\u009f\3")
        buf.write("\2\2\2\u009b\u0099\3\2\2\2\u009c\u009e\5(\25\2\u009d\u009c")
        buf.write("\3\2\2\2\u009e\u00a1\3\2\2\2\u009f\u009d\3\2\2\2\u009f")
        buf.write("\u00a0\3\2\2\2\u00a0\u00a2\3\2\2\2\u00a1\u009f\3\2\2\2")
        buf.write("\u00a2\u00a3\7\22\2\2\u00a3\u00a4\7\r\2\2\u00a4\23\3\2")
        buf.write("\2\2\u00a5\u00a6\5\26\f\2\u00a6\u00a7\7!\2\2\u00a7\u00a8")
        buf.write("\5\26\f\2\u00a8\u00ab\3\2\2\2\u00a9\u00ab\5\26\f\2\u00aa")
        buf.write("\u00a5\3\2\2\2\u00aa\u00a9\3\2\2\2\u00ab\25\3\2\2\2\u00ac")
        buf.write("\u00ad\b\f\1\2\u00ad\u00ae\5\30\r\2\u00ae\u00b4\3\2\2")
        buf.write("\2\u00af\u00b0\f\4\2\2\u00b0\u00b1\t\2\2\2\u00b1\u00b3")
        buf.write("\5\30\r\2\u00b2\u00af\3\2\2\2\u00b3\u00b6\3\2\2\2\u00b4")
        buf.write("\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\27\3\2\2\2\u00b6")
        buf.write("\u00b4\3\2\2\2\u00b7\u00b8\b\r\1\2\u00b8\u00b9\5\32\16")
        buf.write("\2\u00b9\u00bf\3\2\2\2\u00ba\u00bb\f\4\2\2\u00bb\u00bc")
        buf.write("\t\3\2\2\u00bc\u00be\5\32\16\2\u00bd\u00ba\3\2\2\2\u00be")
        buf.write("\u00c1\3\2\2\2\u00bf\u00bd\3\2\2\2\u00bf\u00c0\3\2\2\2")
        buf.write("\u00c0\31\3\2\2\2\u00c1\u00bf\3\2\2\2\u00c2\u00c3\b\16")
        buf.write("\1\2\u00c3\u00c4\5\34\17\2\u00c4\u00ca\3\2\2\2\u00c5\u00c6")
        buf.write("\f\4\2\2\u00c6\u00c7\t\4\2\2\u00c7\u00c9\5\34\17\2\u00c8")
        buf.write("\u00c5\3\2\2\2\u00c9\u00cc\3\2\2\2\u00ca\u00c8\3\2\2\2")
        buf.write("\u00ca\u00cb\3\2\2\2\u00cb\33\3\2\2\2\u00cc\u00ca\3\2")
        buf.write("\2\2\u00cd\u00ce\7+\2\2\u00ce\u00d1\5\34\17\2\u00cf\u00d1")
        buf.write("\5\36\20\2\u00d0\u00cd\3\2\2\2\u00d0\u00cf\3\2\2\2\u00d1")
        buf.write("\35\3\2\2\2\u00d2\u00d3\t\5\2\2\u00d3\u00d6\5\36\20\2")
        buf.write("\u00d4\u00d6\5 \21\2\u00d5\u00d2\3\2\2\2\u00d5\u00d4\3")
        buf.write("\2\2\2\u00d6\37\3\2\2\2\u00d7\u00d8\b\21\1\2\u00d8\u00d9")
        buf.write("\5\"\22\2\u00d9\u00de\3\2\2\2\u00da\u00db\f\4\2\2\u00db")
        buf.write("\u00dd\5$\23\2\u00dc\u00da\3\2\2\2\u00dd\u00e0\3\2\2\2")
        buf.write("\u00de\u00dc\3\2\2\2\u00de\u00df\3\2\2\2\u00df!\3\2\2")
        buf.write("\2\u00e0\u00de\3\2\2\2\u00e1\u00e9\79\2\2\u00e2\u00e9")
        buf.write("\5\n\6\2\u00e3\u00e9\5&\24\2\u00e4\u00e5\7\b\2\2\u00e5")
        buf.write("\u00e6\5\24\13\2\u00e6\u00e7\7\t\2\2\u00e7\u00e9\3\2\2")
        buf.write("\2\u00e8\u00e1\3\2\2\2\u00e8\u00e2\3\2\2\2\u00e8\u00e3")
        buf.write("\3\2\2\2\u00e8\u00e4\3\2\2\2\u00e9#\3\2\2\2\u00ea\u00eb")
        buf.write("\7\n\2\2\u00eb\u00ec\5\24\13\2\u00ec\u00ed\7\13\2\2\u00ed")
        buf.write("\u00ef\3\2\2\2\u00ee\u00ea\3\2\2\2\u00ef\u00f0\3\2\2\2")
        buf.write("\u00f0\u00ee\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1%\3\2\2")
        buf.write("\2\u00f2\u00f3\79\2\2\u00f3\u00fc\7\b\2\2\u00f4\u00f9")
        buf.write("\5\24\13\2\u00f5\u00f6\7\3\2\2\u00f6\u00f8\5\24\13\2\u00f7")
        buf.write("\u00f5\3\2\2\2\u00f8\u00fb\3\2\2\2\u00f9\u00f7\3\2\2\2")
        buf.write("\u00f9\u00fa\3\2\2\2\u00fa\u00fd\3\2\2\2\u00fb\u00f9\3")
        buf.write("\2\2\2\u00fc\u00f4\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd\u00fe")
        buf.write("\3\2\2\2\u00fe\u00ff\7\t\2\2\u00ff\'\3\2\2\2\u0100\u010a")
        buf.write("\5.\30\2\u0101\u010a\5\60\31\2\u0102\u010a\5\62\32\2\u0103")
        buf.write("\u010a\5\64\33\2\u0104\u010a\5\66\34\2\u0105\u010a\5<")
        buf.write("\37\2\u0106\u010a\5> \2\u0107\u010a\58\35\2\u0108\u010a")
        buf.write("\5:\36\2\u0109\u0100\3\2\2\2\u0109\u0101\3\2\2\2\u0109")
        buf.write("\u0102\3\2\2\2\u0109\u0103\3\2\2\2\u0109\u0104\3\2\2\2")
        buf.write("\u0109\u0105\3\2\2\2\u0109\u0106\3\2\2\2\u0109\u0107\3")
        buf.write("\2\2\2\u0109\u0108\3\2\2\2\u010a)\3\2\2\2\u010b\u010c")
        buf.write("\5,\27\2\u010c\u010d\7\f\2\2\u010d\u010e\5\24\13\2\u010e")
        buf.write("+\3\2\2\2\u010f\u0110\5 \21\2\u0110-\3\2\2\2\u0111\u0112")
        buf.write("\5*\26\2\u0112\u0113\7\4\2\2\u0113/\3\2\2\2\u0114\u0115")
        buf.write("\7\23\2\2\u0115\u0116\5\24\13\2\u0116\u011a\7\25\2\2\u0117")
        buf.write("\u0119\5\4\3\2\u0118\u0117\3\2\2\2\u0119\u011c\3\2\2\2")
        buf.write("\u011a\u0118\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u0120\3")
        buf.write("\2\2\2\u011c\u011a\3\2\2\2\u011d\u011f\5(\25\2\u011e\u011d")
        buf.write("\3\2\2\2\u011f\u0122\3\2\2\2\u0120\u011e\3\2\2\2\u0120")
        buf.write("\u0121\3\2\2\2\u0121\u0134\3\2\2\2\u0122\u0120\3\2\2\2")
        buf.write("\u0123\u0124\7\24\2\2\u0124\u0125\5\24\13\2\u0125\u0129")
        buf.write("\7\25\2\2\u0126\u0128\5\4\3\2\u0127\u0126\3\2\2\2\u0128")
        buf.write("\u012b\3\2\2\2\u0129\u0127\3\2\2\2\u0129\u012a\3\2\2\2")
        buf.write("\u012a\u012f\3\2\2\2\u012b\u0129\3\2\2\2\u012c\u012e\5")
        buf.write("(\25\2\u012d\u012c\3\2\2\2\u012e\u0131\3\2\2\2\u012f\u012d")
        buf.write("\3\2\2\2\u012f\u0130\3\2\2\2\u0130\u0133\3\2\2\2\u0131")
        buf.write("\u012f\3\2\2\2\u0132\u0123\3\2\2\2\u0133\u0136\3\2\2\2")
        buf.write("\u0134\u0132\3\2\2\2\u0134\u0135\3\2\2\2\u0135\u0144\3")
        buf.write("\2\2\2\u0136\u0134\3\2\2\2\u0137\u013b\7\26\2\2\u0138")
        buf.write("\u013a\5\4\3\2\u0139\u0138\3\2\2\2\u013a\u013d\3\2\2\2")
        buf.write("\u013b\u0139\3\2\2\2\u013b\u013c\3\2\2\2\u013c\u0141\3")
        buf.write("\2\2\2\u013d\u013b\3\2\2\2\u013e\u0140\5(\25\2\u013f\u013e")
        buf.write("\3\2\2\2\u0140\u0143\3\2\2\2\u0141\u013f\3\2\2\2\u0141")
        buf.write("\u0142\3\2\2\2\u0142\u0145\3\2\2\2\u0143\u0141\3\2\2\2")
        buf.write("\u0144\u0137\3\2\2\2\u0144\u0145\3\2\2\2\u0145\u0146\3")
        buf.write("\2\2\2\u0146\u0147\7\27\2\2\u0147\u0148\7\r\2\2\u0148")
        buf.write("\61\3\2\2\2\u0149\u014a\7\30\2\2\u014a\u014b\7\b\2\2\u014b")
        buf.write("\u014c\79\2\2\u014c\u014d\7\f\2\2\u014d\u014e\5\24\13")
        buf.write("\2\u014e\u014f\3\2\2\2\u014f\u0150\7\3\2\2\u0150\u0151")
        buf.write("\5\24\13\2\u0151\u0152\7\3\2\2\u0152\u0153\5\24\13\2\u0153")
        buf.write("\u0154\7\t\2\2\u0154\u0158\7\32\2\2\u0155\u0157\5\4\3")
        buf.write("\2\u0156\u0155\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156")
        buf.write("\3\2\2\2\u0158\u0159\3\2\2\2\u0159\u015e\3\2\2\2\u015a")
        buf.write("\u0158\3\2\2\2\u015b\u015d\5(\25\2\u015c\u015b\3\2\2\2")
        buf.write("\u015d\u0160\3\2\2\2\u015e\u015c\3\2\2\2\u015e\u015f\3")
        buf.write("\2\2\2\u015f\u0161\3\2\2\2\u0160\u015e\3\2\2\2\u0161\u0162")
        buf.write("\7\31\2\2\u0162\u0163\7\r\2\2\u0163\63\3\2\2\2\u0164\u0165")
        buf.write("\7\35\2\2\u0165\u0166\5\24\13\2\u0166\u016a\7\32\2\2\u0167")
        buf.write("\u0169\5\4\3\2\u0168\u0167\3\2\2\2\u0169\u016c\3\2\2\2")
        buf.write("\u016a\u0168\3\2\2\2\u016a\u016b\3\2\2\2\u016b\u0170\3")
        buf.write("\2\2\2\u016c\u016a\3\2\2\2\u016d\u016f\5(\25\2\u016e\u016d")
        buf.write("\3\2\2\2\u016f\u0172\3\2\2\2\u0170\u016e\3\2\2\2\u0170")
        buf.write("\u0171\3\2\2\2\u0171\u0173\3\2\2\2\u0172\u0170\3\2\2\2")
        buf.write("\u0173\u0174\7\36\2\2\u0174\u0175\7\r\2\2\u0175\65\3\2")
        buf.write("\2\2\u0176\u017a\7\32\2\2\u0177\u0179\5\4\3\2\u0178\u0177")
        buf.write("\3\2\2\2\u0179\u017c\3\2\2\2\u017a\u0178\3\2\2\2\u017a")
        buf.write("\u017b\3\2\2\2\u017b\u0180\3\2\2\2\u017c\u017a\3\2\2\2")
        buf.write("\u017d\u017f\5(\25\2\u017e\u017d\3\2\2\2\u017f\u0182\3")
        buf.write("\2\2\2\u0180\u017e\3\2\2\2\u0180\u0181\3\2\2\2\u0181\u0183")
        buf.write("\3\2\2\2\u0182\u0180\3\2\2\2\u0183\u0184\7\35\2\2\u0184")
        buf.write("\u0185\5\24\13\2\u0185\u0186\7\33\2\2\u0186\u0187\7\r")
        buf.write("\2\2\u0187\67\3\2\2\2\u0188\u0189\7\34\2\2\u0189\u018a")
        buf.write("\7\4\2\2\u018a9\3\2\2\2\u018b\u018c\7\37\2\2\u018c\u018d")
        buf.write("\7\4\2\2\u018d;\3\2\2\2\u018e\u018f\5&\24\2\u018f\u0190")
        buf.write("\7\4\2\2\u0190=\3\2\2\2\u0191\u0193\7 \2\2\u0192\u0194")
        buf.write("\5\24\13\2\u0193\u0192\3\2\2\2\u0193\u0194\3\2\2\2\u0194")
        buf.write("\u0195\3\2\2\2\u0195\u0196\7\4\2\2\u0196?\3\2\2\2*CIR")
        buf.write("W[jrz}\u008f\u0092\u0099\u009f\u00aa\u00b4\u00bf\u00ca")
        buf.write("\u00d0\u00d5\u00de\u00e8\u00f0\u00f9\u00fc\u0109\u011a")
        buf.write("\u0120\u0129\u012f\u0134\u013b\u0141\u0144\u0158\u015e")
        buf.write("\u016a\u0170\u017a\u0180\u0193")
        return buf.getvalue()


class BKITParser ( Parser ):

    grammarFileName = "BKIT.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "','", "';'", "':'", "'{'", "'}'", "'('", 
                     "')'", "'['", "']'", "'='", "'.'", "'Var'", "'Function'", 
                     "'Parameter'", "'Body'", "'EndBody'", "'If'", "'ElseIf'", 
                     "'Then'", "'Else'", "'EndIf'", "'For'", "'EndFor'", 
                     "'Do'", "'EndDo'", "'Break'", "'While'", "'EndWhile'", 
                     "'Continue'", "'Return'", "<INVALID>", "'+'", "'-'", 
                     "'*'", "'\\'", "'%'", "'+.'", "'-.'", "'*.'", "'\\.'", 
                     "'!'", "'&&'", "'||'", "'=='", "'!='", "'<'", "'>'", 
                     "'<='", "'>='", "'=/='", "'<.'", "'>.'", "'<=.'", "'>=.'" ]

    symbolicNames = [ "<INVALID>", "CM", "SEMI", "COLON", "LB", "RB", "LP", 
                      "RP", "LSB", "RSB", "ASSIGN", "DOT", "VAR", "FUNC", 
                      "PARAM", "BODY", "END_BODY", "IF", "ELSEIF", "THEN", 
                      "ELSE", "ENDIF", "FOR", "ENDFOR", "DO", "ENDDO", "BREAK", 
                      "WHILE", "ENDWHILE", "CONTINUE", "RETURN", "RELATIONAL", 
                      "ADD", "SUB", "MUL", "DIV", "REMAINDER", "F_ADD", 
                      "F_SUB", "F_MUL", "F_DIV", "BOOL_NEGA", "BOOL_CONJ", 
                      "BOOL_DISJ", "EQUAL", "NOT_EQUAL", "LESS_THAN", "GREATER_THAN", 
                      "LESS_THAN_EQ", "GREATER_THAN_EQ", "F_NOT_EQUAL", 
                      "F_LESS_THAN", "F_GREATER_THAN", "F_LESS_THAN_EQ", 
                      "F_GREATER_THAN_EQ", "ID", "INTLIT", "DEC", "HEX", 
                      "OTC", "FLOATLIT", "BOOLEANLIT", "STRINGLIT", "WS", 
                      "BLOCK_CMT", "ERROR_CHAR", "UNCLOSE_STRING", "ILLEGAL_ESCAPE", 
                      "UNTERMINATED_COMMENT" ]

    RULE_program = 0
    RULE_var_declare = 1
    RULE_var_init = 2
    RULE_var_id = 3
    RULE_all_literal = 4
    RULE_array_literal = 5
    RULE_func_declare = 6
    RULE_func_begin = 7
    RULE_func_body = 8
    RULE_expression = 9
    RULE_exp1 = 10
    RULE_exp2 = 11
    RULE_exp3 = 12
    RULE_exp4 = 13
    RULE_exp5 = 14
    RULE_exp6 = 15
    RULE_operand = 16
    RULE_index_operator = 17
    RULE_func_call_exp = 18
    RULE_statement = 19
    RULE_var_init_stm = 20
    RULE_var_id_stm = 21
    RULE_assign_stm = 22
    RULE_if_stm = 23
    RULE_for_stm = 24
    RULE_while_stm = 25
    RULE_dowhile_stm = 26
    RULE_break_stm = 27
    RULE_continue_stm = 28
    RULE_call_stm = 29
    RULE_return_stm = 30

    ruleNames =  [ "program", "var_declare", "var_init", "var_id", "all_literal", 
                   "array_literal", "func_declare", "func_begin", "func_body", 
                   "expression", "exp1", "exp2", "exp3", "exp4", "exp5", 
                   "exp6", "operand", "index_operator", "func_call_exp", 
                   "statement", "var_init_stm", "var_id_stm", "assign_stm", 
                   "if_stm", "for_stm", "while_stm", "dowhile_stm", "break_stm", 
                   "continue_stm", "call_stm", "return_stm" ]

    EOF = Token.EOF
    CM=1
    SEMI=2
    COLON=3
    LB=4
    RB=5
    LP=6
    RP=7
    LSB=8
    RSB=9
    ASSIGN=10
    DOT=11
    VAR=12
    FUNC=13
    PARAM=14
    BODY=15
    END_BODY=16
    IF=17
    ELSEIF=18
    THEN=19
    ELSE=20
    ENDIF=21
    FOR=22
    ENDFOR=23
    DO=24
    ENDDO=25
    BREAK=26
    WHILE=27
    ENDWHILE=28
    CONTINUE=29
    RETURN=30
    RELATIONAL=31
    ADD=32
    SUB=33
    MUL=34
    DIV=35
    REMAINDER=36
    F_ADD=37
    F_SUB=38
    F_MUL=39
    F_DIV=40
    BOOL_NEGA=41
    BOOL_CONJ=42
    BOOL_DISJ=43
    EQUAL=44
    NOT_EQUAL=45
    LESS_THAN=46
    GREATER_THAN=47
    LESS_THAN_EQ=48
    GREATER_THAN_EQ=49
    F_NOT_EQUAL=50
    F_LESS_THAN=51
    F_GREATER_THAN=52
    F_LESS_THAN_EQ=53
    F_GREATER_THAN_EQ=54
    ID=55
    INTLIT=56
    DEC=57
    HEX=58
    OTC=59
    FLOATLIT=60
    BOOLEANLIT=61
    STRINGLIT=62
    WS=63
    BLOCK_CMT=64
    ERROR_CHAR=65
    UNCLOSE_STRING=66
    ILLEGAL_ESCAPE=67
    UNTERMINATED_COMMENT=68

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




    class ProgramContext(ParserRuleContext):

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

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

        def var_declare(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declareContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declareContext,i)


        def func_declare(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Func_declareContext)
            else:
                return self.getTypedRuleContext(BKITParser.Func_declareContext,i)


        def getRuleIndex(self):
            return BKITParser.RULE_program

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




    def program(self):

        localctx = BKITParser.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 = 65
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.VAR:
                self.state = 62
                self.var_declare()
                self.state = 67
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 71
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.FUNC:
                self.state = 68
                self.func_declare()
                self.state = 73
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class Var_declareContext(ParserRuleContext):

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

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

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

        def SEMI(self):
            return self.getToken(BKITParser.SEMI, 0)

        def var_id(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_idContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_idContext,i)


        def var_init(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_initContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_initContext,i)


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

        def getRuleIndex(self):
            return BKITParser.RULE_var_declare

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




    def var_declare(self):

        localctx = BKITParser.Var_declareContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_var_declare)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 76
            self.match(BKITParser.VAR)
            self.state = 77
            self.match(BKITParser.COLON)
            self.state = 80
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,2,self._ctx)
            if la_ == 1:
                self.state = 78
                self.var_id()
                pass

            elif la_ == 2:
                self.state = 79
                self.var_init()
                pass


            self.state = 89
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.CM:
                self.state = 82
                self.match(BKITParser.CM)
                self.state = 85
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
                if la_ == 1:
                    self.state = 83
                    self.var_id()
                    pass

                elif la_ == 2:
                    self.state = 84
                    self.var_init()
                    pass


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

            self.state = 92
            self.match(BKITParser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_initContext(ParserRuleContext):

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

        def var_id(self):
            return self.getTypedRuleContext(BKITParser.Var_idContext,0)


        def ASSIGN(self):
            return self.getToken(BKITParser.ASSIGN, 0)

        def all_literal(self):
            return self.getTypedRuleContext(BKITParser.All_literalContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_var_init

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




    def var_init(self):

        localctx = BKITParser.Var_initContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_var_init)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 94
            self.var_id()
            self.state = 95
            self.match(BKITParser.ASSIGN)
            self.state = 96
            self.all_literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_idContext(ParserRuleContext):

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

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

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_var_id

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




    def var_id(self):

        localctx = BKITParser.Var_idContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_var_id)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 98
            self.match(BKITParser.ID)
            self.state = 104
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.LSB:
                self.state = 99
                self.match(BKITParser.LSB)
                self.state = 100
                self.match(BKITParser.INTLIT)
                self.state = 101
                self.match(BKITParser.RSB)
                self.state = 106
                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 All_literalContext(ParserRuleContext):

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

        def INTLIT(self):
            return self.getToken(BKITParser.INTLIT, 0)

        def FLOATLIT(self):
            return self.getToken(BKITParser.FLOATLIT, 0)

        def BOOLEANLIT(self):
            return self.getToken(BKITParser.BOOLEANLIT, 0)

        def STRINGLIT(self):
            return self.getToken(BKITParser.STRINGLIT, 0)

        def array_literal(self):
            return self.getTypedRuleContext(BKITParser.Array_literalContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_all_literal

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




    def all_literal(self):

        localctx = BKITParser.All_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_all_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 112
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BKITParser.INTLIT]:
                self.state = 107
                self.match(BKITParser.INTLIT)
                pass
            elif token in [BKITParser.FLOATLIT]:
                self.state = 108
                self.match(BKITParser.FLOATLIT)
                pass
            elif token in [BKITParser.BOOLEANLIT]:
                self.state = 109
                self.match(BKITParser.BOOLEANLIT)
                pass
            elif token in [BKITParser.STRINGLIT]:
                self.state = 110
                self.match(BKITParser.STRINGLIT)
                pass
            elif token in [BKITParser.LB]:
                self.state = 111
                self.array_literal()
                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 Array_literalContext(ParserRuleContext):

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

        def LB(self):
            return self.getToken(BKITParser.LB, 0)

        def RB(self):
            return self.getToken(BKITParser.RB, 0)

        def all_literal(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.All_literalContext)
            else:
                return self.getTypedRuleContext(BKITParser.All_literalContext,i)


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

        def getRuleIndex(self):
            return BKITParser.RULE_array_literal

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




    def array_literal(self):

        localctx = BKITParser.Array_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_array_literal)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 114
            self.match(BKITParser.LB)
            self.state = 123
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                self.state = 115
                self.all_literal()
                self.state = 120
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BKITParser.CM:
                    self.state = 116
                    self.match(BKITParser.CM)
                    self.state = 117
                    self.all_literal()
                    self.state = 122
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 125
            self.match(BKITParser.RB)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Func_declareContext(ParserRuleContext):

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

        def func_begin(self):
            return self.getTypedRuleContext(BKITParser.Func_beginContext,0)


        def func_body(self):
            return self.getTypedRuleContext(BKITParser.Func_bodyContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_func_declare

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




    def func_declare(self):

        localctx = BKITParser.Func_declareContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_func_declare)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 127
            self.func_begin()
            self.state = 128
            self.func_body()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Func_beginContext(ParserRuleContext):

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

        def FUNC(self):
            return self.getToken(BKITParser.FUNC, 0)

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

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

        def PARAM(self):
            return self.getToken(BKITParser.PARAM, 0)

        def var_id(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_idContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_idContext,i)


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

        def getRuleIndex(self):
            return BKITParser.RULE_func_begin

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




    def func_begin(self):

        localctx = BKITParser.Func_beginContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_func_begin)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 130
            self.match(BKITParser.FUNC)
            self.state = 131
            self.match(BKITParser.COLON)
            self.state = 132
            self.match(BKITParser.ID)
            self.state = 144
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.PARAM:
                self.state = 134
                self.match(BKITParser.PARAM)
                self.state = 135
                self.match(BKITParser.COLON)
                self.state = 136
                self.var_id()
                self.state = 141
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BKITParser.CM:
                    self.state = 137
                    self.match(BKITParser.CM)
                    self.state = 138
                    self.var_id()
                    self.state = 143
                    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 Func_bodyContext(ParserRuleContext):

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

        def BODY(self):
            return self.getToken(BKITParser.BODY, 0)

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

        def END_BODY(self):
            return self.getToken(BKITParser.END_BODY, 0)

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

        def var_declare(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declareContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declareContext,i)


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


        def getRuleIndex(self):
            return BKITParser.RULE_func_body

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




    def func_body(self):

        localctx = BKITParser.Func_bodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_func_body)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 146
            self.match(BKITParser.BODY)
            self.state = 147
            self.match(BKITParser.COLON)
            self.state = 151
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.VAR:
                self.state = 148
                self.var_declare()
                self.state = 153
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 157
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.IF) | (1 << BKITParser.FOR) | (1 << BKITParser.DO) | (1 << BKITParser.BREAK) | (1 << BKITParser.WHILE) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.RETURN) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                self.state = 154
                self.statement()
                self.state = 159
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 160
            self.match(BKITParser.END_BODY)
            self.state = 161
            self.match(BKITParser.DOT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionContext(ParserRuleContext):

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

        def exp1(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Exp1Context)
            else:
                return self.getTypedRuleContext(BKITParser.Exp1Context,i)


        def RELATIONAL(self):
            return self.getToken(BKITParser.RELATIONAL, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_expression

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




    def expression(self):

        localctx = BKITParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_expression)
        try:
            self.state = 168
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,13,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 163
                self.exp1(0)
                self.state = 164
                self.match(BKITParser.RELATIONAL)
                self.state = 165
                self.exp1(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 167
                self.exp1(0)
                pass


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


    class Exp1Context(ParserRuleContext):

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

        def exp2(self):
            return self.getTypedRuleContext(BKITParser.Exp2Context,0)


        def exp1(self):
            return self.getTypedRuleContext(BKITParser.Exp1Context,0)


        def BOOL_CONJ(self):
            return self.getToken(BKITParser.BOOL_CONJ, 0)

        def BOOL_DISJ(self):
            return self.getToken(BKITParser.BOOL_DISJ, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_exp1

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



    def exp1(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.Exp1Context(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 20
        self.enterRecursionRule(localctx, 20, self.RULE_exp1, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 171
            self.exp2(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 178
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,14,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = BKITParser.Exp1Context(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_exp1)
                    self.state = 173
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 174
                    _la = self._input.LA(1)
                    if not(_la==BKITParser.BOOL_CONJ or _la==BKITParser.BOOL_DISJ):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 175
                    self.exp2(0) 
                self.state = 180
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,14,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 Exp2Context(ParserRuleContext):

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

        def exp3(self):
            return self.getTypedRuleContext(BKITParser.Exp3Context,0)


        def exp2(self):
            return self.getTypedRuleContext(BKITParser.Exp2Context,0)


        def ADD(self):
            return self.getToken(BKITParser.ADD, 0)

        def SUB(self):
            return self.getToken(BKITParser.SUB, 0)

        def F_ADD(self):
            return self.getToken(BKITParser.F_ADD, 0)

        def F_SUB(self):
            return self.getToken(BKITParser.F_SUB, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_exp2

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



    def exp2(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.Exp2Context(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 22
        self.enterRecursionRule(localctx, 22, self.RULE_exp2, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 182
            self.exp3(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 189
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,15,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = BKITParser.Exp2Context(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_exp2)
                    self.state = 184
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 185
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.ADD) | (1 << BKITParser.SUB) | (1 << BKITParser.F_ADD) | (1 << BKITParser.F_SUB))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 186
                    self.exp3(0) 
                self.state = 191
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,15,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 Exp3Context(ParserRuleContext):

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

        def exp4(self):
            return self.getTypedRuleContext(BKITParser.Exp4Context,0)


        def exp3(self):
            return self.getTypedRuleContext(BKITParser.Exp3Context,0)


        def MUL(self):
            return self.getToken(BKITParser.MUL, 0)

        def DIV(self):
            return self.getToken(BKITParser.DIV, 0)

        def F_MUL(self):
            return self.getToken(BKITParser.F_MUL, 0)

        def F_DIV(self):
            return self.getToken(BKITParser.F_DIV, 0)

        def REMAINDER(self):
            return self.getToken(BKITParser.REMAINDER, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_exp3

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



    def exp3(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.Exp3Context(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 24
        self.enterRecursionRule(localctx, 24, self.RULE_exp3, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 193
            self.exp4()
            self._ctx.stop = self._input.LT(-1)
            self.state = 200
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,16,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = BKITParser.Exp3Context(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_exp3)
                    self.state = 195
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 196
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.MUL) | (1 << BKITParser.DIV) | (1 << BKITParser.REMAINDER) | (1 << BKITParser.F_MUL) | (1 << BKITParser.F_DIV))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 197
                    self.exp4() 
                self.state = 202
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,16,self._ctx)

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


    class Exp4Context(ParserRuleContext):

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

        def BOOL_NEGA(self):
            return self.getToken(BKITParser.BOOL_NEGA, 0)

        def exp4(self):
            return self.getTypedRuleContext(BKITParser.Exp4Context,0)


        def exp5(self):
            return self.getTypedRuleContext(BKITParser.Exp5Context,0)


        def getRuleIndex(self):
            return BKITParser.RULE_exp4

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




    def exp4(self):

        localctx = BKITParser.Exp4Context(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_exp4)
        try:
            self.state = 206
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BKITParser.BOOL_NEGA]:
                self.enterOuterAlt(localctx, 1)
                self.state = 203
                self.match(BKITParser.BOOL_NEGA)
                self.state = 204
                self.exp4()
                pass
            elif token in [BKITParser.LB, BKITParser.LP, BKITParser.SUB, BKITParser.F_SUB, BKITParser.ID, BKITParser.INTLIT, BKITParser.FLOATLIT, BKITParser.BOOLEANLIT, BKITParser.STRINGLIT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 205
                self.exp5()
                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 Exp5Context(ParserRuleContext):

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

        def exp5(self):
            return self.getTypedRuleContext(BKITParser.Exp5Context,0)


        def SUB(self):
            return self.getToken(BKITParser.SUB, 0)

        def F_SUB(self):
            return self.getToken(BKITParser.F_SUB, 0)

        def exp6(self):
            return self.getTypedRuleContext(BKITParser.Exp6Context,0)


        def getRuleIndex(self):
            return BKITParser.RULE_exp5

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




    def exp5(self):

        localctx = BKITParser.Exp5Context(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_exp5)
        self._la = 0 # Token type
        try:
            self.state = 211
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BKITParser.SUB, BKITParser.F_SUB]:
                self.enterOuterAlt(localctx, 1)
                self.state = 208
                _la = self._input.LA(1)
                if not(_la==BKITParser.SUB or _la==BKITParser.F_SUB):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 209
                self.exp5()
                pass
            elif token in [BKITParser.LB, BKITParser.LP, BKITParser.ID, BKITParser.INTLIT, BKITParser.FLOATLIT, BKITParser.BOOLEANLIT, BKITParser.STRINGLIT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 210
                self.exp6(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 Exp6Context(ParserRuleContext):

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

        def operand(self):
            return self.getTypedRuleContext(BKITParser.OperandContext,0)


        def exp6(self):
            return self.getTypedRuleContext(BKITParser.Exp6Context,0)


        def index_operator(self):
            return self.getTypedRuleContext(BKITParser.Index_operatorContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_exp6

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



    def exp6(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.Exp6Context(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 30
        self.enterRecursionRule(localctx, 30, self.RULE_exp6, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 214
            self.operand()
            self._ctx.stop = self._input.LT(-1)
            self.state = 220
            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:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = BKITParser.Exp6Context(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_exp6)
                    self.state = 216
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 217
                    self.index_operator() 
                self.state = 222
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,19,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 OperandContext(ParserRuleContext):

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

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

        def all_literal(self):
            return self.getTypedRuleContext(BKITParser.All_literalContext,0)


        def func_call_exp(self):
            return self.getTypedRuleContext(BKITParser.Func_call_expContext,0)


        def LP(self):
            return self.getToken(BKITParser.LP, 0)

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


        def RP(self):
            return self.getToken(BKITParser.RP, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_operand

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




    def operand(self):

        localctx = BKITParser.OperandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_operand)
        try:
            self.state = 230
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,20,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 223
                self.match(BKITParser.ID)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 224
                self.all_literal()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 225
                self.func_call_exp()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 226
                self.match(BKITParser.LP)
                self.state = 227
                self.expression()
                self.state = 228
                self.match(BKITParser.RP)
                pass


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


    class Index_operatorContext(ParserRuleContext):

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

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

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


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

        def getRuleIndex(self):
            return BKITParser.RULE_index_operator

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




    def index_operator(self):

        localctx = BKITParser.Index_operatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_index_operator)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 236 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 232
                    self.match(BKITParser.LSB)
                    self.state = 233
                    self.expression()
                    self.state = 234
                    self.match(BKITParser.RSB)

                else:
                    raise NoViableAltException(self)
                self.state = 238 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,21,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 Func_call_expContext(ParserRuleContext):

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

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

        def LP(self):
            return self.getToken(BKITParser.LP, 0)

        def RP(self):
            return self.getToken(BKITParser.RP, 0)

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


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

        def getRuleIndex(self):
            return BKITParser.RULE_func_call_exp

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




    def func_call_exp(self):

        localctx = BKITParser.Func_call_expContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_func_call_exp)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 240
            self.match(BKITParser.ID)
            self.state = 241
            self.match(BKITParser.LP)
            self.state = 250
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.SUB) | (1 << BKITParser.F_SUB) | (1 << BKITParser.BOOL_NEGA) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                self.state = 242
                self.expression()
                self.state = 247
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BKITParser.CM:
                    self.state = 243
                    self.match(BKITParser.CM)
                    self.state = 244
                    self.expression()
                    self.state = 249
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 252
            self.match(BKITParser.RP)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StatementContext(ParserRuleContext):

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

        def assign_stm(self):
            return self.getTypedRuleContext(BKITParser.Assign_stmContext,0)


        def if_stm(self):
            return self.getTypedRuleContext(BKITParser.If_stmContext,0)


        def for_stm(self):
            return self.getTypedRuleContext(BKITParser.For_stmContext,0)


        def while_stm(self):
            return self.getTypedRuleContext(BKITParser.While_stmContext,0)


        def dowhile_stm(self):
            return self.getTypedRuleContext(BKITParser.Dowhile_stmContext,0)


        def call_stm(self):
            return self.getTypedRuleContext(BKITParser.Call_stmContext,0)


        def return_stm(self):
            return self.getTypedRuleContext(BKITParser.Return_stmContext,0)


        def break_stm(self):
            return self.getTypedRuleContext(BKITParser.Break_stmContext,0)


        def continue_stm(self):
            return self.getTypedRuleContext(BKITParser.Continue_stmContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_statement

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




    def statement(self):

        localctx = BKITParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_statement)
        try:
            self.state = 263
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,24,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 254
                self.assign_stm()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 255
                self.if_stm()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 256
                self.for_stm()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 257
                self.while_stm()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 258
                self.dowhile_stm()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 259
                self.call_stm()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 260
                self.return_stm()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 261
                self.break_stm()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 262
                self.continue_stm()
                pass


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


    class Var_init_stmContext(ParserRuleContext):

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

        def var_id_stm(self):
            return self.getTypedRuleContext(BKITParser.Var_id_stmContext,0)


        def ASSIGN(self):
            return self.getToken(BKITParser.ASSIGN, 0)

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


        def getRuleIndex(self):
            return BKITParser.RULE_var_init_stm

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




    def var_init_stm(self):

        localctx = BKITParser.Var_init_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_var_init_stm)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 265
            self.var_id_stm()
            self.state = 266
            self.match(BKITParser.ASSIGN)
            self.state = 267
            self.expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_id_stmContext(ParserRuleContext):

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

        def exp6(self):
            return self.getTypedRuleContext(BKITParser.Exp6Context,0)


        def getRuleIndex(self):
            return BKITParser.RULE_var_id_stm

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




    def var_id_stm(self):

        localctx = BKITParser.Var_id_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_var_id_stm)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 269
            self.exp6(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Assign_stmContext(ParserRuleContext):

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

        def var_init_stm(self):
            return self.getTypedRuleContext(BKITParser.Var_init_stmContext,0)


        def SEMI(self):
            return self.getToken(BKITParser.SEMI, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_assign_stm

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




    def assign_stm(self):

        localctx = BKITParser.Assign_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_assign_stm)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 271
            self.var_init_stm()
            self.state = 272
            self.match(BKITParser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class If_stmContext(ParserRuleContext):

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

        def ENDIF(self):
            return self.getToken(BKITParser.ENDIF, 0)

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

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

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


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

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

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

        def var_declare(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declareContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declareContext,i)


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


        def getRuleIndex(self):
            return BKITParser.RULE_if_stm

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




    def if_stm(self):

        localctx = BKITParser.If_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_if_stm)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 274
            self.match(BKITParser.IF)
            self.state = 275
            self.expression()
            self.state = 276
            self.match(BKITParser.THEN)
            self.state = 280
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.VAR:
                self.state = 277
                self.var_declare()
                self.state = 282
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 286
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.IF) | (1 << BKITParser.FOR) | (1 << BKITParser.DO) | (1 << BKITParser.BREAK) | (1 << BKITParser.WHILE) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.RETURN) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                self.state = 283
                self.statement()
                self.state = 288
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 306
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.ELSEIF:
                self.state = 289
                self.match(BKITParser.ELSEIF)
                self.state = 290
                self.expression()
                self.state = 291
                self.match(BKITParser.THEN)
                self.state = 295
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BKITParser.VAR:
                    self.state = 292
                    self.var_declare()
                    self.state = 297
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 301
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.IF) | (1 << BKITParser.FOR) | (1 << BKITParser.DO) | (1 << BKITParser.BREAK) | (1 << BKITParser.WHILE) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.RETURN) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                    self.state = 298
                    self.statement()
                    self.state = 303
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            self.state = 322
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.ELSE:
                self.state = 309
                self.match(BKITParser.ELSE)
                self.state = 313
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BKITParser.VAR:
                    self.state = 310
                    self.var_declare()
                    self.state = 315
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 319
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.IF) | (1 << BKITParser.FOR) | (1 << BKITParser.DO) | (1 << BKITParser.BREAK) | (1 << BKITParser.WHILE) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.RETURN) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                    self.state = 316
                    self.statement()
                    self.state = 321
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 324
            self.match(BKITParser.ENDIF)
            self.state = 325
            self.match(BKITParser.DOT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class For_stmContext(ParserRuleContext):

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

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

        def LP(self):
            return self.getToken(BKITParser.LP, 0)

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

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


        def RP(self):
            return self.getToken(BKITParser.RP, 0)

        def DO(self):
            return self.getToken(BKITParser.DO, 0)

        def ENDFOR(self):
            return self.getToken(BKITParser.ENDFOR, 0)

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

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

        def ASSIGN(self):
            return self.getToken(BKITParser.ASSIGN, 0)

        def var_declare(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declareContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declareContext,i)


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


        def getRuleIndex(self):
            return BKITParser.RULE_for_stm

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




    def for_stm(self):

        localctx = BKITParser.For_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_for_stm)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 327
            self.match(BKITParser.FOR)
            self.state = 328
            self.match(BKITParser.LP)

            self.state = 329
            self.match(BKITParser.ID)
            self.state = 330
            self.match(BKITParser.ASSIGN)
            self.state = 331
            self.expression()
            self.state = 333
            self.match(BKITParser.CM)
            self.state = 334
            self.expression()
            self.state = 335
            self.match(BKITParser.CM)
            self.state = 336
            self.expression()
            self.state = 337
            self.match(BKITParser.RP)
            self.state = 338
            self.match(BKITParser.DO)
            self.state = 342
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.VAR:
                self.state = 339
                self.var_declare()
                self.state = 344
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 348
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.IF) | (1 << BKITParser.FOR) | (1 << BKITParser.DO) | (1 << BKITParser.BREAK) | (1 << BKITParser.WHILE) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.RETURN) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                self.state = 345
                self.statement()
                self.state = 350
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 351
            self.match(BKITParser.ENDFOR)
            self.state = 352
            self.match(BKITParser.DOT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class While_stmContext(ParserRuleContext):

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

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

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


        def DO(self):
            return self.getToken(BKITParser.DO, 0)

        def ENDWHILE(self):
            return self.getToken(BKITParser.ENDWHILE, 0)

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

        def var_declare(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declareContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declareContext,i)


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


        def getRuleIndex(self):
            return BKITParser.RULE_while_stm

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




    def while_stm(self):

        localctx = BKITParser.While_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_while_stm)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 354
            self.match(BKITParser.WHILE)
            self.state = 355
            self.expression()
            self.state = 356
            self.match(BKITParser.DO)
            self.state = 360
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.VAR:
                self.state = 357
                self.var_declare()
                self.state = 362
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 366
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.IF) | (1 << BKITParser.FOR) | (1 << BKITParser.DO) | (1 << BKITParser.BREAK) | (1 << BKITParser.WHILE) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.RETURN) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                self.state = 363
                self.statement()
                self.state = 368
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 369
            self.match(BKITParser.ENDWHILE)
            self.state = 370
            self.match(BKITParser.DOT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Dowhile_stmContext(ParserRuleContext):

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

        def DO(self):
            return self.getToken(BKITParser.DO, 0)

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

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


        def ENDDO(self):
            return self.getToken(BKITParser.ENDDO, 0)

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

        def var_declare(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declareContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declareContext,i)


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


        def getRuleIndex(self):
            return BKITParser.RULE_dowhile_stm

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




    def dowhile_stm(self):

        localctx = BKITParser.Dowhile_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_dowhile_stm)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 372
            self.match(BKITParser.DO)
            self.state = 376
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.VAR:
                self.state = 373
                self.var_declare()
                self.state = 378
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 382
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,38,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 379
                    self.statement() 
                self.state = 384
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,38,self._ctx)

            self.state = 385
            self.match(BKITParser.WHILE)
            self.state = 386
            self.expression()
            self.state = 387
            self.match(BKITParser.ENDDO)
            self.state = 388
            self.match(BKITParser.DOT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Break_stmContext(ParserRuleContext):

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

        def BREAK(self):
            return self.getToken(BKITParser.BREAK, 0)

        def SEMI(self):
            return self.getToken(BKITParser.SEMI, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_break_stm

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




    def break_stm(self):

        localctx = BKITParser.Break_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_break_stm)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 390
            self.match(BKITParser.BREAK)
            self.state = 391
            self.match(BKITParser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Continue_stmContext(ParserRuleContext):

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

        def CONTINUE(self):
            return self.getToken(BKITParser.CONTINUE, 0)

        def SEMI(self):
            return self.getToken(BKITParser.SEMI, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_continue_stm

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




    def continue_stm(self):

        localctx = BKITParser.Continue_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_continue_stm)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 393
            self.match(BKITParser.CONTINUE)
            self.state = 394
            self.match(BKITParser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Call_stmContext(ParserRuleContext):

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

        def func_call_exp(self):
            return self.getTypedRuleContext(BKITParser.Func_call_expContext,0)


        def SEMI(self):
            return self.getToken(BKITParser.SEMI, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_call_stm

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




    def call_stm(self):

        localctx = BKITParser.Call_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_call_stm)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 396
            self.func_call_exp()
            self.state = 397
            self.match(BKITParser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Return_stmContext(ParserRuleContext):

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

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

        def SEMI(self):
            return self.getToken(BKITParser.SEMI, 0)

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


        def getRuleIndex(self):
            return BKITParser.RULE_return_stm

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




    def return_stm(self):

        localctx = BKITParser.Return_stmContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_return_stm)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 399
            self.match(BKITParser.RETURN)
            self.state = 401
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.LB) | (1 << BKITParser.LP) | (1 << BKITParser.SUB) | (1 << BKITParser.F_SUB) | (1 << BKITParser.BOOL_NEGA) | (1 << BKITParser.ID) | (1 << BKITParser.INTLIT) | (1 << BKITParser.FLOATLIT) | (1 << BKITParser.BOOLEANLIT) | (1 << BKITParser.STRINGLIT))) != 0):
                self.state = 400
                self.expression()


            self.state = 403
            self.match(BKITParser.SEMI)
        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[10] = self.exp1_sempred
        self._predicates[11] = self.exp2_sempred
        self._predicates[12] = self.exp3_sempred
        self._predicates[15] = self.exp6_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 exp1_sempred(self, localctx:Exp1Context, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 2)
         

    def exp2_sempred(self, localctx:Exp2Context, predIndex:int):
            if predIndex == 1:
                return self.precpred(self._ctx, 2)
         

    def exp3_sempred(self, localctx:Exp3Context, predIndex:int):
            if predIndex == 2:
                return self.precpred(self._ctx, 2)
         

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




