# Generated from /Users/quan0402/Desktop/PPL/assignment3/src/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\3T")
        buf.write("\u0294\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t")
        buf.write("&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4")
        buf.write("/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t\64")
        buf.write("\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\3\2\3\2\7\2")
        buf.write("u\n\2\f\2\16\2x\13\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\7\3\u0081")
        buf.write("\n\3\f\3\16\3\u0084\13\3\3\3\3\3\3\4\3\4\5\4\u008a\n\4")
        buf.write("\3\5\3\5\3\5\5\5\u008f\n\5\3\6\3\6\3\6\3\6\3\7\3\7\3\7")
        buf.write("\3\7\3\b\3\b\5\b\u009b\n\b\3\t\3\t\5\t\u009f\n\t\3\n\3")
        buf.write("\n\3\n\3\n\3\n\6\n\u00a6\n\n\r\n\16\n\u00a7\3\n\3\n\3")
        buf.write("\13\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\5\f")
        buf.write("\u00b7\n\f\3\f\3\f\3\f\3\f\3\f\7\f\u00be\n\f\f\f\16\f")
        buf.write("\u00c1\13\f\3\f\5\f\u00c4\n\f\3\f\3\f\3\f\3\r\3\r\3\r")
        buf.write("\3\r\3\r\3\r\5\r\u00cf\n\r\3\r\6\r\u00d2\n\r\r\r\16\r")
        buf.write("\u00d3\5\r\u00d6\n\r\3\r\3\r\3\r\3\r\3\r\5\r\u00dd\n\r")
        buf.write("\3\r\6\r\u00e0\n\r\r\r\16\r\u00e1\5\r\u00e4\n\r\7\r\u00e6")
        buf.write("\n\r\f\r\16\r\u00e9\13\r\3\16\3\16\3\16\3\16\3\16\7\16")
        buf.write("\u00f0\n\16\f\16\16\16\u00f3\13\16\3\16\5\16\u00f6\n\16")
        buf.write("\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\7\17\u0100\n")
        buf.write("\17\f\17\16\17\u0103\13\17\5\17\u0105\n\17\3\17\3\17\7")
        buf.write("\17\u0109\n\17\f\17\16\17\u010c\13\17\3\20\3\20\3\20\5")
        buf.write("\20\u0111\n\20\3\21\3\21\3\21\3\21\3\21\5\21\u0118\n\21")
        buf.write("\3\21\3\21\3\22\3\22\3\22\3\22\3\22\5\22\u0121\n\22\3")
        buf.write("\22\3\22\3\23\3\23\3\23\3\23\3\23\5\23\u012a\n\23\3\23")
        buf.write("\3\23\3\24\3\24\3\24\3\24\3\24\5\24\u0133\n\24\3\24\3")
        buf.write("\24\3\25\3\25\3\25\3\25\3\25\5\25\u013c\n\25\3\25\3\25")
        buf.write("\3\26\3\26\3\26\3\26\3\26\5\26\u0145\n\26\3\26\3\26\3")
        buf.write("\27\3\27\3\27\3\27\3\27\3\27\5\27\u014f\n\27\3\27\3\27")
        buf.write("\3\30\3\30\3\30\3\30\3\30\5\30\u0158\n\30\3\30\3\30\3")
        buf.write("\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31")
        buf.write("\3\31\3\31\3\31\3\31\3\31\5\31\u016c\n\31\3\32\6\32\u016f")
        buf.write("\n\32\r\32\16\32\u0170\3\33\3\33\3\34\3\34\3\34\3\34\3")
        buf.write("\34\7\34\u017a\n\34\f\34\16\34\u017d\13\34\3\34\3\34\3")
        buf.write("\34\3\35\3\35\5\35\u0184\n\35\3\36\3\36\3\36\3\36\3\36")
        buf.write("\3\36\3\36\5\36\u018d\n\36\3\37\3\37\3\37\3\37\3\37\3")
        buf.write("\37\7\37\u0195\n\37\f\37\16\37\u0198\13\37\3 \3 \3 \3")
        buf.write(" \3 \3 \7 \u01a0\n \f \16 \u01a3\13 \3!\3!\3!\3!\3!\3")
        buf.write("!\7!\u01ab\n!\f!\16!\u01ae\13!\3\"\3\"\3\"\3\"\3\"\3\"")
        buf.write("\7\"\u01b6\n\"\f\"\16\"\u01b9\13\"\3#\3#\3#\5#\u01be\n")
        buf.write("#\3$\3$\3$\5$\u01c3\n$\3%\3%\3%\3%\3%\3%\3%\3%\3%\3%\7")
        buf.write("%\u01cf\n%\f%\16%\u01d2\13%\3%\5%\u01d5\n%\3&\3&\7&\u01d9")
        buf.write("\n&\f&\16&\u01dc\13&\3&\5&\u01df\n&\3&\3&\3&\3\'\3\'\3")
        buf.write("\'\3\'\3\'\3\'\7\'\u01ea\n\'\f\'\16\'\u01ed\13\'\3\'\5")
        buf.write("\'\u01f0\n\'\3(\3(\3(\3(\3(\3(\7(\u01f8\n(\f(\16(\u01fb")
        buf.write("\13(\3(\5(\u01fe\n(\3)\3)\3)\3)\7)\u0204\n)\f)\16)\u0207")
        buf.write("\13)\3)\5)\u020a\n)\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3")
        buf.write("*\3*\3*\7*\u021a\n*\f*\16*\u021d\13*\3*\5*\u0220\n*\3")
        buf.write("*\3*\3*\3+\3+\3+\3+\3+\3+\7+\u022b\n+\f+\16+\u022e\13")
        buf.write("+\3+\5+\u0231\n+\3+\3+\3+\3,\3,\3,\3,\7,\u023a\n,\f,\16")
        buf.write(",\u023d\13,\3,\5,\u0240\n,\3,\3,\3,\3,\3,\3-\3-\3-\3.")
        buf.write("\3.\3.\3/\3/\5/\u024f\n/\3/\3/\3\60\3\60\3\60\3\60\3\61")
        buf.write("\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62\3\62")
        buf.write("\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\5\64")
        buf.write("\u026d\n\64\3\65\3\65\5\65\u0271\n\65\3\66\3\66\3\66\3")
        buf.write("\66\7\66\u0277\n\66\f\66\16\66\u027a\13\66\3\66\3\66\3")
        buf.write("\67\3\67\5\67\u0280\n\67\3\67\3\67\7\67\u0284\n\67\f\67")
        buf.write("\16\67\u0287\13\67\3\67\3\67\3\67\3\67\3\67\5\67\u028e")
        buf.write("\n\67\38\38\39\39\39\2\6<>@B:\2\4\6\b\n\f\16\20\22\24")
        buf.write("\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVX")
        buf.write("Z\\^`bdfhjlnp\2\13\3\2.\62\3\2\67:\3\2\65\66\3\2;E\4\2")
        buf.write("./\678\4\2\60\639:\4\2//88\3\2!\"\3\2JL\2\u02c6\2v\3\2")
        buf.write("\2\2\4{\3\2\2\2\6\u0089\3\2\2\2\b\u008b\3\2\2\2\n\u0090")
        buf.write("\3\2\2\2\f\u0094\3\2\2\2\16\u009a\3\2\2\2\20\u009e\3\2")
        buf.write("\2\2\22\u00a0\3\2\2\2\24\u00ab\3\2\2\2\26\u00b2\3\2\2")
        buf.write("\2\30\u00c8\3\2\2\2\32\u00ea\3\2\2\2\34\u00fa\3\2\2\2")
        buf.write("\36\u0110\3\2\2\2 \u0112\3\2\2\2\"\u011b\3\2\2\2$\u0124")
        buf.write("\3\2\2\2&\u012d\3\2\2\2(\u0136\3\2\2\2*\u013f\3\2\2\2")
        buf.write(",\u0148\3\2\2\2.\u0152\3\2\2\2\60\u016b\3\2\2\2\62\u016e")
        buf.write("\3\2\2\2\64\u0172\3\2\2\2\66\u0174\3\2\2\28\u0183\3\2")
        buf.write("\2\2:\u018c\3\2\2\2<\u018e\3\2\2\2>\u0199\3\2\2\2@\u01a4")
        buf.write("\3\2\2\2B\u01af\3\2\2\2D\u01bd\3\2\2\2F\u01c2\3\2\2\2")
        buf.write("H\u01d4\3\2\2\2J\u01d6\3\2\2\2L\u01e3\3\2\2\2N\u01f1\3")
        buf.write("\2\2\2P\u01ff\3\2\2\2R\u020b\3\2\2\2T\u0224\3\2\2\2V\u0235")
        buf.write("\3\2\2\2X\u0246\3\2\2\2Z\u0249\3\2\2\2\\\u024c\3\2\2\2")
        buf.write("^\u0252\3\2\2\2`\u0256\3\2\2\2b\u025c\3\2\2\2d\u0262\3")
        buf.write("\2\2\2f\u026c\3\2\2\2h\u0270\3\2\2\2j\u0272\3\2\2\2l\u028d")
        buf.write("\3\2\2\2n\u028f\3\2\2\2p\u0291\3\2\2\2ru\5\4\3\2su\5\26")
        buf.write("\f\2tr\3\2\2\2ts\3\2\2\2ux\3\2\2\2vt\3\2\2\2vw\3\2\2\2")
        buf.write("wy\3\2\2\2xv\3\2\2\2yz\7\2\2\3z\3\3\2\2\2{|\7\37\2\2|")
        buf.write("}\7,\2\2}\u0082\5\6\4\2~\177\7$\2\2\177\u0081\5\6\4\2")
        buf.write("\u0080~\3\2\2\2\u0081\u0084\3\2\2\2\u0082\u0080\3\2\2")
        buf.write("\2\u0082\u0083\3\2\2\2\u0083\u0085\3\2\2\2\u0084\u0082")
        buf.write("\3\2\2\2\u0085\u0086\7+\2\2\u0086\5\3\2\2\2\u0087\u008a")
        buf.write("\5\b\5\2\u0088\u008a\5\20\t\2\u0089\u0087\3\2\2\2\u0089")
        buf.write("\u0088\3\2\2\2\u008a\7\3\2\2\2\u008b\u008e\7M\2\2\u008c")
        buf.write("\u008d\7F\2\2\u008d\u008f\5<\37\2\u008e\u008c\3\2\2\2")
        buf.write("\u008e\u008f\3\2\2\2\u008f\t\3\2\2\2\u0090\u0091\7)\2")
        buf.write("\2\u0091\u0092\5<\37\2\u0092\u0093\7*\2\2\u0093\13\3\2")
        buf.write("\2\2\u0094\u0095\7)\2\2\u0095\u0096\5<\37\2\u0096\u0097")
        buf.write("\7*\2\2\u0097\r\3\2\2\2\u0098\u0099\7F\2\2\u0099\u009b")
        buf.write("\5h\65\2\u009a\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b")
        buf.write("\17\3\2\2\2\u009c\u009f\5\24\13\2\u009d\u009f\5\22\n\2")
        buf.write("\u009e\u009c\3\2\2\2\u009e\u009d\3\2\2\2\u009f\21\3\2")
        buf.write("\2\2\u00a0\u00a5\7M\2\2\u00a1\u00a2\7)\2\2\u00a2\u00a3")
        buf.write("\58\35\2\u00a3\u00a4\7*\2\2\u00a4\u00a6\3\2\2\2\u00a5")
        buf.write("\u00a1\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a5\3\2\2\2")
        buf.write("\u00a7\u00a8\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00aa\5")
        buf.write("\16\b\2\u00aa\23\3\2\2\2\u00ab\u00ac\7M\2\2\u00ac\u00ad")
        buf.write("\7)\2\2\u00ad\u00ae\58\35\2\u00ae\u00af\7*\2\2\u00af\u00b0")
        buf.write("\3\2\2\2\u00b0\u00b1\5\16\b\2\u00b1\25\3\2\2\2\u00b2\u00b3")
        buf.write("\7\32\2\2\u00b3\u00b4\7,\2\2\u00b4\u00b6\7M\2\2\u00b5")
        buf.write("\u00b7\5\30\r\2\u00b6\u00b5\3\2\2\2\u00b6\u00b7\3\2\2")
        buf.write("\2\u00b7\u00b8\3\2\2\2\u00b8\u00b9\7\17\2\2\u00b9\u00bf")
        buf.write("\7,\2\2\u00ba\u00be\5\4\3\2\u00bb\u00be\5\20\t\2\u00bc")
        buf.write("\u00be\5\60\31\2\u00bd\u00ba\3\2\2\2\u00bd\u00bb\3\2\2")
        buf.write("\2\u00bd\u00bc\3\2\2\2\u00be\u00c1\3\2\2\2\u00bf\u00bd")
        buf.write("\3\2\2\2\u00bf\u00c0\3\2\2\2\u00c0\u00c3\3\2\2\2\u00c1")
        buf.write("\u00bf\3\2\2\2\u00c2\u00c4\5\\/\2\u00c3\u00c2\3\2\2\2")
        buf.write("\u00c3\u00c4\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c5\u00c6\7")
        buf.write("\25\2\2\u00c6\u00c7\7-\2\2\u00c7\27\3\2\2\2\u00c8\u00c9")
        buf.write("\7\34\2\2\u00c9\u00d5\7,\2\2\u00ca\u00d6\7M\2\2\u00cb")
        buf.write("\u00d1\7M\2\2\u00cc\u00ce\7)\2\2\u00cd\u00cf\5<\37\2\u00ce")
        buf.write("\u00cd\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cf\u00d0\3\2\2\2")
        buf.write("\u00d0\u00d2\7*\2\2\u00d1\u00cc\3\2\2\2\u00d2\u00d3\3")
        buf.write("\2\2\2\u00d3\u00d1\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4\u00d6")
        buf.write("\3\2\2\2\u00d5\u00ca\3\2\2\2\u00d5\u00cb\3\2\2\2\u00d6")
        buf.write("\u00e7\3\2\2\2\u00d7\u00e3\7$\2\2\u00d8\u00e4\7M\2\2\u00d9")
        buf.write("\u00df\7M\2\2\u00da\u00dc\7)\2\2\u00db\u00dd\5<\37\2\u00dc")
        buf.write("\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00de\3\2\2\2")
        buf.write("\u00de\u00e0\7*\2\2\u00df\u00da\3\2\2\2\u00e0\u00e1\3")
        buf.write("\2\2\2\u00e1\u00df\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\u00e4")
        buf.write("\3\2\2\2\u00e3\u00d8\3\2\2\2\u00e3\u00d9\3\2\2\2\u00e4")
        buf.write("\u00e6\3\2\2\2\u00e5\u00d7\3\2\2\2\u00e6\u00e9\3\2\2\2")
        buf.write("\u00e7\u00e5\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\31\3\2")
        buf.write("\2\2\u00e9\u00e7\3\2\2\2\u00ea\u00eb\7\17\2\2\u00eb\u00f1")
        buf.write("\7,\2\2\u00ec\u00f0\5\4\3\2\u00ed\u00f0\5\20\t\2\u00ee")
        buf.write("\u00f0\5\60\31\2\u00ef\u00ec\3\2\2\2\u00ef\u00ed\3\2\2")
        buf.write("\2\u00ef\u00ee\3\2\2\2\u00f0\u00f3\3\2\2\2\u00f1\u00ef")
        buf.write("\3\2\2\2\u00f1\u00f2\3\2\2\2\u00f2\u00f5\3\2\2\2\u00f3")
        buf.write("\u00f1\3\2\2\2\u00f4\u00f6\5\\/\2\u00f5\u00f4\3\2\2\2")
        buf.write("\u00f5\u00f6\3\2\2\2\u00f6\u00f7\3\2\2\2\u00f7\u00f8\7")
        buf.write("\25\2\2\u00f8\u00f9\7-\2\2\u00f9\33\3\2\2\2\u00fa\u00fb")
        buf.write("\7M\2\2\u00fb\u0104\7%\2\2\u00fc\u0101\5\36\20\2\u00fd")
        buf.write("\u00fe\7$\2\2\u00fe\u0100\5\36\20\2\u00ff\u00fd\3\2\2")
        buf.write("\2\u0100\u0103\3\2\2\2\u0101\u00ff\3\2\2\2\u0101\u0102")
        buf.write("\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2\2\2\u0104")
        buf.write("\u00fc\3\2\2\2\u0104\u0105\3\2\2\2\u0105\u0106\3\2\2\2")
        buf.write("\u0106\u010a\7&\2\2\u0107\u0109\5\n\6\2\u0108\u0107\3")
        buf.write("\2\2\2\u0109\u010c\3\2\2\2\u010a\u0108\3\2\2\2\u010a\u010b")
        buf.write("\3\2\2\2\u010b\35\3\2\2\2\u010c\u010a\3\2\2\2\u010d\u0111")
        buf.write("\7M\2\2\u010e\u0111\5f\64\2\u010f\u0111\5<\37\2\u0110")
        buf.write("\u010d\3\2\2\2\u0110\u010e\3\2\2\2\u0110\u010f\3\2\2\2")
        buf.write("\u0111\37\3\2\2\2\u0112\u0113\7\3\2\2\u0113\u0117\7%\2")
        buf.write("\2\u0114\u0118\7M\2\2\u0115\u0118\7I\2\2\u0116\u0118\5")
        buf.write("\34\17\2\u0117\u0114\3\2\2\2\u0117\u0115\3\2\2\2\u0117")
        buf.write("\u0116\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011a\7&\2\2")
        buf.write("\u011a!\3\2\2\2\u011b\u011c\7\4\2\2\u011c\u0120\7%\2\2")
        buf.write("\u011d\u0121\7M\2\2\u011e\u0121\5p9\2\u011f\u0121\5\34")
        buf.write("\17\2\u0120\u011d\3\2\2\2\u0120\u011e\3\2\2\2\u0120\u011f")
        buf.write("\3\2\2\2\u0121\u0122\3\2\2\2\u0122\u0123\7&\2\2\u0123")
        buf.write("#\3\2\2\2\u0124\u0125\7\5\2\2\u0125\u0129\7%\2\2\u0126")
        buf.write("\u012a\7G\2\2\u0127\u012a\7M\2\2\u0128\u012a\5\34\17\2")
        buf.write("\u0129\u0126\3\2\2\2\u0129\u0127\3\2\2\2\u0129\u0128\3")
        buf.write("\2\2\2\u012a\u012b\3\2\2\2\u012b\u012c\7&\2\2\u012c%\3")
        buf.write("\2\2\2\u012d\u012e\7\6\2\2\u012e\u0132\7%\2\2\u012f\u0133")
        buf.write("\7M\2\2\u0130\u0133\5p9\2\u0131\u0133\5\34\17\2\u0132")
        buf.write("\u012f\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0131\3\2\2\2")
        buf.write("\u0133\u0134\3\2\2\2\u0134\u0135\7&\2\2\u0135\'\3\2\2")
        buf.write("\2\u0136\u0137\7\7\2\2\u0137\u013b\7%\2\2\u0138\u013c")
        buf.write("\7G\2\2\u0139\u013c\7M\2\2\u013a\u013c\5\34\17\2\u013b")
        buf.write("\u0138\3\2\2\2\u013b\u0139\3\2\2\2\u013b\u013a\3\2\2\2")
        buf.write("\u013c\u013d\3\2\2\2\u013d\u013e\7&\2\2\u013e)\3\2\2\2")
        buf.write("\u013f\u0140\7\b\2\2\u0140\u0144\7%\2\2\u0141\u0145\7")
        buf.write("I\2\2\u0142\u0145\7M\2\2\u0143\u0145\5\34\17\2\u0144\u0141")
        buf.write("\3\2\2\2\u0144\u0142\3\2\2\2\u0144\u0143\3\2\2\2\u0145")
        buf.write("\u0146\3\2\2\2\u0146\u0147\7&\2\2\u0147+\3\2\2\2\u0148")
        buf.write("\u0149\7\t\2\2\u0149\u014e\7%\2\2\u014a\u014f\7!\2\2\u014b")
        buf.write("\u014f\7\"\2\2\u014c\u014f\7M\2\2\u014d\u014f\5\34\17")
        buf.write("\2\u014e\u014a\3\2\2\2\u014e\u014b\3\2\2\2\u014e\u014c")
        buf.write("\3\2\2\2\u014e\u014d\3\2\2\2\u014f\u0150\3\2\2\2\u0150")
        buf.write("\u0151\7&\2\2\u0151-\3\2\2\2\u0152\u0153\7\n\2\2\u0153")
        buf.write("\u0157\7%\2\2\u0154\u0158\7H\2\2\u0155\u0158\7M\2\2\u0156")
        buf.write("\u0158\5\34\17\2\u0157\u0154\3\2\2\2\u0157\u0155\3\2\2")
        buf.write("\2\u0157\u0156\3\2\2\2\u0158\u0159\3\2\2\2\u0159\u015a")
        buf.write("\7&\2\2\u015a/\3\2\2\2\u015b\u015c\5\66\34\2\u015c\u015d")
        buf.write("\7+\2\2\u015d\u016c\3\2\2\2\u015e\u016c\5J&\2\u015f\u016c")
        buf.write("\5R*\2\u0160\u016c\5T+\2\u0161\u016c\5V,\2\u0162\u016c")
        buf.write("\5X-\2\u0163\u016c\5Z.\2\u0164\u0165\5\34\17\2\u0165\u0166")
        buf.write("\7+\2\2\u0166\u016c\3\2\2\2\u0167\u016c\5^\60\2\u0168")
        buf.write("\u016c\5`\61\2\u0169\u016c\5b\62\2\u016a\u016c\5d\63\2")
        buf.write("\u016b\u015b\3\2\2\2\u016b\u015e\3\2\2\2\u016b\u015f\3")
        buf.write("\2\2\2\u016b\u0160\3\2\2\2\u016b\u0161\3\2\2\2\u016b\u0162")
        buf.write("\3\2\2\2\u016b\u0163\3\2\2\2\u016b\u0164\3\2\2\2\u016b")
        buf.write("\u0167\3\2\2\2\u016b\u0168\3\2\2\2\u016b\u0169\3\2\2\2")
        buf.write("\u016b\u016a\3\2\2\2\u016c\61\3\2\2\2\u016d\u016f\5\60")
        buf.write("\31\2\u016e\u016d\3\2\2\2\u016f\u0170\3\2\2\2\u0170\u016e")
        buf.write("\3\2\2\2\u0170\u0171\3\2\2\2\u0171\63\3\2\2\2\u0172\u0173")
        buf.write("\3\2\2\2\u0173\65\3\2\2\2\u0174\u017b\7M\2\2\u0175\u0176")
        buf.write("\7)\2\2\u0176\u0177\58\35\2\u0177\u0178\7*\2\2\u0178\u017a")
        buf.write("\3\2\2\2\u0179\u0175\3\2\2\2\u017a\u017d\3\2\2\2\u017b")
        buf.write("\u0179\3\2\2\2\u017b\u017c\3\2\2\2\u017c\u017e\3\2\2\2")
        buf.write("\u017d\u017b\3\2\2\2\u017e\u017f\7F\2\2\u017f\u0180\5")
        buf.write("<\37\2\u0180\67\3\2\2\2\u0181\u0184\5p9\2\u0182\u0184")
        buf.write("\5<\37\2\u0183\u0181\3\2\2\2\u0183\u0182\3\2\2\2\u0184")
        buf.write("9\3\2\2\2\u0185\u0186\5p9\2\u0186\u0187\t\2\2\2\u0187")
        buf.write("\u0188\5p9\2\u0188\u018d\3\2\2\2\u0189\u018a\7I\2\2\u018a")
        buf.write("\u018b\t\3\2\2\u018b\u018d\7I\2\2\u018c\u0185\3\2\2\2")
        buf.write("\u018c\u0189\3\2\2\2\u018d;\3\2\2\2\u018e\u018f\b\37\1")
        buf.write("\2\u018f\u0190\5> \2\u0190\u0196\3\2\2\2\u0191\u0192\f")
        buf.write("\4\2\2\u0192\u0193\t\4\2\2\u0193\u0195\5> \2\u0194\u0191")
        buf.write("\3\2\2\2\u0195\u0198\3\2\2\2\u0196\u0194\3\2\2\2\u0196")
        buf.write("\u0197\3\2\2\2\u0197=\3\2\2\2\u0198\u0196\3\2\2\2\u0199")
        buf.write("\u019a\b \1\2\u019a\u019b\5@!\2\u019b\u01a1\3\2\2\2\u019c")
        buf.write("\u019d\f\4\2\2\u019d\u019e\t\5\2\2\u019e\u01a0\5@!\2\u019f")
        buf.write("\u019c\3\2\2\2\u01a0\u01a3\3\2\2\2\u01a1\u019f\3\2\2\2")
        buf.write("\u01a1\u01a2\3\2\2\2\u01a2?\3\2\2\2\u01a3\u01a1\3\2\2")
        buf.write("\2\u01a4\u01a5\b!\1\2\u01a5\u01a6\5B\"\2\u01a6\u01ac\3")
        buf.write("\2\2\2\u01a7\u01a8\f\4\2\2\u01a8\u01a9\t\6\2\2\u01a9\u01ab")
        buf.write("\5B\"\2\u01aa\u01a7\3\2\2\2\u01ab\u01ae\3\2\2\2\u01ac")
        buf.write("\u01aa\3\2\2\2\u01ac\u01ad\3\2\2\2\u01adA\3\2\2\2\u01ae")
        buf.write("\u01ac\3\2\2\2\u01af\u01b0\b\"\1\2\u01b0\u01b1\5D#\2\u01b1")
        buf.write("\u01b7\3\2\2\2\u01b2\u01b3\f\4\2\2\u01b3\u01b4\t\7\2\2")
        buf.write("\u01b4\u01b6\5D#\2\u01b5\u01b2\3\2\2\2\u01b6\u01b9\3\2")
        buf.write("\2\2\u01b7\u01b5\3\2\2\2\u01b7\u01b8\3\2\2\2\u01b8C\3")
        buf.write("\2\2\2\u01b9\u01b7\3\2\2\2\u01ba\u01bb\7\64\2\2\u01bb")
        buf.write("\u01be\5F$\2\u01bc\u01be\5F$\2\u01bd\u01ba\3\2\2\2\u01bd")
        buf.write("\u01bc\3\2\2\2\u01beE\3\2\2\2\u01bf\u01c0\t\b\2\2\u01c0")
        buf.write("\u01c3\5H%\2\u01c1\u01c3\5H%\2\u01c2\u01bf\3\2\2\2\u01c2")
        buf.write("\u01c1\3\2\2\2\u01c3G\3\2\2\2\u01c4\u01d5\5f\64\2\u01c5")
        buf.write("\u01c6\7%\2\2\u01c6\u01c7\5<\37\2\u01c7\u01c8\7&\2\2\u01c8")
        buf.write("\u01d5\3\2\2\2\u01c9\u01d0\7M\2\2\u01ca\u01cb\7)\2\2\u01cb")
        buf.write("\u01cc\5<\37\2\u01cc\u01cd\7*\2\2\u01cd\u01cf\3\2\2\2")
        buf.write("\u01ce\u01ca\3\2\2\2\u01cf\u01d2\3\2\2\2\u01d0\u01ce\3")
        buf.write("\2\2\2\u01d0\u01d1\3\2\2\2\u01d1\u01d5\3\2\2\2\u01d2\u01d0")
        buf.write("\3\2\2\2\u01d3\u01d5\5\34\17\2\u01d4\u01c4\3\2\2\2\u01d4")
        buf.write("\u01c5\3\2\2\2\u01d4\u01c9\3\2\2\2\u01d4\u01d3\3\2\2\2")
        buf.write("\u01d5I\3\2\2\2\u01d6\u01da\5L\'\2\u01d7\u01d9\5N(\2\u01d8")
        buf.write("\u01d7\3\2\2\2\u01d9\u01dc\3\2\2\2\u01da\u01d8\3\2\2\2")
        buf.write("\u01da\u01db\3\2\2\2\u01db\u01de\3\2\2\2\u01dc\u01da\3")
        buf.write("\2\2\2\u01dd\u01df\5P)\2\u01de\u01dd\3\2\2\2\u01de\u01df")
        buf.write("\3\2\2\2\u01df\u01e0\3\2\2\2\u01e0\u01e1\7\26\2\2\u01e1")
        buf.write("\u01e2\7-\2\2\u01e2K\3\2\2\2\u01e3\u01e4\7\33\2\2\u01e4")
        buf.write("\u01e5\5<\37\2\u01e5\u01eb\7\36\2\2\u01e6\u01ea\5\4\3")
        buf.write("\2\u01e7\u01ea\5\20\t\2\u01e8\u01ea\5\60\31\2\u01e9\u01e6")
        buf.write("\3\2\2\2\u01e9\u01e7\3\2\2\2\u01e9\u01e8\3\2\2\2\u01ea")
        buf.write("\u01ed\3\2\2\2\u01eb\u01e9\3\2\2\2\u01eb\u01ec\3\2\2\2")
        buf.write("\u01ec\u01ef\3\2\2\2\u01ed\u01eb\3\2\2\2\u01ee\u01f0\5")
        buf.write("\\/\2\u01ef\u01ee\3\2\2\2\u01ef\u01f0\3\2\2\2\u01f0M\3")
        buf.write("\2\2\2\u01f1\u01f2\7\24\2\2\u01f2\u01f3\5<\37\2\u01f3")
        buf.write("\u01f9\7\36\2\2\u01f4\u01f8\5\4\3\2\u01f5\u01f8\5\20\t")
        buf.write("\2\u01f6\u01f8\5\60\31\2\u01f7\u01f4\3\2\2\2\u01f7\u01f5")
        buf.write("\3\2\2\2\u01f7\u01f6\3\2\2\2\u01f8\u01fb\3\2\2\2\u01f9")
        buf.write("\u01f7\3\2\2\2\u01f9\u01fa\3\2\2\2\u01fa\u01fd\3\2\2\2")
        buf.write("\u01fb\u01f9\3\2\2\2\u01fc\u01fe\5\\/\2\u01fd\u01fc\3")
        buf.write("\2\2\2\u01fd\u01fe\3\2\2\2\u01feO\3\2\2\2\u01ff\u0205")
        buf.write("\7\23\2\2\u0200\u0204\5\4\3\2\u0201\u0204\5\20\t\2\u0202")
        buf.write("\u0204\5\60\31\2\u0203\u0200\3\2\2\2\u0203\u0201\3\2\2")
        buf.write("\2\u0203\u0202\3\2\2\2\u0204\u0207\3\2\2\2\u0205\u0203")
        buf.write("\3\2\2\2\u0205\u0206\3\2\2\2\u0206\u0209\3\2\2\2\u0207")
        buf.write("\u0205\3\2\2\2\u0208\u020a\5\\/\2\u0209\u0208\3\2\2\2")
        buf.write("\u0209\u020a\3\2\2\2\u020aQ\3\2\2\2\u020b\u020c\7\31\2")
        buf.write("\2\u020c\u020d\7%\2\2\u020d\u020e\7M\2\2\u020e\u020f\7")
        buf.write("F\2\2\u020f\u0210\5<\37\2\u0210\u0211\7$\2\2\u0211\u0212")
        buf.write("\5> \2\u0212\u0213\7$\2\2\u0213\u0214\5<\37\2\u0214\u0215")
        buf.write("\7&\2\2\u0215\u021b\7\22\2\2\u0216\u021a\5\4\3\2\u0217")
        buf.write("\u021a\5\20\t\2\u0218\u021a\5\60\31\2\u0219\u0216\3\2")
        buf.write("\2\2\u0219\u0217\3\2\2\2\u0219\u0218\3\2\2\2\u021a\u021d")
        buf.write("\3\2\2\2\u021b\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021c")
        buf.write("\u021f\3\2\2\2\u021d\u021b\3\2\2\2\u021e\u0220\5\\/\2")
        buf.write("\u021f\u021e\3\2\2\2\u021f\u0220\3\2\2\2\u0220\u0221\3")
        buf.write("\2\2\2\u0221\u0222\7\27\2\2\u0222\u0223\7-\2\2\u0223S")
        buf.write("\3\2\2\2\u0224\u0225\7 \2\2\u0225\u0226\5<\37\2\u0226")
        buf.write("\u022c\7\22\2\2\u0227\u022b\5\4\3\2\u0228\u022b\5\20\t")
        buf.write("\2\u0229\u022b\5\60\31\2\u022a\u0227\3\2\2\2\u022a\u0228")
        buf.write("\3\2\2\2\u022a\u0229\3\2\2\2\u022b\u022e\3\2\2\2\u022c")
        buf.write("\u022a\3\2\2\2\u022c\u022d\3\2\2\2\u022d\u0230\3\2\2\2")
        buf.write("\u022e\u022c\3\2\2\2\u022f\u0231\5\\/\2\u0230\u022f\3")
        buf.write("\2\2\2\u0230\u0231\3\2\2\2\u0231\u0232\3\2\2\2\u0232\u0233")
        buf.write("\7\30\2\2\u0233\u0234\7-\2\2\u0234U\3\2\2\2\u0235\u023b")
        buf.write("\7\22\2\2\u0236\u023a\5\4\3\2\u0237\u023a\5\20\t\2\u0238")
        buf.write("\u023a\5\60\31\2\u0239\u0236\3\2\2\2\u0239\u0237\3\2\2")
        buf.write("\2\u0239\u0238\3\2\2\2\u023a\u023d\3\2\2\2\u023b\u0239")
        buf.write("\3\2\2\2\u023b\u023c\3\2\2\2\u023c\u023f\3\2\2\2\u023d")
        buf.write("\u023b\3\2\2\2\u023e\u0240\5\\/\2\u023f\u023e\3\2\2\2")
        buf.write("\u023f\u0240\3\2\2\2\u0240\u0241\3\2\2\2\u0241\u0242\7")
        buf.write(" \2\2\u0242\u0243\5<\37\2\u0243\u0244\7#\2\2\u0244\u0245")
        buf.write("\7-\2\2\u0245W\3\2\2\2\u0246\u0247\7\20\2\2\u0247\u0248")
        buf.write("\7+\2\2\u0248Y\3\2\2\2\u0249\u024a\7\21\2\2\u024a\u024b")
        buf.write("\7+\2\2\u024b[\3\2\2\2\u024c\u024e\7\35\2\2\u024d\u024f")
        buf.write("\5<\37\2\u024e\u024d\3\2\2\2\u024e\u024f\3\2\2\2\u024f")
        buf.write("\u0250\3\2\2\2\u0250\u0251\7+\2\2\u0251]\3\2\2\2\u0252")
        buf.write("\u0253\7\13\2\2\u0253\u0254\7%\2\2\u0254\u0255\7&\2\2")
        buf.write("\u0255_\3\2\2\2\u0256\u0257\7\f\2\2\u0257\u0258\7%\2\2")
        buf.write("\u0258\u0259\5H%\2\u0259\u025a\7&\2\2\u025a\u025b\7+\2")
        buf.write("\2\u025ba\3\2\2\2\u025c\u025d\7\r\2\2\u025d\u025e\7%\2")
        buf.write("\2\u025e\u025f\5H%\2\u025f\u0260\7&\2\2\u0260\u0261\7")
        buf.write("+\2\2\u0261c\3\2\2\2\u0262\u0263\7\16\2\2\u0263\u0264")
        buf.write("\7%\2\2\u0264\u0265\7&\2\2\u0265\u0266\7+\2\2\u0266e\3")
        buf.write("\2\2\2\u0267\u026d\5p9\2\u0268\u026d\7I\2\2\u0269\u026d")
        buf.write("\5n8\2\u026a\u026d\7G\2\2\u026b\u026d\5h\65\2\u026c\u0267")
        buf.write("\3\2\2\2\u026c\u0268\3\2\2\2\u026c\u0269\3\2\2\2\u026c")
        buf.write("\u026a\3\2\2\2\u026c\u026b\3\2\2\2\u026dg\3\2\2\2\u026e")
        buf.write("\u0271\5j\66\2\u026f\u0271\5l\67\2\u0270\u026e\3\2\2\2")
        buf.write("\u0270\u026f\3\2\2\2\u0271i\3\2\2\2\u0272\u0273\7\'\2")
        buf.write("\2\u0273\u0278\5f\64\2\u0274\u0275\7$\2\2\u0275\u0277")
        buf.write("\5f\64\2\u0276\u0274\3\2\2\2\u0277\u027a\3\2\2\2\u0278")
        buf.write("\u0276\3\2\2\2\u0278\u0279\3\2\2\2\u0279\u027b\3\2\2\2")
        buf.write("\u027a\u0278\3\2\2\2\u027b\u027c\7(\2\2\u027ck\3\2\2\2")
        buf.write("\u027d\u027f\7\'\2\2\u027e\u0280\5f\64\2\u027f\u027e\3")
        buf.write("\2\2\2\u027f\u0280\3\2\2\2\u0280\u0285\3\2\2\2\u0281\u0282")
        buf.write("\7$\2\2\u0282\u0284\5f\64\2\u0283\u0281\3\2\2\2\u0284")
        buf.write("\u0287\3\2\2\2\u0285\u0283\3\2\2\2\u0285\u0286\3\2\2\2")
        buf.write("\u0286\u0288\3\2\2\2\u0287\u0285\3\2\2\2\u0288\u028e\7")
        buf.write("(\2\2\u0289\u028a\7\'\2\2\u028a\u028b\5f\64\2\u028b\u028c")
        buf.write("\7(\2\2\u028c\u028e\3\2\2\2\u028d\u027d\3\2\2\2\u028d")
        buf.write("\u0289\3\2\2\2\u028em\3\2\2\2\u028f\u0290\t\t\2\2\u0290")
        buf.write("o\3\2\2\2\u0291\u0292\t\n\2\2\u0292q\3\2\2\2Ltv\u0082")
        buf.write("\u0089\u008e\u009a\u009e\u00a7\u00b6\u00bd\u00bf\u00c3")
        buf.write("\u00ce\u00d3\u00d5\u00dc\u00e1\u00e3\u00e7\u00ef\u00f1")
        buf.write("\u00f5\u0101\u0104\u010a\u0110\u0117\u0120\u0129\u0132")
        buf.write("\u013b\u0144\u014e\u0157\u016b\u0170\u017b\u0183\u018c")
        buf.write("\u0196\u01a1\u01ac\u01b7\u01bd\u01c2\u01d0\u01d4\u01da")
        buf.write("\u01de\u01e9\u01eb\u01ef\u01f7\u01f9\u01fd\u0203\u0205")
        buf.write("\u0209\u0219\u021b\u021f\u022a\u022c\u0230\u0239\u023b")
        buf.write("\u023f\u024e\u026c\u0270\u0278\u027f\u0285\u028d")
        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>", "'int_of_float'", "'float_of_int'", "'int_of_string'", 
                     "'string_of_int'", "'float_of_string'", "'string_of_float'", 
                     "'bool_of_string'", "'string_of_bool'", "'printLn'", 
                     "'print'", "'printStrLn'", "'read'", "'Body'", "'Break'", 
                     "'Continue'", "'Do'", "'Else'", "'ElseIf'", "'EndBody'", 
                     "'EndIf'", "'EndFor'", "'EndWhile'", "'For'", "'Function'", 
                     "'If'", "'Parameter'", "'Return'", "'Then'", "'Var'", 
                     "'While'", "'True'", "'False'", "'EndDo'", "','", "'('", 
                     "')'", "'{'", "'}'", "'['", "']'", "';'", "':'", "'.'", 
                     "'+'", "'-'", "'*'", "'\\'", "'%'", "'\\%'", "'!'", 
                     "'&&'", "'||'", "'+.'", "'-.'", "'*.'", "'\\.'", "'<='", 
                     "'>='", "'<'", "'>'", "'<=.'", "'>=.'", "'<.'", "'>.'", 
                     "'=/='", "'!='", "'=='", "'='" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "BODY", "BREAK", "CONTINUE", "DO", "ELSE", 
                      "ELSEIF", "ENDBODY", "ENDIF", "ENDFOR", "ENDWHILE", 
                      "FOR", "FUNCTION", "IF", "PARAMETER", "RETURN", "THEN", 
                      "VAR", "WHILE", "TRUE", "FALSE", "ENDDO", "CM", "LP", 
                      "RP", "LB", "RB", "LSB", "RSB", "SM", "COLON", "DOT", 
                      "ADD", "SUB", "MUL", "DIV", "MOD", "MOD2", "NOT", 
                      "AND", "OR", "ADDPOINT", "SUBPOINT", "MULPOINT", "DIVPOINT", 
                      "LTE", "GTE", "LT", "GT", "LTEPOINT", "GTEPOINT", 
                      "LTPOINT", "GTPOINT", "NEQPOINT", "NEQ", "EQ", "ASSIGN", 
                      "STRINGLIT", "BOOLINT", "REAL", "DECIMAL", "HEXADECIMAL", 
                      "OCTAL", "ID", "BLOCK_COMMENT", "LINE_COMMENT", "WS", 
                      "UNCLOSE_STRING", "ILLEGAL_ESCAPE", "ERROR_CHAR", 
                      "UNTERMINATED_COMMENT" ]

    RULE_program = 0
    RULE_var_decl = 1
    RULE_declaration = 2
    RULE_value_decl = 3
    RULE_postfix_array_exp_for_decl = 4
    RULE_postfix_array_exp_for_call = 5
    RULE_array_assignment = 6
    RULE_array_decl = 7
    RULE_array_nd_decl = 8
    RULE_array_1d_decl = 9
    RULE_func_decl = 10
    RULE_param = 11
    RULE_body = 12
    RULE_func_call = 13
    RULE_arguement = 14
    RULE_int_of_float = 15
    RULE_float_of_int = 16
    RULE_int_of_string = 17
    RULE_string_of_int = 18
    RULE_float_of_string = 19
    RULE_string_of_float = 20
    RULE_bool_of_string = 21
    RULE_string_of_bool = 22
    RULE_statement = 23
    RULE_statement_list = 24
    RULE_array_assign = 25
    RULE_assignment_statement = 26
    RULE_index = 27
    RULE_arithmetic = 28
    RULE_expr = 29
    RULE_expr_cond = 30
    RULE_expr1 = 31
    RULE_expr2 = 32
    RULE_expr3 = 33
    RULE_expr4 = 34
    RULE_operand = 35
    RULE_if_statement = 36
    RULE_if_stmt = 37
    RULE_elseif_stmt = 38
    RULE_else_stmt = 39
    RULE_for_statement = 40
    RULE_while_statement = 41
    RULE_do_while_statement = 42
    RULE_break_statement = 43
    RULE_continue_statement = 44
    RULE_return_statement = 45
    RULE_println = 46
    RULE_printstr = 47
    RULE_printstrln = 48
    RULE_read = 49
    RULE_literals = 50
    RULE_array_lit = 51
    RULE_array1dlit = 52
    RULE_arrayndlit = 53
    RULE_bool_lit = 54
    RULE_intlit = 55

    ruleNames =  [ "program", "var_decl", "declaration", "value_decl", "postfix_array_exp_for_decl", 
                   "postfix_array_exp_for_call", "array_assignment", "array_decl", 
                   "array_nd_decl", "array_1d_decl", "func_decl", "param", 
                   "body", "func_call", "arguement", "int_of_float", "float_of_int", 
                   "int_of_string", "string_of_int", "float_of_string", 
                   "string_of_float", "bool_of_string", "string_of_bool", 
                   "statement", "statement_list", "array_assign", "assignment_statement", 
                   "index", "arithmetic", "expr", "expr_cond", "expr1", 
                   "expr2", "expr3", "expr4", "operand", "if_statement", 
                   "if_stmt", "elseif_stmt", "else_stmt", "for_statement", 
                   "while_statement", "do_while_statement", "break_statement", 
                   "continue_statement", "return_statement", "println", 
                   "printstr", "printstrln", "read", "literals", "array_lit", 
                   "array1dlit", "arrayndlit", "bool_lit", "intlit" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    BODY=13
    BREAK=14
    CONTINUE=15
    DO=16
    ELSE=17
    ELSEIF=18
    ENDBODY=19
    ENDIF=20
    ENDFOR=21
    ENDWHILE=22
    FOR=23
    FUNCTION=24
    IF=25
    PARAMETER=26
    RETURN=27
    THEN=28
    VAR=29
    WHILE=30
    TRUE=31
    FALSE=32
    ENDDO=33
    CM=34
    LP=35
    RP=36
    LB=37
    RB=38
    LSB=39
    RSB=40
    SM=41
    COLON=42
    DOT=43
    ADD=44
    SUB=45
    MUL=46
    DIV=47
    MOD=48
    MOD2=49
    NOT=50
    AND=51
    OR=52
    ADDPOINT=53
    SUBPOINT=54
    MULPOINT=55
    DIVPOINT=56
    LTE=57
    GTE=58
    LT=59
    GT=60
    LTEPOINT=61
    GTEPOINT=62
    LTPOINT=63
    GTPOINT=64
    NEQPOINT=65
    NEQ=66
    EQ=67
    ASSIGN=68
    STRINGLIT=69
    BOOLINT=70
    REAL=71
    DECIMAL=72
    HEXADECIMAL=73
    OCTAL=74
    ID=75
    BLOCK_COMMENT=76
    LINE_COMMENT=77
    WS=78
    UNCLOSE_STRING=79
    ILLEGAL_ESCAPE=80
    ERROR_CHAR=81
    UNTERMINATED_COMMENT=82

    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_decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declContext,i)


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


        def getRuleIndex(self):
            return BKITParser.RULE_program




    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 = 116
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.FUNCTION or _la==BKITParser.VAR:
                self.state = 114
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [BKITParser.VAR]:
                    self.state = 112
                    self.var_decl()
                    pass
                elif token in [BKITParser.FUNCTION]:
                    self.state = 113
                    self.func_decl()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 119
            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_declContext(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 declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.DeclarationContext)
            else:
                return self.getTypedRuleContext(BKITParser.DeclarationContext,i)


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

        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_decl




    def var_decl(self):

        localctx = BKITParser.Var_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_var_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 121
            self.match(BKITParser.VAR)
            self.state = 122
            self.match(BKITParser.COLON)
            self.state = 123
            self.declaration()
            self.state = 128
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.CM:
                self.state = 124
                self.match(BKITParser.CM)
                self.state = 125
                self.declaration()
                self.state = 130
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class DeclarationContext(ParserRuleContext):

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

        def value_decl(self):
            return self.getTypedRuleContext(BKITParser.Value_declContext,0)


        def array_decl(self):
            return self.getTypedRuleContext(BKITParser.Array_declContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_declaration




    def declaration(self):

        localctx = BKITParser.DeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_declaration)
        try:
            self.state = 135
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 133
                self.value_decl()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 134
                self.array_decl()
                pass


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


    class Value_declContext(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 ASSIGN(self):
            return self.getToken(BKITParser.ASSIGN, 0)

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


        def getRuleIndex(self):
            return BKITParser.RULE_value_decl




    def value_decl(self):

        localctx = BKITParser.Value_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_value_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 137
            self.match(BKITParser.ID)
            self.state = 140
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.ASSIGN:
                self.state = 138
                self.match(BKITParser.ASSIGN)
                self.state = 139
                self.expr(0)


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


    class Postfix_array_exp_for_declContext(ParserRuleContext):

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

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

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


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

        def getRuleIndex(self):
            return BKITParser.RULE_postfix_array_exp_for_decl




    def postfix_array_exp_for_decl(self):

        localctx = BKITParser.Postfix_array_exp_for_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_postfix_array_exp_for_decl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 142
            self.match(BKITParser.LSB)
            self.state = 143
            self.expr(0)
            self.state = 144
            self.match(BKITParser.RSB)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Postfix_array_exp_for_callContext(ParserRuleContext):

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

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

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


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

        def getRuleIndex(self):
            return BKITParser.RULE_postfix_array_exp_for_call




    def postfix_array_exp_for_call(self):

        localctx = BKITParser.Postfix_array_exp_for_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_postfix_array_exp_for_call)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 146
            self.match(BKITParser.LSB)
            self.state = 147
            self.expr(0)
            self.state = 148
            self.match(BKITParser.RSB)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Array_assignmentContext(ParserRuleContext):

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

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

        def array_lit(self):
            return self.getTypedRuleContext(BKITParser.Array_litContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_array_assignment




    def array_assignment(self):

        localctx = BKITParser.Array_assignmentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_array_assignment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 152
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.ASSIGN:
                self.state = 150
                self.match(BKITParser.ASSIGN)
                self.state = 151
                self.array_lit()


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


    class Array_declContext(ParserRuleContext):

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

        def array_1d_decl(self):
            return self.getTypedRuleContext(BKITParser.Array_1d_declContext,0)


        def array_nd_decl(self):
            return self.getTypedRuleContext(BKITParser.Array_nd_declContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_array_decl




    def array_decl(self):

        localctx = BKITParser.Array_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_array_decl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 156
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.state = 154
                self.array_1d_decl()
                pass

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


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


    class Array_nd_declContext(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 array_assignment(self):
            return self.getTypedRuleContext(BKITParser.Array_assignmentContext,0)


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

        def index(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.IndexContext)
            else:
                return self.getTypedRuleContext(BKITParser.IndexContext,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_array_nd_decl




    def array_nd_decl(self):

        localctx = BKITParser.Array_nd_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_array_nd_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 158
            self.match(BKITParser.ID)
            self.state = 163 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 159
                self.match(BKITParser.LSB)
                self.state = 160
                self.index()
                self.state = 161
                self.match(BKITParser.RSB)
                self.state = 165 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==BKITParser.LSB):
                    break

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


    class Array_1d_declContext(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):
            return self.getToken(BKITParser.LSB, 0)

        def index(self):
            return self.getTypedRuleContext(BKITParser.IndexContext,0)


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

        def array_assignment(self):
            return self.getTypedRuleContext(BKITParser.Array_assignmentContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_array_1d_decl




    def array_1d_decl(self):

        localctx = BKITParser.Array_1d_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_array_1d_decl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 169
            self.match(BKITParser.ID)

            self.state = 170
            self.match(BKITParser.LSB)
            self.state = 171
            self.index()
            self.state = 172
            self.match(BKITParser.RSB)

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


    class Func_declContext(ParserRuleContext):

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

        def FUNCTION(self):
            return self.getToken(BKITParser.FUNCTION, 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 BODY(self):
            return self.getToken(BKITParser.BODY, 0)

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

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

        def param(self):
            return self.getTypedRuleContext(BKITParser.ParamContext,0)


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


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_func_decl




    def func_decl(self):

        localctx = BKITParser.Func_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_func_decl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 176
            self.match(BKITParser.FUNCTION)
            self.state = 177
            self.match(BKITParser.COLON)
            self.state = 178
            self.match(BKITParser.ID)
            self.state = 180
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.PARAMETER:
                self.state = 179
                self.param()


            self.state = 182
            self.match(BKITParser.BODY)
            self.state = 183
            self.match(BKITParser.COLON)
            self.state = 189
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.VAR) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID:
                self.state = 187
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,9,self._ctx)
                if la_ == 1:
                    self.state = 184
                    self.var_decl()
                    pass

                elif la_ == 2:
                    self.state = 185
                    self.array_decl()
                    pass

                elif la_ == 3:
                    self.state = 186
                    self.statement()
                    pass


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

            self.state = 193
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 192
                self.return_statement()


            self.state = 195
            self.match(BKITParser.ENDBODY)
            self.state = 196
            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 ParamContext(ParserRuleContext):

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

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

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

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

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

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

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

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


        def getRuleIndex(self):
            return BKITParser.RULE_param




    def param(self):

        localctx = BKITParser.ParamContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_param)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 198
            self.match(BKITParser.PARAMETER)
            self.state = 199
            self.match(BKITParser.COLON)
            self.state = 211
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                self.state = 200
                self.match(BKITParser.ID)
                pass

            elif la_ == 2:
                self.state = 201
                self.match(BKITParser.ID)
                self.state = 207 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 202
                    self.match(BKITParser.LSB)
                    self.state = 204
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if ((((_la - 31)) & ~0x3f) == 0 and ((1 << (_la - 31)) & ((1 << (BKITParser.TRUE - 31)) | (1 << (BKITParser.FALSE - 31)) | (1 << (BKITParser.LP - 31)) | (1 << (BKITParser.LB - 31)) | (1 << (BKITParser.SUB - 31)) | (1 << (BKITParser.NOT - 31)) | (1 << (BKITParser.SUBPOINT - 31)) | (1 << (BKITParser.STRINGLIT - 31)) | (1 << (BKITParser.REAL - 31)) | (1 << (BKITParser.DECIMAL - 31)) | (1 << (BKITParser.HEXADECIMAL - 31)) | (1 << (BKITParser.OCTAL - 31)) | (1 << (BKITParser.ID - 31)))) != 0):
                        self.state = 203
                        self.expr(0)


                    self.state = 206
                    self.match(BKITParser.RSB)
                    self.state = 209 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==BKITParser.LSB):
                        break

                pass


            self.state = 229
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.CM:
                self.state = 213
                self.match(BKITParser.CM)
                self.state = 225
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
                if la_ == 1:
                    self.state = 214
                    self.match(BKITParser.ID)
                    pass

                elif la_ == 2:
                    self.state = 215
                    self.match(BKITParser.ID)
                    self.state = 221 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while True:
                        self.state = 216
                        self.match(BKITParser.LSB)
                        self.state = 218
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if ((((_la - 31)) & ~0x3f) == 0 and ((1 << (_la - 31)) & ((1 << (BKITParser.TRUE - 31)) | (1 << (BKITParser.FALSE - 31)) | (1 << (BKITParser.LP - 31)) | (1 << (BKITParser.LB - 31)) | (1 << (BKITParser.SUB - 31)) | (1 << (BKITParser.NOT - 31)) | (1 << (BKITParser.SUBPOINT - 31)) | (1 << (BKITParser.STRINGLIT - 31)) | (1 << (BKITParser.REAL - 31)) | (1 << (BKITParser.DECIMAL - 31)) | (1 << (BKITParser.HEXADECIMAL - 31)) | (1 << (BKITParser.OCTAL - 31)) | (1 << (BKITParser.ID - 31)))) != 0):
                            self.state = 217
                            self.expr(0)


                        self.state = 220
                        self.match(BKITParser.RSB)
                        self.state = 223 
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if not (_la==BKITParser.LSB):
                            break

                    pass


                self.state = 231
                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 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 ENDBODY(self):
            return self.getToken(BKITParser.ENDBODY, 0)

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

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


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_body




    def body(self):

        localctx = BKITParser.BodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_body)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 232
            self.match(BKITParser.BODY)
            self.state = 233
            self.match(BKITParser.COLON)
            self.state = 239
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.VAR) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID:
                self.state = 237
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                if la_ == 1:
                    self.state = 234
                    self.var_decl()
                    pass

                elif la_ == 2:
                    self.state = 235
                    self.array_decl()
                    pass

                elif la_ == 3:
                    self.state = 236
                    self.statement()
                    pass


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

            self.state = 243
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 242
                self.return_statement()


            self.state = 245
            self.match(BKITParser.ENDBODY)
            self.state = 246
            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 Func_callContext(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 arguement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.ArguementContext)
            else:
                return self.getTypedRuleContext(BKITParser.ArguementContext,i)


        def postfix_array_exp_for_decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Postfix_array_exp_for_declContext)
            else:
                return self.getTypedRuleContext(BKITParser.Postfix_array_exp_for_declContext,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




    def func_call(self):

        localctx = BKITParser.Func_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_func_call)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 248
            self.match(BKITParser.ID)
            self.state = 249
            self.match(BKITParser.LP)
            self.state = 258
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 31)) & ~0x3f) == 0 and ((1 << (_la - 31)) & ((1 << (BKITParser.TRUE - 31)) | (1 << (BKITParser.FALSE - 31)) | (1 << (BKITParser.LP - 31)) | (1 << (BKITParser.LB - 31)) | (1 << (BKITParser.SUB - 31)) | (1 << (BKITParser.NOT - 31)) | (1 << (BKITParser.SUBPOINT - 31)) | (1 << (BKITParser.STRINGLIT - 31)) | (1 << (BKITParser.REAL - 31)) | (1 << (BKITParser.DECIMAL - 31)) | (1 << (BKITParser.HEXADECIMAL - 31)) | (1 << (BKITParser.OCTAL - 31)) | (1 << (BKITParser.ID - 31)))) != 0):
                self.state = 250
                self.arguement()
                self.state = 255
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BKITParser.CM:
                    self.state = 251
                    self.match(BKITParser.CM)
                    self.state = 252
                    self.arguement()
                    self.state = 257
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 260
            self.match(BKITParser.RP)
            self.state = 264
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,24,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 261
                    self.postfix_array_exp_for_decl() 
                self.state = 266
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,24,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 ArguementContext(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 literals(self):
            return self.getTypedRuleContext(BKITParser.LiteralsContext,0)


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


        def getRuleIndex(self):
            return BKITParser.RULE_arguement




    def arguement(self):

        localctx = BKITParser.ArguementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_arguement)
        try:
            self.state = 270
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,25,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 267
                self.match(BKITParser.ID)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 268
                self.literals()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 269
                self.expr(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 Int_of_floatContext(ParserRuleContext):

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

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

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

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

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

        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_int_of_float




    def int_of_float(self):

        localctx = BKITParser.Int_of_floatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_int_of_float)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 272
            self.match(BKITParser.T__0)
            self.state = 273
            self.match(BKITParser.LP)
            self.state = 277
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,26,self._ctx)
            if la_ == 1:
                self.state = 274
                self.match(BKITParser.ID)
                pass

            elif la_ == 2:
                self.state = 275
                self.match(BKITParser.REAL)
                pass

            elif la_ == 3:
                self.state = 276
                self.func_call()
                pass


            self.state = 279
            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 Float_of_intContext(ParserRuleContext):

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

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

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

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

        def intlit(self):
            return self.getTypedRuleContext(BKITParser.IntlitContext,0)


        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_float_of_int




    def float_of_int(self):

        localctx = BKITParser.Float_of_intContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_float_of_int)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 281
            self.match(BKITParser.T__1)
            self.state = 282
            self.match(BKITParser.LP)
            self.state = 286
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
            if la_ == 1:
                self.state = 283
                self.match(BKITParser.ID)
                pass

            elif la_ == 2:
                self.state = 284
                self.intlit()
                pass

            elif la_ == 3:
                self.state = 285
                self.func_call()
                pass


            self.state = 288
            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 Int_of_stringContext(ParserRuleContext):

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

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

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

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

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

        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_int_of_string




    def int_of_string(self):

        localctx = BKITParser.Int_of_stringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_int_of_string)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 290
            self.match(BKITParser.T__2)
            self.state = 291
            self.match(BKITParser.LP)
            self.state = 295
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,28,self._ctx)
            if la_ == 1:
                self.state = 292
                self.match(BKITParser.STRINGLIT)
                pass

            elif la_ == 2:
                self.state = 293
                self.match(BKITParser.ID)
                pass

            elif la_ == 3:
                self.state = 294
                self.func_call()
                pass


            self.state = 297
            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 String_of_intContext(ParserRuleContext):

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

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

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

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

        def intlit(self):
            return self.getTypedRuleContext(BKITParser.IntlitContext,0)


        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_string_of_int




    def string_of_int(self):

        localctx = BKITParser.String_of_intContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_string_of_int)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 299
            self.match(BKITParser.T__3)
            self.state = 300
            self.match(BKITParser.LP)
            self.state = 304
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,29,self._ctx)
            if la_ == 1:
                self.state = 301
                self.match(BKITParser.ID)
                pass

            elif la_ == 2:
                self.state = 302
                self.intlit()
                pass

            elif la_ == 3:
                self.state = 303
                self.func_call()
                pass


            self.state = 306
            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 Float_of_stringContext(ParserRuleContext):

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

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

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

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

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

        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_float_of_string




    def float_of_string(self):

        localctx = BKITParser.Float_of_stringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_float_of_string)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 308
            self.match(BKITParser.T__4)
            self.state = 309
            self.match(BKITParser.LP)
            self.state = 313
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,30,self._ctx)
            if la_ == 1:
                self.state = 310
                self.match(BKITParser.STRINGLIT)
                pass

            elif la_ == 2:
                self.state = 311
                self.match(BKITParser.ID)
                pass

            elif la_ == 3:
                self.state = 312
                self.func_call()
                pass


            self.state = 315
            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 String_of_floatContext(ParserRuleContext):

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

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

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

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

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

        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_string_of_float




    def string_of_float(self):

        localctx = BKITParser.String_of_floatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_string_of_float)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 317
            self.match(BKITParser.T__5)
            self.state = 318
            self.match(BKITParser.LP)
            self.state = 322
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,31,self._ctx)
            if la_ == 1:
                self.state = 319
                self.match(BKITParser.REAL)
                pass

            elif la_ == 2:
                self.state = 320
                self.match(BKITParser.ID)
                pass

            elif la_ == 3:
                self.state = 321
                self.func_call()
                pass


            self.state = 324
            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 Bool_of_stringContext(ParserRuleContext):

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

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

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

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

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

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

        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_bool_of_string




    def bool_of_string(self):

        localctx = BKITParser.Bool_of_stringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_bool_of_string)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 326
            self.match(BKITParser.T__6)
            self.state = 327
            self.match(BKITParser.LP)
            self.state = 332
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,32,self._ctx)
            if la_ == 1:
                self.state = 328
                self.match(BKITParser.TRUE)
                pass

            elif la_ == 2:
                self.state = 329
                self.match(BKITParser.FALSE)
                pass

            elif la_ == 3:
                self.state = 330
                self.match(BKITParser.ID)
                pass

            elif la_ == 4:
                self.state = 331
                self.func_call()
                pass


            self.state = 334
            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 String_of_boolContext(ParserRuleContext):

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

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

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

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

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

        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_string_of_bool




    def string_of_bool(self):

        localctx = BKITParser.String_of_boolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_string_of_bool)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 336
            self.match(BKITParser.T__7)
            self.state = 337
            self.match(BKITParser.LP)
            self.state = 341
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,33,self._ctx)
            if la_ == 1:
                self.state = 338
                self.match(BKITParser.BOOLINT)
                pass

            elif la_ == 2:
                self.state = 339
                self.match(BKITParser.ID)
                pass

            elif la_ == 3:
                self.state = 340
                self.func_call()
                pass


            self.state = 343
            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 assignment_statement(self):
            return self.getTypedRuleContext(BKITParser.Assignment_statementContext,0)


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

        def if_statement(self):
            return self.getTypedRuleContext(BKITParser.If_statementContext,0)


        def for_statement(self):
            return self.getTypedRuleContext(BKITParser.For_statementContext,0)


        def while_statement(self):
            return self.getTypedRuleContext(BKITParser.While_statementContext,0)


        def do_while_statement(self):
            return self.getTypedRuleContext(BKITParser.Do_while_statementContext,0)


        def break_statement(self):
            return self.getTypedRuleContext(BKITParser.Break_statementContext,0)


        def continue_statement(self):
            return self.getTypedRuleContext(BKITParser.Continue_statementContext,0)


        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def println(self):
            return self.getTypedRuleContext(BKITParser.PrintlnContext,0)


        def printstr(self):
            return self.getTypedRuleContext(BKITParser.PrintstrContext,0)


        def printstrln(self):
            return self.getTypedRuleContext(BKITParser.PrintstrlnContext,0)


        def read(self):
            return self.getTypedRuleContext(BKITParser.ReadContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_statement




    def statement(self):

        localctx = BKITParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_statement)
        try:
            self.state = 361
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,34,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 345
                self.assignment_statement()
                self.state = 346
                self.match(BKITParser.SM)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 348
                self.if_statement()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 349
                self.for_statement()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 350
                self.while_statement()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 351
                self.do_while_statement()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 352
                self.break_statement()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 353
                self.continue_statement()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 354
                self.func_call()
                self.state = 355
                self.match(BKITParser.SM)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 357
                self.println()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 358
                self.printstr()
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 359
                self.printstrln()
                pass

            elif la_ == 12:
                self.enterOuterAlt(localctx, 12)
                self.state = 360
                self.read()
                pass


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


    class Statement_listContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return BKITParser.RULE_statement_list




    def statement_list(self):

        localctx = BKITParser.Statement_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_statement_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 364 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 363
                self.statement()
                self.state = 366 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID):
                    break

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


    class Array_assignContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return BKITParser.RULE_array_assign




    def array_assign(self):

        localctx = BKITParser.Array_assignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_array_assign)
        try:
            self.enterOuterAlt(localctx, 1)

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


    class Assignment_statementContext(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 ASSIGN(self):
            return self.getToken(BKITParser.ASSIGN, 0)

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


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

        def index(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.IndexContext)
            else:
                return self.getTypedRuleContext(BKITParser.IndexContext,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_assignment_statement




    def assignment_statement(self):

        localctx = BKITParser.Assignment_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_assignment_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 370
            self.match(BKITParser.ID)
            self.state = 377
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.LSB:
                self.state = 371
                self.match(BKITParser.LSB)
                self.state = 372
                self.index()
                self.state = 373
                self.match(BKITParser.RSB)
                self.state = 379
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 380
            self.match(BKITParser.ASSIGN)
            self.state = 381
            self.expr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IndexContext(ParserRuleContext):

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

        def intlit(self):
            return self.getTypedRuleContext(BKITParser.IntlitContext,0)


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


        def getRuleIndex(self):
            return BKITParser.RULE_index




    def index(self):

        localctx = BKITParser.IndexContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_index)
        try:
            self.state = 385
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,37,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 383
                self.intlit()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 384
                self.expr(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 ArithmeticContext(ParserRuleContext):

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

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


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

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

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

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_arithmetic




    def arithmetic(self):

        localctx = BKITParser.ArithmeticContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_arithmetic)
        self._la = 0 # Token type
        try:
            self.state = 394
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BKITParser.DECIMAL, BKITParser.HEXADECIMAL, BKITParser.OCTAL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 387
                self.intlit()
                self.state = 388
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.ADD) | (1 << BKITParser.SUB) | (1 << BKITParser.MUL) | (1 << BKITParser.DIV) | (1 << BKITParser.MOD))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 389
                self.intlit()
                pass
            elif token in [BKITParser.REAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 391
                self.match(BKITParser.REAL)
                self.state = 392
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.ADDPOINT) | (1 << BKITParser.SUBPOINT) | (1 << BKITParser.MULPOINT) | (1 << BKITParser.DIVPOINT))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 393
                self.match(BKITParser.REAL)
                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 ExprContext(ParserRuleContext):

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

        def expr_cond(self):
            return self.getTypedRuleContext(BKITParser.Expr_condContext,0)


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


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

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

        def getRuleIndex(self):
            return BKITParser.RULE_expr



    def expr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.ExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 58
        self.enterRecursionRule(localctx, 58, self.RULE_expr, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 397
            self.expr_cond(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 404
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,39,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.ExprContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                    self.state = 399
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 400
                    _la = self._input.LA(1)
                    if not(_la==BKITParser.AND or _la==BKITParser.OR):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 401
                    self.expr_cond(0) 
                self.state = 406
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,39,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 Expr_condContext(ParserRuleContext):

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

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


        def expr_cond(self):
            return self.getTypedRuleContext(BKITParser.Expr_condContext,0)


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

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

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

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

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_expr_cond



    def expr_cond(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.Expr_condContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 60
        self.enterRecursionRule(localctx, 60, self.RULE_expr_cond, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 408
            self.expr1(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 415
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,40,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.Expr_condContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_expr_cond)
                    self.state = 410
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 411
                    _la = self._input.LA(1)
                    if not(((((_la - 57)) & ~0x3f) == 0 and ((1 << (_la - 57)) & ((1 << (BKITParser.LTE - 57)) | (1 << (BKITParser.GTE - 57)) | (1 << (BKITParser.LT - 57)) | (1 << (BKITParser.GT - 57)) | (1 << (BKITParser.LTEPOINT - 57)) | (1 << (BKITParser.GTEPOINT - 57)) | (1 << (BKITParser.LTPOINT - 57)) | (1 << (BKITParser.GTPOINT - 57)) | (1 << (BKITParser.NEQPOINT - 57)) | (1 << (BKITParser.NEQ - 57)) | (1 << (BKITParser.EQ - 57)))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 412
                    self.expr1(0) 
                self.state = 417
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,40,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 Expr1Context(ParserRuleContext):

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

        def expr2(self):
            return self.getTypedRuleContext(BKITParser.Expr2Context,0)


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


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

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_expr1



    def expr1(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.Expr1Context(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 62
        self.enterRecursionRule(localctx, 62, self.RULE_expr1, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 419
            self.expr2(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 426
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,41,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.Expr1Context(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_expr1)
                    self.state = 421
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 422
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.ADD) | (1 << BKITParser.SUB) | (1 << BKITParser.ADDPOINT) | (1 << BKITParser.SUBPOINT))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 423
                    self.expr2(0) 
                self.state = 428
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,41,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 Expr2Context(ParserRuleContext):

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

        def expr3(self):
            return self.getTypedRuleContext(BKITParser.Expr3Context,0)


        def expr2(self):
            return self.getTypedRuleContext(BKITParser.Expr2Context,0)


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

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

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

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_expr2



    def expr2(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BKITParser.Expr2Context(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 64
        self.enterRecursionRule(localctx, 64, self.RULE_expr2, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 430
            self.expr3()
            self._ctx.stop = self._input.LT(-1)
            self.state = 437
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,42,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.Expr2Context(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_expr2)
                    self.state = 432
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 433
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.MUL) | (1 << BKITParser.DIV) | (1 << BKITParser.MOD) | (1 << BKITParser.MOD2) | (1 << BKITParser.MULPOINT) | (1 << BKITParser.DIVPOINT))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 434
                    self.expr3() 
                self.state = 439
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,42,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 Expr3Context(ParserRuleContext):

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

        def expr4(self):
            return self.getTypedRuleContext(BKITParser.Expr4Context,0)


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

        def getRuleIndex(self):
            return BKITParser.RULE_expr3




    def expr3(self):

        localctx = BKITParser.Expr3Context(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_expr3)
        try:
            self.state = 443
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BKITParser.NOT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 440
                self.match(BKITParser.NOT)
                self.state = 441
                self.expr4()
                pass
            elif token in [BKITParser.TRUE, BKITParser.FALSE, BKITParser.LP, BKITParser.LB, BKITParser.SUB, BKITParser.SUBPOINT, BKITParser.STRINGLIT, BKITParser.REAL, BKITParser.DECIMAL, BKITParser.HEXADECIMAL, BKITParser.OCTAL, BKITParser.ID]:
                self.enterOuterAlt(localctx, 2)
                self.state = 442
                self.expr4()
                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 Expr4Context(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 SUB(self):
            return self.getToken(BKITParser.SUB, 0)

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

        def getRuleIndex(self):
            return BKITParser.RULE_expr4




    def expr4(self):

        localctx = BKITParser.Expr4Context(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_expr4)
        self._la = 0 # Token type
        try:
            self.state = 448
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BKITParser.SUB, BKITParser.SUBPOINT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 445
                _la = self._input.LA(1)
                if not(_la==BKITParser.SUB or _la==BKITParser.SUBPOINT):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 446
                self.operand()
                pass
            elif token in [BKITParser.TRUE, BKITParser.FALSE, BKITParser.LP, BKITParser.LB, BKITParser.STRINGLIT, BKITParser.REAL, BKITParser.DECIMAL, BKITParser.HEXADECIMAL, BKITParser.OCTAL, BKITParser.ID]:
                self.enterOuterAlt(localctx, 2)
                self.state = 447
                self.operand()
                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 OperandContext(ParserRuleContext):

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

        def literals(self):
            return self.getTypedRuleContext(BKITParser.LiteralsContext,0)


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

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


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

        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 RSB(self, i:int=None):
            if i is None:
                return self.getTokens(BKITParser.RSB)
            else:
                return self.getToken(BKITParser.RSB, i)

        def func_call(self):
            return self.getTypedRuleContext(BKITParser.Func_callContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_operand




    def operand(self):

        localctx = BKITParser.OperandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_operand)
        try:
            self.state = 466
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,46,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 450
                self.literals()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 451
                self.match(BKITParser.LP)
                self.state = 452
                self.expr(0)
                self.state = 453
                self.match(BKITParser.RP)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 455
                self.match(BKITParser.ID)
                self.state = 462
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,45,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 456
                        self.match(BKITParser.LSB)
                        self.state = 457
                        self.expr(0)
                        self.state = 458
                        self.match(BKITParser.RSB) 
                    self.state = 464
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,45,self._ctx)

                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 465
                self.func_call()
                pass


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


    class If_statementContext(ParserRuleContext):

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

        def if_stmt(self):
            return self.getTypedRuleContext(BKITParser.If_stmtContext,0)


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

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

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


        def else_stmt(self):
            return self.getTypedRuleContext(BKITParser.Else_stmtContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_if_statement




    def if_statement(self):

        localctx = BKITParser.If_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_if_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 468
            self.if_stmt()
            self.state = 472
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.ELSEIF:
                self.state = 469
                self.elseif_stmt()
                self.state = 474
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 476
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.ELSE:
                self.state = 475
                self.else_stmt()


            self.state = 478
            self.match(BKITParser.ENDIF)
            self.state = 479
            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 If_stmtContext(ParserRuleContext):

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

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

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


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

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


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_if_stmt




    def if_stmt(self):

        localctx = BKITParser.If_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_if_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 481
            self.match(BKITParser.IF)
            self.state = 482
            self.expr(0)
            self.state = 483
            self.match(BKITParser.THEN)
            self.state = 489
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.VAR) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID:
                self.state = 487
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,49,self._ctx)
                if la_ == 1:
                    self.state = 484
                    self.var_decl()
                    pass

                elif la_ == 2:
                    self.state = 485
                    self.array_decl()
                    pass

                elif la_ == 3:
                    self.state = 486
                    self.statement()
                    pass


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

            self.state = 493
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 492
                self.return_statement()


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


    class Elseif_stmtContext(ParserRuleContext):

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

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

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


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

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


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_elseif_stmt




    def elseif_stmt(self):

        localctx = BKITParser.Elseif_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_elseif_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 495
            self.match(BKITParser.ELSEIF)
            self.state = 496
            self.expr(0)
            self.state = 497
            self.match(BKITParser.THEN)
            self.state = 503
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.VAR) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID:
                self.state = 501
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,52,self._ctx)
                if la_ == 1:
                    self.state = 498
                    self.var_decl()
                    pass

                elif la_ == 2:
                    self.state = 499
                    self.array_decl()
                    pass

                elif la_ == 3:
                    self.state = 500
                    self.statement()
                    pass


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

            self.state = 507
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 506
                self.return_statement()


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


    class Else_stmtContext(ParserRuleContext):

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

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

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


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_else_stmt




    def else_stmt(self):

        localctx = BKITParser.Else_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_else_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 509
            self.match(BKITParser.ELSE)
            self.state = 515
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.VAR) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID:
                self.state = 513
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,55,self._ctx)
                if la_ == 1:
                    self.state = 510
                    self.var_decl()
                    pass

                elif la_ == 2:
                    self.state = 511
                    self.array_decl()
                    pass

                elif la_ == 3:
                    self.state = 512
                    self.statement()
                    pass


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

            self.state = 519
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 518
                self.return_statement()


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


    class For_statementContext(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 ID(self):
            return self.getToken(BKITParser.ID, 0)

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

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


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

        def expr_cond(self):
            return self.getTypedRuleContext(BKITParser.Expr_condContext,0)


        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 var_decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declContext,i)


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_for_statement




    def for_statement(self):

        localctx = BKITParser.For_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_for_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 521
            self.match(BKITParser.FOR)
            self.state = 522
            self.match(BKITParser.LP)
            self.state = 523
            self.match(BKITParser.ID)
            self.state = 524
            self.match(BKITParser.ASSIGN)
            self.state = 525
            self.expr(0)
            self.state = 526
            self.match(BKITParser.CM)
            self.state = 527
            self.expr_cond(0)
            self.state = 528
            self.match(BKITParser.CM)
            self.state = 529
            self.expr(0)
            self.state = 530
            self.match(BKITParser.RP)
            self.state = 531
            self.match(BKITParser.DO)
            self.state = 537
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.VAR) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID:
                self.state = 535
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,58,self._ctx)
                if la_ == 1:
                    self.state = 532
                    self.var_decl()
                    pass

                elif la_ == 2:
                    self.state = 533
                    self.array_decl()
                    pass

                elif la_ == 3:
                    self.state = 534
                    self.statement()
                    pass


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

            self.state = 541
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 540
                self.return_statement()


            self.state = 543
            self.match(BKITParser.ENDFOR)
            self.state = 544
            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_statementContext(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 expr(self):
            return self.getTypedRuleContext(BKITParser.ExprContext,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_decl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.Var_declContext)
            else:
                return self.getTypedRuleContext(BKITParser.Var_declContext,i)


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_while_statement




    def while_statement(self):

        localctx = BKITParser.While_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_while_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 546
            self.match(BKITParser.WHILE)
            self.state = 547
            self.expr(0)
            self.state = 548
            self.match(BKITParser.DO)
            self.state = 554
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BKITParser.T__8) | (1 << BKITParser.T__9) | (1 << BKITParser.T__10) | (1 << BKITParser.T__11) | (1 << BKITParser.BREAK) | (1 << BKITParser.CONTINUE) | (1 << BKITParser.DO) | (1 << BKITParser.FOR) | (1 << BKITParser.IF) | (1 << BKITParser.VAR) | (1 << BKITParser.WHILE))) != 0) or _la==BKITParser.ID:
                self.state = 552
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,61,self._ctx)
                if la_ == 1:
                    self.state = 549
                    self.var_decl()
                    pass

                elif la_ == 2:
                    self.state = 550
                    self.array_decl()
                    pass

                elif la_ == 3:
                    self.state = 551
                    self.statement()
                    pass


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

            self.state = 558
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 557
                self.return_statement()


            self.state = 560
            self.match(BKITParser.ENDWHILE)
            self.state = 561
            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 Do_while_statementContext(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 expr(self):
            return self.getTypedRuleContext(BKITParser.ExprContext,0)


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

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

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


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


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


        def return_statement(self):
            return self.getTypedRuleContext(BKITParser.Return_statementContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_do_while_statement




    def do_while_statement(self):

        localctx = BKITParser.Do_while_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_do_while_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 563
            self.match(BKITParser.DO)
            self.state = 569
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,65,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 567
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,64,self._ctx)
                    if la_ == 1:
                        self.state = 564
                        self.var_decl()
                        pass

                    elif la_ == 2:
                        self.state = 565
                        self.array_decl()
                        pass

                    elif la_ == 3:
                        self.state = 566
                        self.statement()
                        pass

             
                self.state = 571
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,65,self._ctx)

            self.state = 573
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BKITParser.RETURN:
                self.state = 572
                self.return_statement()


            self.state = 575
            self.match(BKITParser.WHILE)
            self.state = 576
            self.expr(0)
            self.state = 577
            self.match(BKITParser.ENDDO)
            self.state = 578
            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_statementContext(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 SM(self):
            return self.getToken(BKITParser.SM, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_break_statement




    def break_statement(self):

        localctx = BKITParser.Break_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_break_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 580
            self.match(BKITParser.BREAK)
            self.state = 581
            self.match(BKITParser.SM)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Continue_statementContext(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 SM(self):
            return self.getToken(BKITParser.SM, 0)

        def getRuleIndex(self):
            return BKITParser.RULE_continue_statement




    def continue_statement(self):

        localctx = BKITParser.Continue_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_continue_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 583
            self.match(BKITParser.CONTINUE)
            self.state = 584
            self.match(BKITParser.SM)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Return_statementContext(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 SM(self):
            return self.getToken(BKITParser.SM, 0)

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


        def getRuleIndex(self):
            return BKITParser.RULE_return_statement




    def return_statement(self):

        localctx = BKITParser.Return_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_return_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 586
            self.match(BKITParser.RETURN)
            self.state = 588
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 31)) & ~0x3f) == 0 and ((1 << (_la - 31)) & ((1 << (BKITParser.TRUE - 31)) | (1 << (BKITParser.FALSE - 31)) | (1 << (BKITParser.LP - 31)) | (1 << (BKITParser.LB - 31)) | (1 << (BKITParser.SUB - 31)) | (1 << (BKITParser.NOT - 31)) | (1 << (BKITParser.SUBPOINT - 31)) | (1 << (BKITParser.STRINGLIT - 31)) | (1 << (BKITParser.REAL - 31)) | (1 << (BKITParser.DECIMAL - 31)) | (1 << (BKITParser.HEXADECIMAL - 31)) | (1 << (BKITParser.OCTAL - 31)) | (1 << (BKITParser.ID - 31)))) != 0):
                self.state = 587
                self.expr(0)


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


    class PrintlnContext(ParserRuleContext):

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_println




    def println(self):

        localctx = BKITParser.PrintlnContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_println)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 592
            self.match(BKITParser.T__8)
            self.state = 593
            self.match(BKITParser.LP)
            self.state = 594
            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 PrintstrContext(ParserRuleContext):

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

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

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


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

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

        def getRuleIndex(self):
            return BKITParser.RULE_printstr




    def printstr(self):

        localctx = BKITParser.PrintstrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_printstr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 596
            self.match(BKITParser.T__9)
            self.state = 597
            self.match(BKITParser.LP)
            self.state = 598
            self.operand()
            self.state = 599
            self.match(BKITParser.RP)
            self.state = 600
            self.match(BKITParser.SM)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PrintstrlnContext(ParserRuleContext):

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

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

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


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

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

        def getRuleIndex(self):
            return BKITParser.RULE_printstrln




    def printstrln(self):

        localctx = BKITParser.PrintstrlnContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_printstrln)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 602
            self.match(BKITParser.T__10)
            self.state = 603
            self.match(BKITParser.LP)
            self.state = 604
            self.operand()
            self.state = 605
            self.match(BKITParser.RP)
            self.state = 606
            self.match(BKITParser.SM)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ReadContext(ParserRuleContext):

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

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_read




    def read(self):

        localctx = BKITParser.ReadContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_read)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 608
            self.match(BKITParser.T__11)
            self.state = 609
            self.match(BKITParser.LP)
            self.state = 610
            self.match(BKITParser.RP)
            self.state = 611
            self.match(BKITParser.SM)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LiteralsContext(ParserRuleContext):

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

        def intlit(self):
            return self.getTypedRuleContext(BKITParser.IntlitContext,0)


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

        def bool_lit(self):
            return self.getTypedRuleContext(BKITParser.Bool_litContext,0)


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

        def array_lit(self):
            return self.getTypedRuleContext(BKITParser.Array_litContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_literals




    def literals(self):

        localctx = BKITParser.LiteralsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_literals)
        try:
            self.state = 618
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BKITParser.DECIMAL, BKITParser.HEXADECIMAL, BKITParser.OCTAL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 613
                self.intlit()
                pass
            elif token in [BKITParser.REAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 614
                self.match(BKITParser.REAL)
                pass
            elif token in [BKITParser.TRUE, BKITParser.FALSE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 615
                self.bool_lit()
                pass
            elif token in [BKITParser.STRINGLIT]:
                self.enterOuterAlt(localctx, 4)
                self.state = 616
                self.match(BKITParser.STRINGLIT)
                pass
            elif token in [BKITParser.LB]:
                self.enterOuterAlt(localctx, 5)
                self.state = 617
                self.array_lit()
                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_litContext(ParserRuleContext):

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

        def array1dlit(self):
            return self.getTypedRuleContext(BKITParser.Array1dlitContext,0)


        def arrayndlit(self):
            return self.getTypedRuleContext(BKITParser.ArrayndlitContext,0)


        def getRuleIndex(self):
            return BKITParser.RULE_array_lit




    def array_lit(self):

        localctx = BKITParser.Array_litContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_array_lit)
        try:
            self.state = 622
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,69,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 620
                self.array1dlit()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 621
                self.arrayndlit()
                pass


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


    class Array1dlitContext(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 literals(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.LiteralsContext)
            else:
                return self.getTypedRuleContext(BKITParser.LiteralsContext,i)


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

        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_array1dlit




    def array1dlit(self):

        localctx = BKITParser.Array1dlitContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_array1dlit)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 624
            self.match(BKITParser.LB)
            self.state = 625
            self.literals()
            self.state = 630
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BKITParser.CM:
                self.state = 626
                self.match(BKITParser.CM)
                self.state = 627
                self.literals()
                self.state = 632
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 633
            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 ArrayndlitContext(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 literals(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BKITParser.LiteralsContext)
            else:
                return self.getTypedRuleContext(BKITParser.LiteralsContext,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_arrayndlit




    def arrayndlit(self):

        localctx = BKITParser.ArrayndlitContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_arrayndlit)
        self._la = 0 # Token type
        try:
            self.state = 651
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,73,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 635
                self.match(BKITParser.LB)
                self.state = 637
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((((_la - 31)) & ~0x3f) == 0 and ((1 << (_la - 31)) & ((1 << (BKITParser.TRUE - 31)) | (1 << (BKITParser.FALSE - 31)) | (1 << (BKITParser.LB - 31)) | (1 << (BKITParser.STRINGLIT - 31)) | (1 << (BKITParser.REAL - 31)) | (1 << (BKITParser.DECIMAL - 31)) | (1 << (BKITParser.HEXADECIMAL - 31)) | (1 << (BKITParser.OCTAL - 31)))) != 0):
                    self.state = 636
                    self.literals()


                self.state = 643
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BKITParser.CM:
                    self.state = 639
                    self.match(BKITParser.CM)
                    self.state = 640
                    self.literals()
                    self.state = 645
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 646
                self.match(BKITParser.RB)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 647
                self.match(BKITParser.LB)
                self.state = 648
                self.literals()
                self.state = 649
                self.match(BKITParser.RB)
                pass


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


    class Bool_litContext(ParserRuleContext):

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_bool_lit




    def bool_lit(self):

        localctx = BKITParser.Bool_litContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_bool_lit)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 653
            _la = self._input.LA(1)
            if not(_la==BKITParser.TRUE or _la==BKITParser.FALSE):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IntlitContext(ParserRuleContext):

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

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

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

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

        def getRuleIndex(self):
            return BKITParser.RULE_intlit




    def intlit(self):

        localctx = BKITParser.IntlitContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_intlit)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 655
            _la = self._input.LA(1)
            if not(((((_la - 72)) & ~0x3f) == 0 and ((1 << (_la - 72)) & ((1 << (BKITParser.DECIMAL - 72)) | (1 << (BKITParser.HEXADECIMAL - 72)) | (1 << (BKITParser.OCTAL - 72)))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[29] = self.expr_sempred
        self._predicates[30] = self.expr_cond_sempred
        self._predicates[31] = self.expr1_sempred
        self._predicates[32] = self.expr2_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def expr_sempred(self, localctx:ExprContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 2)
         

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

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

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




