# *** GENERATED BY antlr4, DO NOT EDIT BY HAND ***
#
# Generated from Autolev.g4 by ANTLR 4.7.1
#
# Generated with antlr4
#    antlr4 is licensed under the BSD-3-Clause License
#    https://github.com/antlr/antlr4/blob/master/LICENSE.txt
from __future__ import print_function
from antlr4 import *
from io import StringIO
import sys

def serializedATN():
    with StringIO() as buf:
        buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3")
        buf.write(u"\63\u01b1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7")
        buf.write(u"\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t")
        buf.write(u"\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22")
        buf.write(u"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4")
        buf.write(u"\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35")
        buf.write(u"\t\35\3\2\6\2<\n\2\r\2\16\2=\3\3\3\3\3\3\3\3\3\3\3\3")
        buf.write(u"\3\3\5\3G\n\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4")
        buf.write(u"\3\4\3\4\3\4\5\4V\n\4\3\4\3\4\3\4\5\4[\n\4\3\5\3\5\3")
        buf.write(u"\6\3\6\3\6\7\6b\n\6\f\6\16\6e\13\6\3\7\6\7h\n\7\r\7\16")
        buf.write(u"\7i\3\b\3\b\3\b\3\b\3\b\7\bq\n\b\f\b\16\bt\13\b\5\bv")
        buf.write(u"\n\b\3\b\3\b\3\b\3\b\3\b\3\b\7\b~\n\b\f\b\16\b\u0081")
        buf.write(u"\13\b\5\b\u0083\n\b\3\b\5\b\u0086\n\b\3\t\3\t\3\t\3\t")
        buf.write(u"\7\t\u008c\n\t\f\t\16\t\u008f\13\t\3\n\3\n\3\n\3\n\3")
        buf.write(u"\n\3\n\3\n\3\n\3\n\3\n\7\n\u009b\n\n\f\n\16\n\u009e\13")
        buf.write(u"\n\3\n\3\n\7\n\u00a2\n\n\f\n\16\n\u00a5\13\n\5\n\u00a7")
        buf.write(u"\n\n\3\13\3\13\3\13\3\13\3\13\3\13\5\13\u00af\n\13\3")
        buf.write(u"\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\7\13\u00b9\n\13")
        buf.write(u"\f\13\16\13\u00bc\13\13\3\13\5\13\u00bf\n\13\3\13\3\13")
        buf.write(u"\3\13\5\13\u00c4\n\13\3\13\5\13\u00c7\n\13\3\13\7\13")
        buf.write(u"\u00ca\n\13\f\13\16\13\u00cd\13\13\3\13\3\13\5\13\u00d1")
        buf.write(u"\n\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\7\f\u00db\n\f\f")
        buf.write(u"\f\16\f\u00de\13\f\3\f\3\f\3\r\3\r\3\r\3\r\7\r\u00e6")
        buf.write(u"\n\r\f\r\16\r\u00e9\13\r\3\16\3\16\3\16\3\16\3\17\3\17")
        buf.write(u"\3\17\3\17\3\17\5\17\u00f4\n\17\3\17\3\17\6\17\u00f8")
        buf.write(u"\n\17\r\17\16\17\u00f9\3\20\3\20\3\20\3\20\7\20\u0100")
        buf.write(u"\n\20\f\20\16\20\u0103\13\20\3\20\3\20\3\21\3\21\3\21")
        buf.write(u"\3\21\5\21\u010b\n\21\3\21\3\21\5\21\u010f\n\21\3\22")
        buf.write(u"\3\22\3\22\3\22\3\22\5\22\u0116\n\22\3\23\3\23\5\23\u011a")
        buf.write(u"\n\23\3\24\3\24\3\24\3\24\7\24\u0120\n\24\f\24\16\24")
        buf.write(u"\u0123\13\24\3\25\3\25\3\25\3\25\7\25\u0129\n\25\f\25")
        buf.write(u"\16\25\u012c\13\25\3\26\3\26\5\26\u0130\n\26\3\27\3\27")
        buf.write(u"\3\27\3\27\5\27\u0136\n\27\3\30\3\30\3\30\3\30\7\30\u013c")
        buf.write(u"\n\30\f\30\16\30\u013f\13\30\3\31\3\31\5\31\u0143\n\31")
        buf.write(u"\3\32\3\32\3\32\3\32\3\32\3\32\7\32\u014b\n\32\f\32\16")
        buf.write(u"\32\u014e\13\32\3\32\3\32\5\32\u0152\n\32\3\32\3\32\3")
        buf.write(u"\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\7\33")
        buf.write(u"\u0160\n\33\f\33\16\33\u0163\13\33\5\33\u0165\n\33\3")
        buf.write(u"\34\3\34\6\34\u0169\n\34\r\34\16\34\u016a\3\34\3\34\5")
        buf.write(u"\34\u016f\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35")
        buf.write(u"\7\35\u0179\n\35\f\35\16\35\u017c\13\35\3\35\3\35\3\35")
        buf.write(u"\3\35\3\35\3\35\7\35\u0184\n\35\f\35\16\35\u0187\13\35")
        buf.write(u"\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u0192")
        buf.write(u"\n\35\3\35\3\35\7\35\u0196\n\35\f\35\16\35\u0199\13\35")
        buf.write(u"\5\35\u019b\n\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3")
        buf.write(u"\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\7\35\u01ac\n\35")
        buf.write(u"\f\35\16\35\u01af\13\35\3\35\2\38\36\2\4\6\b\n\f\16\20")
        buf.write(u"\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668\2\t\3\2\5")
        buf.write(u"\13\3\2\35\36\3\2\23\24\4\2\f\f\25\25\3\2./\4\2.\60\62")
        buf.write(u"\62\3\2\33\34\2\u01e5\2;\3\2\2\2\4F\3\2\2\2\6Z\3\2\2")
        buf.write(u"\2\b\\\3\2\2\2\n^\3\2\2\2\fg\3\2\2\2\16\u0085\3\2\2\2")
        buf.write(u"\20\u0087\3\2\2\2\22\u00a6\3\2\2\2\24\u00a8\3\2\2\2\26")
        buf.write(u"\u00d2\3\2\2\2\30\u00e1\3\2\2\2\32\u00ea\3\2\2\2\34\u00ee")
        buf.write(u"\3\2\2\2\36\u00fb\3\2\2\2 \u010e\3\2\2\2\"\u0115\3\2")
        buf.write(u"\2\2$\u0117\3\2\2\2&\u011b\3\2\2\2(\u0124\3\2\2\2*\u012d")
        buf.write(u"\3\2\2\2,\u0131\3\2\2\2.\u0137\3\2\2\2\60\u0140\3\2\2")
        buf.write(u"\2\62\u0144\3\2\2\2\64\u0164\3\2\2\2\66\u016e\3\2\2\2")
        buf.write(u"8\u019a\3\2\2\2:<\5\4\3\2;:\3\2\2\2<=\3\2\2\2=;\3\2\2")
        buf.write(u"\2=>\3\2\2\2>\3\3\2\2\2?G\5\20\t\2@G\5\16\b\2AG\5\"\22")
        buf.write(u"\2BG\5\30\r\2CG\5\34\17\2DG\5\6\4\2EG\5$\23\2F?\3\2\2")
        buf.write(u"\2F@\3\2\2\2FA\3\2\2\2FB\3\2\2\2FC\3\2\2\2FD\3\2\2\2")
        buf.write(u"FE\3\2\2\2G\5\3\2\2\2HI\5\66\34\2IJ\5\b\5\2JK\58\35\2")
        buf.write(u"K[\3\2\2\2LM\7\62\2\2MN\7\3\2\2NO\5\n\6\2OP\7\4\2\2P")
        buf.write(u"Q\5\b\5\2QR\58\35\2R[\3\2\2\2SU\7\62\2\2TV\5\f\7\2UT")
        buf.write(u"\3\2\2\2UV\3\2\2\2VW\3\2\2\2WX\5\b\5\2XY\58\35\2Y[\3")
        buf.write(u"\2\2\2ZH\3\2\2\2ZL\3\2\2\2ZS\3\2\2\2[\7\3\2\2\2\\]\t")
        buf.write(u"\2\2\2]\t\3\2\2\2^c\58\35\2_`\7\f\2\2`b\58\35\2a_\3\2")
        buf.write(u"\2\2be\3\2\2\2ca\3\2\2\2cd\3\2\2\2d\13\3\2\2\2ec\3\2")
        buf.write(u"\2\2fh\7\r\2\2gf\3\2\2\2hi\3\2\2\2ig\3\2\2\2ij\3\2\2")
        buf.write(u"\2j\r\3\2\2\2kl\7\62\2\2lu\7\16\2\2mr\58\35\2no\7\f\2")
        buf.write(u"\2oq\58\35\2pn\3\2\2\2qt\3\2\2\2rp\3\2\2\2rs\3\2\2\2")
        buf.write(u"sv\3\2\2\2tr\3\2\2\2um\3\2\2\2uv\3\2\2\2vw\3\2\2\2w\u0086")
        buf.write(u"\7\17\2\2xy\t\3\2\2y\u0082\7\16\2\2z\177\7\62\2\2{|\7")
        buf.write(u"\f\2\2|~\7\62\2\2}{\3\2\2\2~\u0081\3\2\2\2\177}\3\2\2")
        buf.write(u"\2\177\u0080\3\2\2\2\u0080\u0083\3\2\2\2\u0081\177\3")
        buf.write(u"\2\2\2\u0082z\3\2\2\2\u0082\u0083\3\2\2\2\u0083\u0084")
        buf.write(u"\3\2\2\2\u0084\u0086\7\17\2\2\u0085k\3\2\2\2\u0085x\3")
        buf.write(u"\2\2\2\u0086\17\3\2\2\2\u0087\u0088\5\22\n\2\u0088\u008d")
        buf.write(u"\5\24\13\2\u0089\u008a\7\f\2\2\u008a\u008c\5\24\13\2")
        buf.write(u"\u008b\u0089\3\2\2\2\u008c\u008f\3\2\2\2\u008d\u008b")
        buf.write(u"\3\2\2\2\u008d\u008e\3\2\2\2\u008e\21\3\2\2\2\u008f\u008d")
        buf.write(u"\3\2\2\2\u0090\u00a7\7$\2\2\u0091\u00a7\7%\2\2\u0092")
        buf.write(u"\u00a7\7&\2\2\u0093\u00a7\7\'\2\2\u0094\u00a7\7(\2\2")
        buf.write(u"\u0095\u00a7\7)\2\2\u0096\u00a7\7*\2\2\u0097\u00a7\7")
        buf.write(u"+\2\2\u0098\u009c\7,\2\2\u0099\u009b\7\r\2\2\u009a\u0099")
        buf.write(u"\3\2\2\2\u009b\u009e\3\2\2\2\u009c\u009a\3\2\2\2\u009c")
        buf.write(u"\u009d\3\2\2\2\u009d\u00a7\3\2\2\2\u009e\u009c\3\2\2")
        buf.write(u"\2\u009f\u00a3\7-\2\2\u00a0\u00a2\7\r\2\2\u00a1\u00a0")
        buf.write(u"\3\2\2\2\u00a2\u00a5\3\2\2\2\u00a3\u00a1\3\2\2\2\u00a3")
        buf.write(u"\u00a4\3\2\2\2\u00a4\u00a7\3\2\2\2\u00a5\u00a3\3\2\2")
        buf.write(u"\2\u00a6\u0090\3\2\2\2\u00a6\u0091\3\2\2\2\u00a6\u0092")
        buf.write(u"\3\2\2\2\u00a6\u0093\3\2\2\2\u00a6\u0094\3\2\2\2\u00a6")
        buf.write(u"\u0095\3\2\2\2\u00a6\u0096\3\2\2\2\u00a6\u0097\3\2\2")
        buf.write(u"\2\u00a6\u0098\3\2\2\2\u00a6\u009f\3\2\2\2\u00a7\23\3")
        buf.write(u"\2\2\2\u00a8\u00ae\7\62\2\2\u00a9\u00aa\7\20\2\2\u00aa")
        buf.write(u"\u00ab\7.\2\2\u00ab\u00ac\7\f\2\2\u00ac\u00ad\7.\2\2")
        buf.write(u"\u00ad\u00af\7\21\2\2\u00ae\u00a9\3\2\2\2\u00ae\u00af")
        buf.write(u"\3\2\2\2\u00af\u00be\3\2\2\2\u00b0\u00b1\7\20\2\2\u00b1")
        buf.write(u"\u00b2\7.\2\2\u00b2\u00b3\7\22\2\2\u00b3\u00ba\7.\2\2")
        buf.write(u"\u00b4\u00b5\7\f\2\2\u00b5\u00b6\7.\2\2\u00b6\u00b7\7")
        buf.write(u"\22\2\2\u00b7\u00b9\7.\2\2\u00b8\u00b4\3\2\2\2\u00b9")
        buf.write(u"\u00bc\3\2\2\2\u00ba\u00b8\3\2\2\2\u00ba\u00bb\3\2\2")
        buf.write(u"\2\u00bb\u00bd\3\2\2\2\u00bc\u00ba\3\2\2\2\u00bd\u00bf")
        buf.write(u"\7\21\2\2\u00be\u00b0\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf")
        buf.write(u"\u00c3\3\2\2\2\u00c0\u00c1\7\20\2\2\u00c1\u00c2\7.\2")
        buf.write(u"\2\u00c2\u00c4\7\21\2\2\u00c3\u00c0\3\2\2\2\u00c3\u00c4")
        buf.write(u"\3\2\2\2\u00c4\u00c6\3\2\2\2\u00c5\u00c7\t\4\2\2\u00c6")
        buf.write(u"\u00c5\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7\u00cb\3\2\2")
        buf.write(u"\2\u00c8\u00ca\7\r\2\2\u00c9\u00c8\3\2\2\2\u00ca\u00cd")
        buf.write(u"\3\2\2\2\u00cb\u00c9\3\2\2\2\u00cb\u00cc\3\2\2\2\u00cc")
        buf.write(u"\u00d0\3\2\2\2\u00cd\u00cb\3\2\2\2\u00ce\u00cf\7\5\2")
        buf.write(u"\2\u00cf\u00d1\58\35\2\u00d0\u00ce\3\2\2\2\u00d0\u00d1")
        buf.write(u"\3\2\2\2\u00d1\25\3\2\2\2\u00d2\u00d3\7\20\2\2\u00d3")
        buf.write(u"\u00d4\7.\2\2\u00d4\u00d5\7\22\2\2\u00d5\u00dc\7.\2\2")
        buf.write(u"\u00d6\u00d7\7\f\2\2\u00d7\u00d8\7.\2\2\u00d8\u00d9\7")
        buf.write(u"\22\2\2\u00d9\u00db\7.\2\2\u00da\u00d6\3\2\2\2\u00db")
        buf.write(u"\u00de\3\2\2\2\u00dc\u00da\3\2\2\2\u00dc\u00dd\3\2\2")
        buf.write(u"\2\u00dd\u00df\3\2\2\2\u00de\u00dc\3\2\2\2\u00df\u00e0")
        buf.write(u"\7\21\2\2\u00e0\27\3\2\2\2\u00e1\u00e2\7\35\2\2\u00e2")
        buf.write(u"\u00e7\5\32\16\2\u00e3\u00e4\7\f\2\2\u00e4\u00e6\5\32")
        buf.write(u"\16\2\u00e5\u00e3\3\2\2\2\u00e6\u00e9\3\2\2\2\u00e7\u00e5")
        buf.write(u"\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\31\3\2\2\2\u00e9\u00e7")
        buf.write(u"\3\2\2\2\u00ea\u00eb\7\62\2\2\u00eb\u00ec\7\5\2\2\u00ec")
        buf.write(u"\u00ed\58\35\2\u00ed\33\3\2\2\2\u00ee\u00ef\7\36\2\2")
        buf.write(u"\u00ef\u00f3\7\62\2\2\u00f0\u00f1\7\16\2\2\u00f1\u00f2")
        buf.write(u"\7\62\2\2\u00f2\u00f4\7\17\2\2\u00f3\u00f0\3\2\2\2\u00f3")
        buf.write(u"\u00f4\3\2\2\2\u00f4\u00f7\3\2\2\2\u00f5\u00f6\7\f\2")
        buf.write(u"\2\u00f6\u00f8\58\35\2\u00f7\u00f5\3\2\2\2\u00f8\u00f9")
        buf.write(u"\3\2\2\2\u00f9\u00f7\3\2\2\2\u00f9\u00fa\3\2\2\2\u00fa")
        buf.write(u"\35\3\2\2\2\u00fb\u00fc\7\3\2\2\u00fc\u0101\58\35\2\u00fd")
        buf.write(u"\u00fe\t\5\2\2\u00fe\u0100\58\35\2\u00ff\u00fd\3\2\2")
        buf.write(u"\2\u0100\u0103\3\2\2\2\u0101\u00ff\3\2\2\2\u0101\u0102")
        buf.write(u"\3\2\2\2\u0102\u0104\3\2\2\2\u0103\u0101\3\2\2\2\u0104")
        buf.write(u"\u0105\7\4\2\2\u0105\37\3\2\2\2\u0106\u0107\7\62\2\2")
        buf.write(u"\u0107\u0108\7\62\2\2\u0108\u010a\7\5\2\2\u0109\u010b")
        buf.write(u"\t\6\2\2\u010a\u0109\3\2\2\2\u010a\u010b\3\2\2\2\u010b")
        buf.write(u"\u010f\3\2\2\2\u010c\u010f\7/\2\2\u010d\u010f\7.\2\2")
        buf.write(u"\u010e\u0106\3\2\2\2\u010e\u010c\3\2\2\2\u010e\u010d")
        buf.write(u"\3\2\2\2\u010f!\3\2\2\2\u0110\u0116\5&\24\2\u0111\u0116")
        buf.write(u"\5(\25\2\u0112\u0116\5.\30\2\u0113\u0116\5\62\32\2\u0114")
        buf.write(u"\u0116\5\64\33\2\u0115\u0110\3\2\2\2\u0115\u0111\3\2")
        buf.write(u"\2\2\u0115\u0112\3\2\2\2\u0115\u0113\3\2\2\2\u0115\u0114")
        buf.write(u"\3\2\2\2\u0116#\3\2\2\2\u0117\u0119\7\62\2\2\u0118\u011a")
        buf.write(u"\t\7\2\2\u0119\u0118\3\2\2\2\u0119\u011a\3\2\2\2\u011a")
        buf.write(u"%\3\2\2\2\u011b\u011c\7\"\2\2\u011c\u0121\7\62\2\2\u011d")
        buf.write(u"\u011e\7\f\2\2\u011e\u0120\7\62\2\2\u011f\u011d\3\2\2")
        buf.write(u"\2\u0120\u0123\3\2\2\2\u0121\u011f\3\2\2\2\u0121\u0122")
        buf.write(u"\3\2\2\2\u0122\'\3\2\2\2\u0123\u0121\3\2\2\2\u0124\u0125")
        buf.write(u"\7\37\2\2\u0125\u012a\5,\27\2\u0126\u0127\7\f\2\2\u0127")
        buf.write(u"\u0129\5,\27\2\u0128\u0126\3\2\2\2\u0129\u012c\3\2\2")
        buf.write(u"\2\u012a\u0128\3\2\2\2\u012a\u012b\3\2\2\2\u012b)\3\2")
        buf.write(u"\2\2\u012c\u012a\3\2\2\2\u012d\u012f\7\62\2\2\u012e\u0130")
        buf.write(u"\5\f\7\2\u012f\u012e\3\2\2\2\u012f\u0130\3\2\2\2\u0130")
        buf.write(u"+\3\2\2\2\u0131\u0132\5*\26\2\u0132\u0133\7\5\2\2\u0133")
        buf.write(u"\u0135\58\35\2\u0134\u0136\58\35\2\u0135\u0134\3\2\2")
        buf.write(u"\2\u0135\u0136\3\2\2\2\u0136-\3\2\2\2\u0137\u0138\7 ")
        buf.write(u"\2\2\u0138\u013d\5\60\31\2\u0139\u013a\7\f\2\2\u013a")
        buf.write(u"\u013c\5\60\31\2\u013b\u0139\3\2\2\2\u013c\u013f\3\2")
        buf.write(u"\2\2\u013d\u013b\3\2\2\2\u013d\u013e\3\2\2\2\u013e/\3")
        buf.write(u"\2\2\2\u013f\u013d\3\2\2\2\u0140\u0142\58\35\2\u0141")
        buf.write(u"\u0143\58\35\2\u0142\u0141\3\2\2\2\u0142\u0143\3\2\2")
        buf.write(u"\2\u0143\61\3\2\2\2\u0144\u0145\7\62\2\2\u0145\u0151")
        buf.write(u"\5\16\b\2\u0146\u0147\7\3\2\2\u0147\u014c\5 \21\2\u0148")
        buf.write(u"\u0149\7\f\2\2\u0149\u014b\5 \21\2\u014a\u0148\3\2\2")
        buf.write(u"\2\u014b\u014e\3\2\2\2\u014c\u014a\3\2\2\2\u014c\u014d")
        buf.write(u"\3\2\2\2\u014d\u014f\3\2\2\2\u014e\u014c\3\2\2\2\u014f")
        buf.write(u"\u0150\7\4\2\2\u0150\u0152\3\2\2\2\u0151\u0146\3\2\2")
        buf.write(u"\2\u0151\u0152\3\2\2\2\u0152\u0153\3\2\2\2\u0153\u0154")
        buf.write(u"\7\62\2\2\u0154\u0155\7\26\2\2\u0155\u0156\7\62\2\2\u0156")
        buf.write(u"\63\3\2\2\2\u0157\u0158\7!\2\2\u0158\u0159\7\62\2\2\u0159")
        buf.write(u"\u015a\7\26\2\2\u015a\u0165\7\62\2\2\u015b\u015c\7#\2")
        buf.write(u"\2\u015c\u0161\7\62\2\2\u015d\u015e\7\f\2\2\u015e\u0160")
        buf.write(u"\7\62\2\2\u015f\u015d\3\2\2\2\u0160\u0163\3\2\2\2\u0161")
        buf.write(u"\u015f\3\2\2\2\u0161\u0162\3\2\2\2\u0162\u0165\3\2\2")
        buf.write(u"\2\u0163\u0161\3\2\2\2\u0164\u0157\3\2\2\2\u0164\u015b")
        buf.write(u"\3\2\2\2\u0165\65\3\2\2\2\u0166\u0168\7\62\2\2\u0167")
        buf.write(u"\u0169\7\27\2\2\u0168\u0167\3\2\2\2\u0169\u016a\3\2\2")
        buf.write(u"\2\u016a\u0168\3\2\2\2\u016a\u016b\3\2\2\2\u016b\u016f")
        buf.write(u"\3\2\2\2\u016c\u016f\7\30\2\2\u016d\u016f\7\31\2\2\u016e")
        buf.write(u"\u0166\3\2\2\2\u016e\u016c\3\2\2\2\u016e\u016d\3\2\2")
        buf.write(u"\2\u016f\67\3\2\2\2\u0170\u0171\b\35\1\2\u0171\u019b")
        buf.write(u"\7\60\2\2\u0172\u0173\7\24\2\2\u0173\u019b\58\35\16\u0174")
        buf.write(u"\u019b\7/\2\2\u0175\u019b\7.\2\2\u0176\u017a\7\62\2\2")
        buf.write(u"\u0177\u0179\7\r\2\2\u0178\u0177\3\2\2\2\u0179\u017c")
        buf.write(u"\3\2\2\2\u017a\u0178\3\2\2\2\u017a\u017b\3\2\2\2\u017b")
        buf.write(u"\u019b\3\2\2\2\u017c\u017a\3\2\2\2\u017d\u019b\5\66\34")
        buf.write(u"\2\u017e\u017f\7\62\2\2\u017f\u0180\7\3\2\2\u0180\u0185")
        buf.write(u"\58\35\2\u0181\u0182\7\f\2\2\u0182\u0184\58\35\2\u0183")
        buf.write(u"\u0181\3\2\2\2\u0184\u0187\3\2\2\2\u0185\u0183\3\2\2")
        buf.write(u"\2\u0185\u0186\3\2\2\2\u0186\u0188\3\2\2\2\u0187\u0185")
        buf.write(u"\3\2\2\2\u0188\u0189\7\4\2\2\u0189\u019b\3\2\2\2\u018a")
        buf.write(u"\u019b\5\16\b\2\u018b\u019b\5\36\20\2\u018c\u018d\7\16")
        buf.write(u"\2\2\u018d\u018e\58\35\2\u018e\u018f\7\17\2\2\u018f\u019b")
        buf.write(u"\3\2\2\2\u0190\u0192\7\62\2\2\u0191\u0190\3\2\2\2\u0191")
        buf.write(u"\u0192\3\2\2\2\u0192\u0193\3\2\2\2\u0193\u0197\5\26\f")
        buf.write(u"\2\u0194\u0196\7\r\2\2\u0195\u0194\3\2\2\2\u0196\u0199")
        buf.write(u"\3\2\2\2\u0197\u0195\3\2\2\2\u0197\u0198\3\2\2\2\u0198")
        buf.write(u"\u019b\3\2\2\2\u0199\u0197\3\2\2\2\u019a\u0170\3\2\2")
        buf.write(u"\2\u019a\u0172\3\2\2\2\u019a\u0174\3\2\2\2\u019a\u0175")
        buf.write(u"\3\2\2\2\u019a\u0176\3\2\2\2\u019a\u017d\3\2\2\2\u019a")
        buf.write(u"\u017e\3\2\2\2\u019a\u018a\3\2\2\2\u019a\u018b\3\2\2")
        buf.write(u"\2\u019a\u018c\3\2\2\2\u019a\u0191\3\2\2\2\u019b\u01ad")
        buf.write(u"\3\2\2\2\u019c\u019d\f\22\2\2\u019d\u019e\7\32\2\2\u019e")
        buf.write(u"\u01ac\58\35\23\u019f\u01a0\f\21\2\2\u01a0\u01a1\t\b")
        buf.write(u"\2\2\u01a1\u01ac\58\35\22\u01a2\u01a3\f\20\2\2\u01a3")
        buf.write(u"\u01a4\t\4\2\2\u01a4\u01ac\58\35\21\u01a5\u01a6\f\5\2")
        buf.write(u"\2\u01a6\u01a7\7\5\2\2\u01a7\u01ac\58\35\6\u01a8\u01a9")
        buf.write(u"\f\4\2\2\u01a9\u01aa\7\22\2\2\u01aa\u01ac\58\35\5\u01ab")
        buf.write(u"\u019c\3\2\2\2\u01ab\u019f\3\2\2\2\u01ab\u01a2\3\2\2")
        buf.write(u"\2\u01ab\u01a5\3\2\2\2\u01ab\u01a8\3\2\2\2\u01ac\u01af")
        buf.write(u"\3\2\2\2\u01ad\u01ab\3\2\2\2\u01ad\u01ae\3\2\2\2\u01ae")
        buf.write(u"9\3\2\2\2\u01af\u01ad\3\2\2\2\64=FUZciru\177\u0082\u0085")
        buf.write(u"\u008d\u009c\u00a3\u00a6\u00ae\u00ba\u00be\u00c3\u00c6")
        buf.write(u"\u00cb\u00d0\u00dc\u00e7\u00f3\u00f9\u0101\u010a\u010e")
        buf.write(u"\u0115\u0119\u0121\u012a\u012f\u0135\u013d\u0142\u014c")
        buf.write(u"\u0151\u0161\u0164\u016a\u016e\u017a\u0185\u0191\u0197")
        buf.write(u"\u019a\u01ab\u01ad")
        return buf.getvalue()


class AutolevParser ( Parser ):

    grammarFileName = "Autolev.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ u"<INVALID>", u"'['", u"']'", u"'='", u"'+='", u"'-='", 
                     u"':='", u"'*='", u"'/='", u"'^='", u"','", u"'''", 
                     u"'('", u"')'", u"'{'", u"'}'", u"':'", u"'+'", u"'-'", 
                     u"';'", u"'.'", u"'>'", u"'0>'", u"'1>>'", u"'^'", 
                     u"'*'", u"'/'" ]

    symbolicNames = [ u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"Mass", 
                      u"Inertia", u"Input", u"Output", u"Save", u"UnitSystem", 
                      u"Encode", u"Newtonian", u"Frames", u"Bodies", u"Particles", 
                      u"Points", u"Constants", u"Specifieds", u"Imaginary", 
                      u"Variables", u"MotionVariables", u"INT", u"FLOAT", 
                      u"EXP", u"LINE_COMMENT", u"ID", u"WS" ]

    RULE_prog = 0
    RULE_stat = 1
    RULE_assignment = 2
    RULE_equals = 3
    RULE_index = 4
    RULE_diff = 5
    RULE_functionCall = 6
    RULE_varDecl = 7
    RULE_varType = 8
    RULE_varDecl2 = 9
    RULE_ranges = 10
    RULE_massDecl = 11
    RULE_massDecl2 = 12
    RULE_inertiaDecl = 13
    RULE_matrix = 14
    RULE_matrixInOutput = 15
    RULE_codeCommands = 16
    RULE_settings = 17
    RULE_units = 18
    RULE_inputs = 19
    RULE_id_diff = 20
    RULE_inputs2 = 21
    RULE_outputs = 22
    RULE_outputs2 = 23
    RULE_codegen = 24
    RULE_commands = 25
    RULE_vec = 26
    RULE_expr = 27

    ruleNames =  [ u"prog", u"stat", u"assignment", u"equals", u"index", 
                   u"diff", u"functionCall", u"varDecl", u"varType", u"varDecl2", 
                   u"ranges", u"massDecl", u"massDecl2", u"inertiaDecl", 
                   u"matrix", u"matrixInOutput", u"codeCommands", u"settings", 
                   u"units", u"inputs", u"id_diff", u"inputs2", u"outputs", 
                   u"outputs2", u"codegen", u"commands", u"vec", u"expr" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    T__19=20
    T__20=21
    T__21=22
    T__22=23
    T__23=24
    T__24=25
    T__25=26
    Mass=27
    Inertia=28
    Input=29
    Output=30
    Save=31
    UnitSystem=32
    Encode=33
    Newtonian=34
    Frames=35
    Bodies=36
    Particles=37
    Points=38
    Constants=39
    Specifieds=40
    Imaginary=41
    Variables=42
    MotionVariables=43
    INT=44
    FLOAT=45
    EXP=46
    LINE_COMMENT=47
    ID=48
    WS=49

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



    class ProgContext(ParserRuleContext):

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

        def stat(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(AutolevParser.StatContext)
            else:
                return self.getTypedRuleContext(AutolevParser.StatContext,i)


        def getRuleIndex(self):
            return AutolevParser.RULE_prog

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

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




    def prog(self):

        localctx = AutolevParser.ProgContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_prog)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 57 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 56
                self.stat()
                self.state = 59 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AutolevParser.T__21) | (1 << AutolevParser.T__22) | (1 << AutolevParser.Mass) | (1 << AutolevParser.Inertia) | (1 << AutolevParser.Input) | (1 << AutolevParser.Output) | (1 << AutolevParser.Save) | (1 << AutolevParser.UnitSystem) | (1 << AutolevParser.Encode) | (1 << AutolevParser.Newtonian) | (1 << AutolevParser.Frames) | (1 << AutolevParser.Bodies) | (1 << AutolevParser.Particles) | (1 << AutolevParser.Points) | (1 << AutolevParser.Constants) | (1 << AutolevParser.Specifieds) | (1 << AutolevParser.Imaginary) | (1 << AutolevParser.Variables) | (1 << AutolevParser.MotionVariables) | (1 << AutolevParser.ID))) != 0)):
                    break

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

    class StatContext(ParserRuleContext):

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

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


        def functionCall(self):
            return self.getTypedRuleContext(AutolevParser.FunctionCallContext,0)


        def codeCommands(self):
            return self.getTypedRuleContext(AutolevParser.CodeCommandsContext,0)


        def massDecl(self):
            return self.getTypedRuleContext(AutolevParser.MassDeclContext,0)


        def inertiaDecl(self):
            return self.getTypedRuleContext(AutolevParser.InertiaDeclContext,0)


        def assignment(self):
            return self.getTypedRuleContext(AutolevParser.AssignmentContext,0)


        def settings(self):
            return self.getTypedRuleContext(AutolevParser.SettingsContext,0)


        def getRuleIndex(self):
            return AutolevParser.RULE_stat

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

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




    def stat(self):

        localctx = AutolevParser.StatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_stat)
        try:
            self.state = 68
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,1,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 61
                self.varDecl()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 62
                self.functionCall()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 63
                self.codeCommands()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 64
                self.massDecl()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 65
                self.inertiaDecl()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 66
                self.assignment()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 67
                self.settings()
                pass


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

    class AssignmentContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return AutolevParser.RULE_assignment

     
        def copyFrom(self, ctx):
            super(AutolevParser.AssignmentContext, self).copyFrom(ctx)



    class VecAssignContext(AssignmentContext):

        def __init__(self, parser, ctx): # actually a AutolevParser.AssignmentContext)
            super(AutolevParser.VecAssignContext, self).__init__(parser)
            self.copyFrom(ctx)

        def vec(self):
            return self.getTypedRuleContext(AutolevParser.VecContext,0)

        def equals(self):
            return self.getTypedRuleContext(AutolevParser.EqualsContext,0)

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


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

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


    class RegularAssignContext(AssignmentContext):

        def __init__(self, parser, ctx): # actually a AutolevParser.AssignmentContext)
            super(AutolevParser.RegularAssignContext, self).__init__(parser)
            self.copyFrom(ctx)

        def ID(self):
            return self.getToken(AutolevParser.ID, 0)
        def equals(self):
            return self.getTypedRuleContext(AutolevParser.EqualsContext,0)

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

        def diff(self):
            return self.getTypedRuleContext(AutolevParser.DiffContext,0)


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

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


    class IndexAssignContext(AssignmentContext):

        def __init__(self, parser, ctx): # actually a AutolevParser.AssignmentContext)
            super(AutolevParser.IndexAssignContext, self).__init__(parser)
            self.copyFrom(ctx)

        def ID(self):
            return self.getToken(AutolevParser.ID, 0)
        def index(self):
            return self.getTypedRuleContext(AutolevParser.IndexContext,0)

        def equals(self):
            return self.getTypedRuleContext(AutolevParser.EqualsContext,0)

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


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

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



    def assignment(self):

        localctx = AutolevParser.AssignmentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_assignment)
        self._la = 0 # Token type
        try:
            self.state = 88
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                localctx = AutolevParser.VecAssignContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 70
                self.vec()
                self.state = 71
                self.equals()
                self.state = 72
                self.expr(0)
                pass

            elif la_ == 2:
                localctx = AutolevParser.IndexAssignContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 74
                self.match(AutolevParser.ID)
                self.state = 75
                self.match(AutolevParser.T__0)
                self.state = 76
                self.index()
                self.state = 77
                self.match(AutolevParser.T__1)
                self.state = 78
                self.equals()
                self.state = 79
                self.expr(0)
                pass

            elif la_ == 3:
                localctx = AutolevParser.RegularAssignContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 81
                self.match(AutolevParser.ID)
                self.state = 83
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AutolevParser.T__10:
                    self.state = 82
                    self.diff()


                self.state = 85
                self.equals()
                self.state = 86
                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 EqualsContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return AutolevParser.RULE_equals

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

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




    def equals(self):

        localctx = AutolevParser.EqualsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_equals)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 90
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AutolevParser.T__2) | (1 << AutolevParser.T__3) | (1 << AutolevParser.T__4) | (1 << AutolevParser.T__5) | (1 << AutolevParser.T__6) | (1 << AutolevParser.T__7) | (1 << AutolevParser.T__8))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class IndexContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return AutolevParser.RULE_index

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

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




    def index(self):

        localctx = AutolevParser.IndexContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_index)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 92
            self.expr(0)
            self.state = 97
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9:
                self.state = 93
                self.match(AutolevParser.T__9)
                self.state = 94
                self.expr(0)
                self.state = 99
                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 DiffContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return AutolevParser.RULE_diff

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

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




    def diff(self):

        localctx = AutolevParser.DiffContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_diff)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 101 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 100
                self.match(AutolevParser.T__10)
                self.state = 103 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==AutolevParser.T__10):
                    break

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

    class FunctionCallContext(ParserRuleContext):

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

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

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


        def Mass(self):
            return self.getToken(AutolevParser.Mass, 0)

        def Inertia(self):
            return self.getToken(AutolevParser.Inertia, 0)

        def getRuleIndex(self):
            return AutolevParser.RULE_functionCall

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

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




    def functionCall(self):

        localctx = AutolevParser.FunctionCallContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_functionCall)
        self._la = 0 # Token type
        try:
            self.state = 131
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AutolevParser.ID]:
                self.enterOuterAlt(localctx, 1)
                self.state = 105
                self.match(AutolevParser.ID)
                self.state = 106
                self.match(AutolevParser.T__11)
                self.state = 115
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AutolevParser.T__0) | (1 << AutolevParser.T__11) | (1 << AutolevParser.T__13) | (1 << AutolevParser.T__17) | (1 << AutolevParser.T__21) | (1 << AutolevParser.T__22) | (1 << AutolevParser.Mass) | (1 << AutolevParser.Inertia) | (1 << AutolevParser.INT) | (1 << AutolevParser.FLOAT) | (1 << AutolevParser.EXP) | (1 << AutolevParser.ID))) != 0):
                    self.state = 107
                    self.expr(0)
                    self.state = 112
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==AutolevParser.T__9:
                        self.state = 108
                        self.match(AutolevParser.T__9)
                        self.state = 109
                        self.expr(0)
                        self.state = 114
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)



                self.state = 117
                self.match(AutolevParser.T__12)
                pass
            elif token in [AutolevParser.Mass, AutolevParser.Inertia]:
                self.enterOuterAlt(localctx, 2)
                self.state = 118
                _la = self._input.LA(1)
                if not(_la==AutolevParser.Mass or _la==AutolevParser.Inertia):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 119
                self.match(AutolevParser.T__11)
                self.state = 128
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AutolevParser.ID:
                    self.state = 120
                    self.match(AutolevParser.ID)
                    self.state = 125
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==AutolevParser.T__9:
                        self.state = 121
                        self.match(AutolevParser.T__9)
                        self.state = 122
                        self.match(AutolevParser.ID)
                        self.state = 127
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)



                self.state = 130
                self.match(AutolevParser.T__12)
                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 VarDeclContext(ParserRuleContext):

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

        def varType(self):
            return self.getTypedRuleContext(AutolevParser.VarTypeContext,0)


        def varDecl2(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(AutolevParser.VarDecl2Context)
            else:
                return self.getTypedRuleContext(AutolevParser.VarDecl2Context,i)


        def getRuleIndex(self):
            return AutolevParser.RULE_varDecl

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

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




    def varDecl(self):

        localctx = AutolevParser.VarDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_varDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 133
            self.varType()
            self.state = 134
            self.varDecl2()
            self.state = 139
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9:
                self.state = 135
                self.match(AutolevParser.T__9)
                self.state = 136
                self.varDecl2()
                self.state = 141
                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 VarTypeContext(ParserRuleContext):

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

        def Newtonian(self):
            return self.getToken(AutolevParser.Newtonian, 0)

        def Frames(self):
            return self.getToken(AutolevParser.Frames, 0)

        def Bodies(self):
            return self.getToken(AutolevParser.Bodies, 0)

        def Particles(self):
            return self.getToken(AutolevParser.Particles, 0)

        def Points(self):
            return self.getToken(AutolevParser.Points, 0)

        def Constants(self):
            return self.getToken(AutolevParser.Constants, 0)

        def Specifieds(self):
            return self.getToken(AutolevParser.Specifieds, 0)

        def Imaginary(self):
            return self.getToken(AutolevParser.Imaginary, 0)

        def Variables(self):
            return self.getToken(AutolevParser.Variables, 0)

        def MotionVariables(self):
            return self.getToken(AutolevParser.MotionVariables, 0)

        def getRuleIndex(self):
            return AutolevParser.RULE_varType

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

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




    def varType(self):

        localctx = AutolevParser.VarTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_varType)
        self._la = 0 # Token type
        try:
            self.state = 164
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AutolevParser.Newtonian]:
                self.enterOuterAlt(localctx, 1)
                self.state = 142
                self.match(AutolevParser.Newtonian)
                pass
            elif token in [AutolevParser.Frames]:
                self.enterOuterAlt(localctx, 2)
                self.state = 143
                self.match(AutolevParser.Frames)
                pass
            elif token in [AutolevParser.Bodies]:
                self.enterOuterAlt(localctx, 3)
                self.state = 144
                self.match(AutolevParser.Bodies)
                pass
            elif token in [AutolevParser.Particles]:
                self.enterOuterAlt(localctx, 4)
                self.state = 145
                self.match(AutolevParser.Particles)
                pass
            elif token in [AutolevParser.Points]:
                self.enterOuterAlt(localctx, 5)
                self.state = 146
                self.match(AutolevParser.Points)
                pass
            elif token in [AutolevParser.Constants]:
                self.enterOuterAlt(localctx, 6)
                self.state = 147
                self.match(AutolevParser.Constants)
                pass
            elif token in [AutolevParser.Specifieds]:
                self.enterOuterAlt(localctx, 7)
                self.state = 148
                self.match(AutolevParser.Specifieds)
                pass
            elif token in [AutolevParser.Imaginary]:
                self.enterOuterAlt(localctx, 8)
                self.state = 149
                self.match(AutolevParser.Imaginary)
                pass
            elif token in [AutolevParser.Variables]:
                self.enterOuterAlt(localctx, 9)
                self.state = 150
                self.match(AutolevParser.Variables)
                self.state = 154
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==AutolevParser.T__10:
                    self.state = 151
                    self.match(AutolevParser.T__10)
                    self.state = 156
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [AutolevParser.MotionVariables]:
                self.enterOuterAlt(localctx, 10)
                self.state = 157
                self.match(AutolevParser.MotionVariables)
                self.state = 161
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==AutolevParser.T__10:
                    self.state = 158
                    self.match(AutolevParser.T__10)
                    self.state = 163
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            else:
                raise NoViableAltException(self)

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

    class VarDecl2Context(ParserRuleContext):

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

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

        def INT(self, i=None):
            if i is None:
                return self.getTokens(AutolevParser.INT)
            else:
                return self.getToken(AutolevParser.INT, i)

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


        def getRuleIndex(self):
            return AutolevParser.RULE_varDecl2

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

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




    def varDecl2(self):

        localctx = AutolevParser.VarDecl2Context(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_varDecl2)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 166
            self.match(AutolevParser.ID)
            self.state = 172
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,15,self._ctx)
            if la_ == 1:
                self.state = 167
                self.match(AutolevParser.T__13)
                self.state = 168
                self.match(AutolevParser.INT)
                self.state = 169
                self.match(AutolevParser.T__9)
                self.state = 170
                self.match(AutolevParser.INT)
                self.state = 171
                self.match(AutolevParser.T__14)


            self.state = 188
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
            if la_ == 1:
                self.state = 174
                self.match(AutolevParser.T__13)
                self.state = 175
                self.match(AutolevParser.INT)
                self.state = 176
                self.match(AutolevParser.T__15)
                self.state = 177
                self.match(AutolevParser.INT)
                self.state = 184
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==AutolevParser.T__9:
                    self.state = 178
                    self.match(AutolevParser.T__9)
                    self.state = 179
                    self.match(AutolevParser.INT)
                    self.state = 180
                    self.match(AutolevParser.T__15)
                    self.state = 181
                    self.match(AutolevParser.INT)
                    self.state = 186
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 187
                self.match(AutolevParser.T__14)


            self.state = 193
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AutolevParser.T__13:
                self.state = 190
                self.match(AutolevParser.T__13)
                self.state = 191
                self.match(AutolevParser.INT)
                self.state = 192
                self.match(AutolevParser.T__14)


            self.state = 196
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AutolevParser.T__16 or _la==AutolevParser.T__17:
                self.state = 195
                _la = self._input.LA(1)
                if not(_la==AutolevParser.T__16 or _la==AutolevParser.T__17):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 201
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__10:
                self.state = 198
                self.match(AutolevParser.T__10)
                self.state = 203
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 206
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AutolevParser.T__2:
                self.state = 204
                self.match(AutolevParser.T__2)
                self.state = 205
                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 RangesContext(ParserRuleContext):

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

        def INT(self, i=None):
            if i is None:
                return self.getTokens(AutolevParser.INT)
            else:
                return self.getToken(AutolevParser.INT, i)

        def getRuleIndex(self):
            return AutolevParser.RULE_ranges

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

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




    def ranges(self):

        localctx = AutolevParser.RangesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_ranges)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 208
            self.match(AutolevParser.T__13)
            self.state = 209
            self.match(AutolevParser.INT)
            self.state = 210
            self.match(AutolevParser.T__15)
            self.state = 211
            self.match(AutolevParser.INT)
            self.state = 218
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9:
                self.state = 212
                self.match(AutolevParser.T__9)
                self.state = 213
                self.match(AutolevParser.INT)
                self.state = 214
                self.match(AutolevParser.T__15)
                self.state = 215
                self.match(AutolevParser.INT)
                self.state = 220
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 221
            self.match(AutolevParser.T__14)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class MassDeclContext(ParserRuleContext):

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

        def Mass(self):
            return self.getToken(AutolevParser.Mass, 0)

        def massDecl2(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(AutolevParser.MassDecl2Context)
            else:
                return self.getTypedRuleContext(AutolevParser.MassDecl2Context,i)


        def getRuleIndex(self):
            return AutolevParser.RULE_massDecl

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

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




    def massDecl(self):

        localctx = AutolevParser.MassDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_massDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 223
            self.match(AutolevParser.Mass)
            self.state = 224
            self.massDecl2()
            self.state = 229
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9:
                self.state = 225
                self.match(AutolevParser.T__9)
                self.state = 226
                self.massDecl2()
                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 MassDecl2Context(ParserRuleContext):

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

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

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


        def getRuleIndex(self):
            return AutolevParser.RULE_massDecl2

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

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




    def massDecl2(self):

        localctx = AutolevParser.MassDecl2Context(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_massDecl2)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 232
            self.match(AutolevParser.ID)
            self.state = 233
            self.match(AutolevParser.T__2)
            self.state = 234
            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 InertiaDeclContext(ParserRuleContext):

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

        def Inertia(self):
            return self.getToken(AutolevParser.Inertia, 0)

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

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


        def getRuleIndex(self):
            return AutolevParser.RULE_inertiaDecl

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

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




    def inertiaDecl(self):

        localctx = AutolevParser.InertiaDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_inertiaDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 236
            self.match(AutolevParser.Inertia)
            self.state = 237
            self.match(AutolevParser.ID)
            self.state = 241
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AutolevParser.T__11:
                self.state = 238
                self.match(AutolevParser.T__11)
                self.state = 239
                self.match(AutolevParser.ID)
                self.state = 240
                self.match(AutolevParser.T__12)


            self.state = 245 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 243
                self.match(AutolevParser.T__9)
                self.state = 244
                self.expr(0)
                self.state = 247 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==AutolevParser.T__9):
                    break

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

    class MatrixContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return AutolevParser.RULE_matrix

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

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




    def matrix(self):

        localctx = AutolevParser.MatrixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_matrix)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 249
            self.match(AutolevParser.T__0)
            self.state = 250
            self.expr(0)
            self.state = 255
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9 or _la==AutolevParser.T__18:
                self.state = 251
                _la = self._input.LA(1)
                if not(_la==AutolevParser.T__9 or _la==AutolevParser.T__18):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 252
                self.expr(0)
                self.state = 257
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 258
            self.match(AutolevParser.T__1)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class MatrixInOutputContext(ParserRuleContext):

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

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

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

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

        def getRuleIndex(self):
            return AutolevParser.RULE_matrixInOutput

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

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




    def matrixInOutput(self):

        localctx = AutolevParser.MatrixInOutputContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_matrixInOutput)
        self._la = 0 # Token type
        try:
            self.state = 268
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AutolevParser.ID]:
                self.enterOuterAlt(localctx, 1)
                self.state = 260
                self.match(AutolevParser.ID)

                self.state = 261
                self.match(AutolevParser.ID)
                self.state = 262
                self.match(AutolevParser.T__2)
                self.state = 264
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AutolevParser.INT or _la==AutolevParser.FLOAT:
                    self.state = 263
                    _la = self._input.LA(1)
                    if not(_la==AutolevParser.INT or _la==AutolevParser.FLOAT):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()


                pass
            elif token in [AutolevParser.FLOAT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 266
                self.match(AutolevParser.FLOAT)
                pass
            elif token in [AutolevParser.INT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 267
                self.match(AutolevParser.INT)
                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 CodeCommandsContext(ParserRuleContext):

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

        def units(self):
            return self.getTypedRuleContext(AutolevParser.UnitsContext,0)


        def inputs(self):
            return self.getTypedRuleContext(AutolevParser.InputsContext,0)


        def outputs(self):
            return self.getTypedRuleContext(AutolevParser.OutputsContext,0)


        def codegen(self):
            return self.getTypedRuleContext(AutolevParser.CodegenContext,0)


        def commands(self):
            return self.getTypedRuleContext(AutolevParser.CommandsContext,0)


        def getRuleIndex(self):
            return AutolevParser.RULE_codeCommands

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

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




    def codeCommands(self):

        localctx = AutolevParser.CodeCommandsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_codeCommands)
        try:
            self.state = 275
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AutolevParser.UnitSystem]:
                self.enterOuterAlt(localctx, 1)
                self.state = 270
                self.units()
                pass
            elif token in [AutolevParser.Input]:
                self.enterOuterAlt(localctx, 2)
                self.state = 271
                self.inputs()
                pass
            elif token in [AutolevParser.Output]:
                self.enterOuterAlt(localctx, 3)
                self.state = 272
                self.outputs()
                pass
            elif token in [AutolevParser.ID]:
                self.enterOuterAlt(localctx, 4)
                self.state = 273
                self.codegen()
                pass
            elif token in [AutolevParser.Save, AutolevParser.Encode]:
                self.enterOuterAlt(localctx, 5)
                self.state = 274
                self.commands()
                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 SettingsContext(ParserRuleContext):

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

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

        def EXP(self):
            return self.getToken(AutolevParser.EXP, 0)

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

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

        def getRuleIndex(self):
            return AutolevParser.RULE_settings

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

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




    def settings(self):

        localctx = AutolevParser.SettingsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_settings)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 277
            self.match(AutolevParser.ID)
            self.state = 279
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,30,self._ctx)
            if la_ == 1:
                self.state = 278
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << AutolevParser.INT) | (1 << AutolevParser.FLOAT) | (1 << AutolevParser.EXP) | (1 << AutolevParser.ID))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


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

    class UnitsContext(ParserRuleContext):

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

        def UnitSystem(self):
            return self.getToken(AutolevParser.UnitSystem, 0)

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

        def getRuleIndex(self):
            return AutolevParser.RULE_units

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

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




    def units(self):

        localctx = AutolevParser.UnitsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_units)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 281
            self.match(AutolevParser.UnitSystem)
            self.state = 282
            self.match(AutolevParser.ID)
            self.state = 287
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9:
                self.state = 283
                self.match(AutolevParser.T__9)
                self.state = 284
                self.match(AutolevParser.ID)
                self.state = 289
                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 InputsContext(ParserRuleContext):

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

        def Input(self):
            return self.getToken(AutolevParser.Input, 0)

        def inputs2(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(AutolevParser.Inputs2Context)
            else:
                return self.getTypedRuleContext(AutolevParser.Inputs2Context,i)


        def getRuleIndex(self):
            return AutolevParser.RULE_inputs

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

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




    def inputs(self):

        localctx = AutolevParser.InputsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_inputs)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 290
            self.match(AutolevParser.Input)
            self.state = 291
            self.inputs2()
            self.state = 296
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9:
                self.state = 292
                self.match(AutolevParser.T__9)
                self.state = 293
                self.inputs2()
                self.state = 298
                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 Id_diffContext(ParserRuleContext):

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

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

        def diff(self):
            return self.getTypedRuleContext(AutolevParser.DiffContext,0)


        def getRuleIndex(self):
            return AutolevParser.RULE_id_diff

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

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




    def id_diff(self):

        localctx = AutolevParser.Id_diffContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_id_diff)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 299
            self.match(AutolevParser.ID)
            self.state = 301
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AutolevParser.T__10:
                self.state = 300
                self.diff()


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

    class Inputs2Context(ParserRuleContext):

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

        def id_diff(self):
            return self.getTypedRuleContext(AutolevParser.Id_diffContext,0)


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


        def getRuleIndex(self):
            return AutolevParser.RULE_inputs2

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

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




    def inputs2(self):

        localctx = AutolevParser.Inputs2Context(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_inputs2)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 303
            self.id_diff()
            self.state = 304
            self.match(AutolevParser.T__2)
            self.state = 305
            self.expr(0)
            self.state = 307
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,34,self._ctx)
            if la_ == 1:
                self.state = 306
                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 OutputsContext(ParserRuleContext):

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

        def Output(self):
            return self.getToken(AutolevParser.Output, 0)

        def outputs2(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(AutolevParser.Outputs2Context)
            else:
                return self.getTypedRuleContext(AutolevParser.Outputs2Context,i)


        def getRuleIndex(self):
            return AutolevParser.RULE_outputs

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

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




    def outputs(self):

        localctx = AutolevParser.OutputsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_outputs)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 309
            self.match(AutolevParser.Output)
            self.state = 310
            self.outputs2()
            self.state = 315
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==AutolevParser.T__9:
                self.state = 311
                self.match(AutolevParser.T__9)
                self.state = 312
                self.outputs2()
                self.state = 317
                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 Outputs2Context(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return AutolevParser.RULE_outputs2

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

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




    def outputs2(self):

        localctx = AutolevParser.Outputs2Context(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_outputs2)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 318
            self.expr(0)
            self.state = 320
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,36,self._ctx)
            if la_ == 1:
                self.state = 319
                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 CodegenContext(ParserRuleContext):

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

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

        def functionCall(self):
            return self.getTypedRuleContext(AutolevParser.FunctionCallContext,0)


        def matrixInOutput(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(AutolevParser.MatrixInOutputContext)
            else:
                return self.getTypedRuleContext(AutolevParser.MatrixInOutputContext,i)


        def getRuleIndex(self):
            return AutolevParser.RULE_codegen

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

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




    def codegen(self):

        localctx = AutolevParser.CodegenContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_codegen)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 322
            self.match(AutolevParser.ID)
            self.state = 323
            self.functionCall()
            self.state = 335
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==AutolevParser.T__0:
                self.state = 324
                self.match(AutolevParser.T__0)
                self.state = 325
                self.matrixInOutput()
                self.state = 330
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==AutolevParser.T__9:
                    self.state = 326
                    self.match(AutolevParser.T__9)
                    self.state = 327
                    self.matrixInOutput()
                    self.state = 332
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 333
                self.match(AutolevParser.T__1)


            self.state = 337
            self.match(AutolevParser.ID)
            self.state = 338
            self.match(AutolevParser.T__19)
            self.state = 339
            self.match(AutolevParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class CommandsContext(ParserRuleContext):

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

        def Save(self):
            return self.getToken(AutolevParser.Save, 0)

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

        def Encode(self):
            return self.getToken(AutolevParser.Encode, 0)

        def getRuleIndex(self):
            return AutolevParser.RULE_commands

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

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




    def commands(self):

        localctx = AutolevParser.CommandsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_commands)
        self._la = 0 # Token type
        try:
            self.state = 354
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AutolevParser.Save]:
                self.enterOuterAlt(localctx, 1)
                self.state = 341
                self.match(AutolevParser.Save)
                self.state = 342
                self.match(AutolevParser.ID)
                self.state = 343
                self.match(AutolevParser.T__19)
                self.state = 344
                self.match(AutolevParser.ID)
                pass
            elif token in [AutolevParser.Encode]:
                self.enterOuterAlt(localctx, 2)
                self.state = 345
                self.match(AutolevParser.Encode)
                self.state = 346
                self.match(AutolevParser.ID)
                self.state = 351
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==AutolevParser.T__9:
                    self.state = 347
                    self.match(AutolevParser.T__9)
                    self.state = 348
                    self.match(AutolevParser.ID)
                    self.state = 353
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            else:
                raise NoViableAltException(self)

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

    class VecContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return AutolevParser.RULE_vec

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

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




    def vec(self):

        localctx = AutolevParser.VecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_vec)
        try:
            self.state = 364
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [AutolevParser.ID]:
                self.enterOuterAlt(localctx, 1)
                self.state = 356
                self.match(AutolevParser.ID)
                self.state = 358 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 357
                        self.match(AutolevParser.T__20)

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

                pass
            elif token in [AutolevParser.T__21]:
                self.enterOuterAlt(localctx, 2)
                self.state = 362
                self.match(AutolevParser.T__21)
                pass
            elif token in [AutolevParser.T__22]:
                self.enterOuterAlt(localctx, 3)
                self.state = 363
                self.match(AutolevParser.T__22)
                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=None, invokingState=-1):
            super(AutolevParser.ExprContext, self).__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return AutolevParser.RULE_expr

     
        def copyFrom(self, ctx):
            super(AutolevParser.ExprContext, self).copyFrom(ctx)


    class ParensContext(ExprContext):

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

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


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

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


    class VectorOrDyadicContext(ExprContext):

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

        def vec(self):
            return self.getTypedRuleContext(AutolevParser.VecContext,0)


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

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


    class ExponentContext(ExprContext):

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

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


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

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


    class MulDivContext(ExprContext):

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

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


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

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


    class AddSubContext(ExprContext):

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

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


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

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


    class FloatContext(ExprContext):

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

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

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

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


    class IntContext(ExprContext):

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

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

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

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


    class IdEqualsExprContext(ExprContext):

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

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


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

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


    class NegativeOneContext(ExprContext):

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

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


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

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


    class FunctionContext(ExprContext):

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

        def functionCall(self):
            return self.getTypedRuleContext(AutolevParser.FunctionCallContext,0)


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

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


    class RangessContext(ExprContext):

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

        def ranges(self):
            return self.getTypedRuleContext(AutolevParser.RangesContext,0)

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

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

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


    class ColonContext(ExprContext):

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

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


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

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


    class IdContext(ExprContext):

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

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

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

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


    class ExpContext(ExprContext):

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

        def EXP(self):
            return self.getToken(AutolevParser.EXP, 0)

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

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


    class MatricesContext(ExprContext):

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

        def matrix(self):
            return self.getTypedRuleContext(AutolevParser.MatrixContext,0)


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

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


    class IndexingContext(ExprContext):

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

        def ID(self):
            return self.getToken(AutolevParser.ID, 0)
        def expr(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(AutolevParser.ExprContext)
            else:
                return self.getTypedRuleContext(AutolevParser.ExprContext,i)


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

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



    def expr(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = AutolevParser.ExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 54
        self.enterRecursionRule(localctx, 54, self.RULE_expr, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 408
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,47,self._ctx)
            if la_ == 1:
                localctx = AutolevParser.ExpContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 367
                self.match(AutolevParser.EXP)
                pass

            elif la_ == 2:
                localctx = AutolevParser.NegativeOneContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 368
                self.match(AutolevParser.T__17)
                self.state = 369
                self.expr(12)
                pass

            elif la_ == 3:
                localctx = AutolevParser.FloatContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 370
                self.match(AutolevParser.FLOAT)
                pass

            elif la_ == 4:
                localctx = AutolevParser.IntContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 371
                self.match(AutolevParser.INT)
                pass

            elif la_ == 5:
                localctx = AutolevParser.IdContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 372
                self.match(AutolevParser.ID)
                self.state = 376
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,43,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 373
                        self.match(AutolevParser.T__10) 
                    self.state = 378
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,43,self._ctx)

                pass

            elif la_ == 6:
                localctx = AutolevParser.VectorOrDyadicContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 379
                self.vec()
                pass

            elif la_ == 7:
                localctx = AutolevParser.IndexingContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 380
                self.match(AutolevParser.ID)
                self.state = 381
                self.match(AutolevParser.T__0)
                self.state = 382
                self.expr(0)
                self.state = 387
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==AutolevParser.T__9:
                    self.state = 383
                    self.match(AutolevParser.T__9)
                    self.state = 384
                    self.expr(0)
                    self.state = 389
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 390
                self.match(AutolevParser.T__1)
                pass

            elif la_ == 8:
                localctx = AutolevParser.FunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 392
                self.functionCall()
                pass

            elif la_ == 9:
                localctx = AutolevParser.MatricesContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 393
                self.matrix()
                pass

            elif la_ == 10:
                localctx = AutolevParser.ParensContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 394
                self.match(AutolevParser.T__11)
                self.state = 395
                self.expr(0)
                self.state = 396
                self.match(AutolevParser.T__12)
                pass

            elif la_ == 11:
                localctx = AutolevParser.RangessContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 399
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==AutolevParser.ID:
                    self.state = 398
                    self.match(AutolevParser.ID)


                self.state = 401
                self.ranges()
                self.state = 405
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,46,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 402
                        self.match(AutolevParser.T__10) 
                    self.state = 407
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,46,self._ctx)

                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 427
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,49,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 425
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,48,self._ctx)
                    if la_ == 1:
                        localctx = AutolevParser.ExponentContext(self, AutolevParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 410
                        if not self.precpred(self._ctx, 16):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 16)")
                        self.state = 411
                        self.match(AutolevParser.T__23)
                        self.state = 412
                        self.expr(17)
                        pass

                    elif la_ == 2:
                        localctx = AutolevParser.MulDivContext(self, AutolevParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 413
                        if not self.precpred(self._ctx, 15):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 15)")
                        self.state = 414
                        _la = self._input.LA(1)
                        if not(_la==AutolevParser.T__24 or _la==AutolevParser.T__25):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 415
                        self.expr(16)
                        pass

                    elif la_ == 3:
                        localctx = AutolevParser.AddSubContext(self, AutolevParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 416
                        if not self.precpred(self._ctx, 14):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 14)")
                        self.state = 417
                        _la = self._input.LA(1)
                        if not(_la==AutolevParser.T__16 or _la==AutolevParser.T__17):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 418
                        self.expr(15)
                        pass

                    elif la_ == 4:
                        localctx = AutolevParser.IdEqualsExprContext(self, AutolevParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 419
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 420
                        self.match(AutolevParser.T__2)
                        self.state = 421
                        self.expr(4)
                        pass

                    elif la_ == 5:
                        localctx = AutolevParser.ColonContext(self, AutolevParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 422
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 423
                        self.match(AutolevParser.T__15)
                        self.state = 424
                        self.expr(3)
                        pass

             
                self.state = 429
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,49,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



    def sempred(self, localctx, ruleIndex, predIndex):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[27] = self.expr_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, predIndex):
            if predIndex == 0:
                return self.precpred(self._ctx, 16)
         

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

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

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

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




