# Generated from Modelica.g4 by ANTLR 4.5.1
# encoding: utf-8
from __future__ import print_function
from antlr4 import *
from io import StringIO

def serializedATN():
    with StringIO() as buf:
        buf.write(u"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3")
        buf.write(u"^\u03f1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t")
        buf.write(u"\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r")
        buf.write(u"\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4")
        buf.write(u"\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30")
        buf.write(u"\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t")
        buf.write(u"\35\4\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$")
        buf.write(u"\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t")
        buf.write(u",\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63")
        buf.write(u"\t\63\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\4")
        buf.write(u"9\t9\4:\t:\4;\t;\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA")
        buf.write(u"\4B\tB\4C\tC\4D\tD\4E\tE\3\2\3\2\5\2\u008d\n\2\3\2\5")
        buf.write(u"\2\u0090\n\2\3\2\5\2\u0093\n\2\3\2\3\2\3\2\7\2\u0098")
        buf.write(u"\n\2\f\2\16\2\u009b\13\2\3\3\5\3\u009e\n\3\3\3\3\3\3")
        buf.write(u"\3\3\4\5\4\u00a4\n\4\3\4\3\4\3\4\5\4\u00a9\n\4\3\4\3")
        buf.write(u"\4\3\4\5\4\u00ae\n\4\3\4\3\4\3\4\3\4\5\4\u00b4\n\4\3")
        buf.write(u"\4\5\4\u00b7\n\4\3\4\3\4\5\4\u00bb\n\4\3\5\3\5\3\5\3")
        buf.write(u"\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u00c8\n\5\3\5\5\5")
        buf.write(u"\u00cb\n\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u00d4\n\5")
        buf.write(u"\3\5\5\5\u00d7\n\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3")
        buf.write(u"\5\3\5\3\5\7\5\u00e4\n\5\f\5\16\5\u00e7\13\5\3\5\3\5")
        buf.write(u"\3\5\3\5\3\5\3\5\5\5\u00ef\n\5\3\5\3\5\3\5\3\5\3\5\5")
        buf.write(u"\5\u00f6\n\5\3\6\3\6\3\7\3\7\3\7\7\7\u00fd\n\7\f\7\16")
        buf.write(u"\7\u0100\13\7\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t")
        buf.write(u"\7\t\u010c\n\t\f\t\16\t\u010f\13\t\3\t\3\t\5\t\u0113")
        buf.write(u"\n\t\3\t\5\t\u0116\n\t\3\t\5\t\u0119\n\t\3\t\5\t\u011c")
        buf.write(u"\n\t\3\t\3\t\3\t\5\t\u0121\n\t\3\n\3\n\3\13\3\13\3\13")
        buf.write(u"\5\13\u0128\n\13\3\13\3\13\3\13\5\13\u012d\n\13\3\13")
        buf.write(u"\3\13\3\f\3\f\3\f\7\f\u0134\n\f\f\f\16\f\u0137\13\f\3")
        buf.write(u"\r\3\r\3\r\5\r\u013c\n\r\3\r\5\r\u013f\n\r\3\r\5\r\u0142")
        buf.write(u"\n\r\3\r\5\r\u0145\n\r\3\r\3\r\5\r\u0149\n\r\3\r\3\r")
        buf.write(u"\3\r\5\r\u014e\n\r\3\r\3\r\3\r\5\r\u0153\n\r\5\r\u0155")
        buf.write(u"\n\r\5\r\u0157\n\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16")
        buf.write(u"\3\16\3\16\3\16\3\16\5\16\u0164\n\16\5\16\u0166\n\16")
        buf.write(u"\5\16\u0168\n\16\3\16\3\16\3\17\3\17\3\17\7\17\u016f")
        buf.write(u"\n\17\f\17\16\17\u0172\13\17\3\20\3\20\3\20\5\20\u0177")
        buf.write(u"\n\20\3\20\5\20\u017a\n\20\3\21\3\21\3\21\5\21\u017f")
        buf.write(u"\n\21\3\22\3\22\3\22\5\22\u0184\n\22\3\22\3\22\3\23\5")
        buf.write(u"\23\u0189\n\23\3\23\5\23\u018c\n\23\3\23\5\23\u018f\n")
        buf.write(u"\23\3\24\3\24\3\25\3\25\3\25\7\25\u0196\n\25\f\25\16")
        buf.write(u"\25\u0199\13\25\3\26\3\26\5\26\u019d\n\26\3\26\3\26\3")
        buf.write(u"\27\3\27\3\27\3\30\3\30\5\30\u01a6\n\30\3\30\5\30\u01a9")
        buf.write(u"\n\30\3\31\3\31\3\31\5\31\u01ae\n\31\3\31\3\31\3\31\3")
        buf.write(u"\31\5\31\u01b4\n\31\3\32\3\32\5\32\u01b8\n\32\3\32\3")
        buf.write(u"\32\3\33\3\33\3\33\7\33\u01bf\n\33\f\33\16\33\u01c2\13")
        buf.write(u"\33\3\34\3\34\5\34\u01c6\n\34\3\35\5\35\u01c9\n\35\3")
        buf.write(u"\35\5\35\u01cc\n\35\3\35\3\35\5\35\u01d0\n\35\3\36\3")
        buf.write(u"\36\5\36\u01d4\n\36\3\36\3\36\3\37\3\37\5\37\u01da\n")
        buf.write(u"\37\3\37\5\37\u01dd\n\37\3\37\3\37\5\37\u01e1\n\37\3")
        buf.write(u"\37\5\37\u01e4\n\37\3 \3 \3 \5 \u01e9\n \3 \5 \u01ec")
        buf.write(u"\n \3!\3!\3!\3!\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\5#\u01fb")
        buf.write(u"\n#\3#\5#\u01fe\n#\3#\3#\3#\3#\3#\5#\u0205\n#\3#\5#\u0208")
        buf.write(u"\n#\3#\3#\5#\u020c\n#\3$\5$\u020f\n$\3$\3$\3$\3$\7$\u0215")
        buf.write(u"\n$\f$\16$\u0218\13$\3%\5%\u021b\n%\3%\3%\3%\3%\7%\u0221")
        buf.write(u"\n%\f%\16%\u0224\13%\3&\3&\3&\3&\3&\3&\3&\3&\3&\3&\3")
        buf.write(u"&\5&\u0231\n&\3\'\3\'\3\'\3(\3(\3(\3(\5(\u023a\n(\3(")
        buf.write(u"\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\5(\u0249\n(\3)\3")
        buf.write(u")\3)\3*\3*\3*\3*\3*\3*\7*\u0254\n*\f*\16*\u0257\13*\3")
        buf.write(u"*\3*\3*\3*\3*\3*\7*\u025f\n*\f*\16*\u0262\13*\7*\u0264")
        buf.write(u"\n*\f*\16*\u0267\13*\3*\3*\3*\3*\7*\u026d\n*\f*\16*\u0270")
        buf.write(u"\13*\5*\u0272\n*\3*\3*\3*\3+\3+\3+\3+\3+\3+\7+\u027d")
        buf.write(u"\n+\f+\16+\u0280\13+\3+\3+\3+\3+\3+\3+\7+\u0288\n+\f")
        buf.write(u"+\16+\u028b\13+\7+\u028d\n+\f+\16+\u0290\13+\3+\3+\3")
        buf.write(u"+\3+\7+\u0296\n+\f+\16+\u0299\13+\5+\u029b\n+\3+\3+\3")
        buf.write(u"+\3,\3,\3,\3,\3,\3,\7,\u02a6\n,\f,\16,\u02a9\13,\3,\3")
        buf.write(u",\3,\3-\3-\3-\3-\3-\3-\7-\u02b4\n-\f-\16-\u02b7\13-\3")
        buf.write(u"-\3-\3-\3.\3.\3.\7.\u02bf\n.\f.\16.\u02c2\13.\3/\3/\3")
        buf.write(u"/\5/\u02c7\n/\3\60\3\60\3\60\3\60\3\60\3\60\7\60\u02cf")
        buf.write(u"\n\60\f\60\16\60\u02d2\13\60\3\60\3\60\3\60\3\61\3\61")
        buf.write(u"\3\61\3\61\3\61\3\61\7\61\u02dd\n\61\f\61\16\61\u02e0")
        buf.write(u"\13\61\3\61\3\61\3\61\3\61\3\61\3\61\7\61\u02e8\n\61")
        buf.write(u"\f\61\16\61\u02eb\13\61\7\61\u02ed\n\61\f\61\16\61\u02f0")
        buf.write(u"\13\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62\3\62\7")
        buf.write(u"\62\u02fb\n\62\f\62\16\62\u02fe\13\62\3\62\3\62\3\62")
        buf.write(u"\3\62\3\62\3\62\7\62\u0306\n\62\f\62\16\62\u0309\13\62")
        buf.write(u"\7\62\u030b\n\62\f\62\16\62\u030e\13\62\3\62\3\62\3\62")
        buf.write(u"\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3")
        buf.write(u"\64\3\64\3\64\3\64\3\64\3\64\3\64\7\64\u0324\n\64\f\64")
        buf.write(u"\16\64\u0327\13\64\3\64\3\64\3\64\5\64\u032c\n\64\3\65")
        buf.write(u"\3\65\3\65\3\65\3\65\5\65\u0333\n\65\5\65\u0335\n\65")
        buf.write(u"\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\5")
        buf.write(u"\66\u0341\n\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66")
        buf.write(u"\3\66\3\66\3\66\3\66\3\66\3\66\3\66\7\66\u0352\n\66\f")
        buf.write(u"\66\16\66\u0355\13\66\3\67\3\67\3\67\3\67\3\67\3\67\3")
        buf.write(u"\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67")
        buf.write(u"\3\67\3\67\3\67\7\67\u036b\n\67\f\67\16\67\u036e\13\67")
        buf.write(u"\3\67\3\67\3\67\3\67\3\67\3\67\3\67\5\67\u0377\n\67\3")
        buf.write(u"8\58\u037a\n8\38\38\38\78\u037f\n8\f8\168\u0382\138\3")
        buf.write(u"9\59\u0385\n9\39\39\59\u0389\n9\39\39\39\59\u038e\n9")
        buf.write(u"\79\u0390\n9\f9\169\u0393\139\3:\3:\5:\u0397\n:\3:\3")
        buf.write(u":\3;\3;\3;\3;\3;\7;\u03a0\n;\f;\16;\u03a3\13;\3;\5;\u03a6")
        buf.write(u"\n;\3<\3<\3<\7<\u03ab\n<\f<\16<\u03ae\13<\3=\3=\3=\3")
        buf.write(u"=\3>\3>\3>\3>\5>\u03b8\n>\3>\3>\3>\5>\u03bd\n>\3?\5?")
        buf.write(u"\u03c0\n?\3?\3?\7?\u03c4\n?\f?\16?\u03c7\13?\3@\3@\3")
        buf.write(u"@\7@\u03cc\n@\f@\16@\u03cf\13@\3A\3A\3A\3A\7A\u03d5\n")
        buf.write(u"A\fA\16A\u03d8\13A\3A\3A\3B\3B\5B\u03de\nB\3C\3C\5C\u03e2")
        buf.write(u"\nC\3D\3D\3D\7D\u03e7\nD\fD\16D\u03ea\13D\5D\u03ec\n")
        buf.write(u"D\3E\3E\3E\3E\2\3jF\2\4\6\b\n\f\16\20\22\24\26\30\32")
        buf.write(u"\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdf")
        buf.write(u"hjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\2\n\3\2\21")
        buf.write(u"\22\3\2*+\3\2,.\3\2/\60\3\2DE\4\2&&FH\4\2CCIK\3\2LQ\u0456")
        buf.write(u"\2\u008f\3\2\2\2\4\u009d\3\2\2\2\6\u00a3\3\2\2\2\b\u00f5")
        buf.write(u"\3\2\2\2\n\u00f7\3\2\2\2\f\u00f9\3\2\2\2\16\u0101\3\2")
        buf.write(u"\2\2\20\u0104\3\2\2\2\22\u0122\3\2\2\2\24\u0127\3\2\2")
        buf.write(u"\2\26\u0135\3\2\2\2\30\u0156\3\2\2\2\32\u0158\3\2\2\2")
        buf.write(u"\34\u016b\3\2\2\2\36\u0173\3\2\2\2 \u017b\3\2\2\2\"\u0180")
        buf.write(u"\3\2\2\2$\u0188\3\2\2\2&\u0190\3\2\2\2(\u0192\3\2\2\2")
        buf.write(u"*\u019a\3\2\2\2,\u01a0\3\2\2\2.\u01a3\3\2\2\2\60\u01b3")
        buf.write(u"\3\2\2\2\62\u01b5\3\2\2\2\64\u01bb\3\2\2\2\66\u01c5\3")
        buf.write(u"\2\2\28\u01c8\3\2\2\2:\u01d1\3\2\2\2<\u01d7\3\2\2\2>")
        buf.write(u"\u01e5\3\2\2\2@\u01ed\3\2\2\2B\u01f1\3\2\2\2D\u01f4\3")
        buf.write(u"\2\2\2F\u020e\3\2\2\2H\u021a\3\2\2\2J\u0230\3\2\2\2L")
        buf.write(u"\u0232\3\2\2\2N\u0248\3\2\2\2P\u024a\3\2\2\2R\u024d\3")
        buf.write(u"\2\2\2T\u0276\3\2\2\2V\u029f\3\2\2\2X\u02ad\3\2\2\2Z")
        buf.write(u"\u02bb\3\2\2\2\\\u02c3\3\2\2\2^\u02c8\3\2\2\2`\u02d6")
        buf.write(u"\3\2\2\2b\u02f4\3\2\2\2d\u0312\3\2\2\2f\u032b\3\2\2\2")
        buf.write(u"h\u032d\3\2\2\2j\u0340\3\2\2\2l\u0376\3\2\2\2n\u0379")
        buf.write(u"\3\2\2\2p\u0384\3\2\2\2r\u0394\3\2\2\2t\u03a5\3\2\2\2")
        buf.write(u"v\u03a7\3\2\2\2x\u03af\3\2\2\2z\u03bc\3\2\2\2|\u03bf")
        buf.write(u"\3\2\2\2~\u03c8\3\2\2\2\u0080\u03d0\3\2\2\2\u0082\u03dd")
        buf.write(u"\3\2\2\2\u0084\u03df\3\2\2\2\u0086\u03eb\3\2\2\2\u0088")
        buf.write(u"\u03ed\3\2\2\2\u008a\u008c\7\3\2\2\u008b\u008d\5n8\2")
        buf.write(u"\u008c\u008b\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008e")
        buf.write(u"\3\2\2\2\u008e\u0090\7\4\2\2\u008f\u008a\3\2\2\2\u008f")
        buf.write(u"\u0090\3\2\2\2\u0090\u0099\3\2\2\2\u0091\u0093\7\5\2")
        buf.write(u"\2\u0092\u0091\3\2\2\2\u0092\u0093\3\2\2\2\u0093\u0094")
        buf.write(u"\3\2\2\2\u0094\u0095\5\4\3\2\u0095\u0096\7\4\2\2\u0096")
        buf.write(u"\u0098\3\2\2\2\u0097\u0092\3\2\2\2\u0098\u009b\3\2\2")
        buf.write(u"\2\u0099\u0097\3\2\2\2\u0099\u009a\3\2\2\2\u009a\3\3")
        buf.write(u"\2\2\2\u009b\u0099\3\2\2\2\u009c\u009e\7\6\2\2\u009d")
        buf.write(u"\u009c\3\2\2\2\u009d\u009e\3\2\2\2\u009e\u009f\3\2\2")
        buf.write(u"\2\u009f\u00a0\5\6\4\2\u00a0\u00a1\5\b\5\2\u00a1\5\3")
        buf.write(u"\2\2\2\u00a2\u00a4\7\7\2\2\u00a3\u00a2\3\2\2\2\u00a3")
        buf.write(u"\u00a4\3\2\2\2\u00a4\u00ba\3\2\2\2\u00a5\u00bb\7\b\2")
        buf.write(u"\2\u00a6\u00bb\7\t\2\2\u00a7\u00a9\7\n\2\2\u00a8\u00a7")
        buf.write(u"\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa")
        buf.write(u"\u00bb\7\13\2\2\u00ab\u00bb\7\f\2\2\u00ac\u00ae\7\r\2")
        buf.write(u"\2\u00ad\u00ac\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00af")
        buf.write(u"\3\2\2\2\u00af\u00bb\7\16\2\2\u00b0\u00bb\7\17\2\2\u00b1")
        buf.write(u"\u00bb\7\20\2\2\u00b2\u00b4\t\2\2\2\u00b3\u00b2\3\2\2")
        buf.write(u"\2\u00b3\u00b4\3\2\2\2\u00b4\u00b6\3\2\2\2\u00b5\u00b7")
        buf.write(u"\7\n\2\2\u00b6\u00b5\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7")
        buf.write(u"\u00b8\3\2\2\2\u00b8\u00bb\7\23\2\2\u00b9\u00bb\7\n\2")
        buf.write(u"\2\u00ba\u00a5\3\2\2\2\u00ba\u00a6\3\2\2\2\u00ba\u00a8")
        buf.write(u"\3\2\2\2\u00ba\u00ab\3\2\2\2\u00ba\u00ad\3\2\2\2\u00ba")
        buf.write(u"\u00b0\3\2\2\2\u00ba\u00b1\3\2\2\2\u00ba\u00b3\3\2\2")
        buf.write(u"\2\u00ba\u00b9\3\2\2\2\u00bb\7\3\2\2\2\u00bc\u00bd\7")
        buf.write(u"Z\2\2\u00bd\u00be\5\u0086D\2\u00be\u00bf\5\20\t\2\u00bf")
        buf.write(u"\u00c0\7\24\2\2\u00c0\u00c1\7Z\2\2\u00c1\u00f6\3\2\2")
        buf.write(u"\2\u00c2\u00c3\7Z\2\2\u00c3\u00c4\7\25\2\2\u00c4\u00c5")
        buf.write(u"\5\n\6\2\u00c5\u00c7\5n8\2\u00c6\u00c8\5\u0080A\2\u00c7")
        buf.write(u"\u00c6\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\u00ca\3\2\2")
        buf.write(u"\2\u00c9\u00cb\5\62\32\2\u00ca\u00c9\3\2\2\2\u00ca\u00cb")
        buf.write(u"\3\2\2\2\u00cb\u00cc\3\2\2\2\u00cc\u00cd\5\u0084C\2\u00cd")
        buf.write(u"\u00f6\3\2\2\2\u00ce\u00cf\7Z\2\2\u00cf\u00d0\7\25\2")
        buf.write(u"\2\u00d0\u00d1\7\26\2\2\u00d1\u00d6\7\27\2\2\u00d2\u00d4")
        buf.write(u"\5\f\7\2\u00d3\u00d2\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4")
        buf.write(u"\u00d7\3\2\2\2\u00d5\u00d7\7\30\2\2\u00d6\u00d3\3\2\2")
        buf.write(u"\2\u00d6\u00d5\3\2\2\2\u00d7\u00d8\3\2\2\2\u00d8\u00d9")
        buf.write(u"\7\31\2\2\u00d9\u00f6\5\u0084C\2\u00da\u00db\7Z\2\2\u00db")
        buf.write(u"\u00dc\7\25\2\2\u00dc\u00dd\7\32\2\2\u00dd\u00de\7\27")
        buf.write(u"\2\2\u00de\u00df\5n8\2\u00df\u00e0\7\33\2\2\u00e0\u00e5")
        buf.write(u"\7Z\2\2\u00e1\u00e2\7\33\2\2\u00e2\u00e4\7Z\2\2\u00e3")
        buf.write(u"\u00e1\3\2\2\2\u00e4\u00e7\3\2\2\2\u00e5\u00e3\3\2\2")
        buf.write(u"\2\u00e5\u00e6\3\2\2\2\u00e6\u00e8\3\2\2\2\u00e7\u00e5")
        buf.write(u"\3\2\2\2\u00e8\u00e9\7\31\2\2\u00e9\u00ea\5\u0084C\2")
        buf.write(u"\u00ea\u00f6\3\2\2\2\u00eb\u00ec\7\34\2\2\u00ec\u00ee")
        buf.write(u"\7Z\2\2\u00ed\u00ef\5\62\32\2\u00ee\u00ed\3\2\2\2\u00ee")
        buf.write(u"\u00ef\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f1\5\u0086")
        buf.write(u"D\2\u00f1\u00f2\5\20\t\2\u00f2\u00f3\7\24\2\2\u00f3\u00f4")
        buf.write(u"\7Z\2\2\u00f4\u00f6\3\2\2\2\u00f5\u00bc\3\2\2\2\u00f5")
        buf.write(u"\u00c2\3\2\2\2\u00f5\u00ce\3\2\2\2\u00f5\u00da\3\2\2")
        buf.write(u"\2\u00f5\u00eb\3\2\2\2\u00f6\t\3\2\2\2\u00f7\u00f8\5")
        buf.write(u"$\23\2\u00f8\13\3\2\2\2\u00f9\u00fe\5\16\b\2\u00fa\u00fb")
        buf.write(u"\7\33\2\2\u00fb\u00fd\5\16\b\2\u00fc\u00fa\3\2\2\2\u00fd")
        buf.write(u"\u0100\3\2\2\2\u00fe\u00fc\3\2\2\2\u00fe\u00ff\3\2\2")
        buf.write(u"\2\u00ff\r\3\2\2\2\u0100\u00fe\3\2\2\2\u0101\u0102\7")
        buf.write(u"Z\2\2\u0102\u0103\5\u0084C\2\u0103\17\3\2\2\2\u0104\u010d")
        buf.write(u"\5\26\f\2\u0105\u0106\7\35\2\2\u0106\u010c\5\26\f\2\u0107")
        buf.write(u"\u0108\7\36\2\2\u0108\u010c\5\26\f\2\u0109\u010c\5F$")
        buf.write(u"\2\u010a\u010c\5H%\2\u010b\u0105\3\2\2\2\u010b\u0107")
        buf.write(u"\3\2\2\2\u010b\u0109\3\2\2\2\u010b\u010a\3\2\2\2\u010c")
        buf.write(u"\u010f\3\2\2\2\u010d\u010b\3\2\2\2\u010d\u010e\3\2\2")
        buf.write(u"\2\u010e\u011b\3\2\2\2\u010f\u010d\3\2\2\2\u0110\u0112")
        buf.write(u"\7\37\2\2\u0111\u0113\5\22\n\2\u0112\u0111\3\2\2\2\u0112")
        buf.write(u"\u0113\3\2\2\2\u0113\u0115\3\2\2\2\u0114\u0116\5\24\13")
        buf.write(u"\2\u0115\u0114\3\2\2\2\u0115\u0116\3\2\2\2\u0116\u0118")
        buf.write(u"\3\2\2\2\u0117\u0119\5\u0088E\2\u0118\u0117\3\2\2\2\u0118")
        buf.write(u"\u0119\3\2\2\2\u0119\u011a\3\2\2\2\u011a\u011c\7\30\2")
        buf.write(u"\2\u011b\u0110\3\2\2\2\u011b\u011c\3\2\2\2\u011c\u0120")
        buf.write(u"\3\2\2\2\u011d\u011e\5\u0088E\2\u011e\u011f\7\4\2\2\u011f")
        buf.write(u"\u0121\3\2\2\2\u0120\u011d\3\2\2\2\u0120\u0121\3\2\2")
        buf.write(u"\2\u0121\21\3\2\2\2\u0122\u0123\7[\2\2\u0123\23\3\2\2")
        buf.write(u"\2\u0124\u0125\5p9\2\u0125\u0126\7\25\2\2\u0126\u0128")
        buf.write(u"\3\2\2\2\u0127\u0124\3\2\2\2\u0127\u0128\3\2\2\2\u0128")
        buf.write(u"\u0129\3\2\2\2\u0129\u012a\7Z\2\2\u012a\u012c\7\27\2")
        buf.write(u"\2\u012b\u012d\5~@\2\u012c\u012b\3\2\2\2\u012c\u012d")
        buf.write(u"\3\2\2\2\u012d\u012e\3\2\2\2\u012e\u012f\7\31\2\2\u012f")
        buf.write(u"\25\3\2\2\2\u0130\u0131\5\30\r\2\u0131\u0132\7\4\2\2")
        buf.write(u"\u0132\u0134\3\2\2\2\u0133\u0130\3\2\2\2\u0134\u0137")
        buf.write(u"\3\2\2\2\u0135\u0133\3\2\2\2\u0135\u0136\3\2\2\2\u0136")
        buf.write(u"\27\3\2\2\2\u0137\u0135\3\2\2\2\u0138\u0157\5\32\16\2")
        buf.write(u"\u0139\u0157\5\36\20\2\u013a\u013c\7 \2\2\u013b\u013a")
        buf.write(u"\3\2\2\2\u013b\u013c\3\2\2\2\u013c\u013e\3\2\2\2\u013d")
        buf.write(u"\u013f\7\5\2\2\u013e\u013d\3\2\2\2\u013e\u013f\3\2\2")
        buf.write(u"\2\u013f\u0141\3\2\2\2\u0140\u0142\7!\2\2\u0141\u0140")
        buf.write(u"\3\2\2\2\u0141\u0142\3\2\2\2\u0142\u0144\3\2\2\2\u0143")
        buf.write(u"\u0145\7\"\2\2\u0144\u0143\3\2\2\2\u0144\u0145\3\2\2")
        buf.write(u"\2\u0145\u0154\3\2\2\2\u0146\u0149\5\4\3\2\u0147\u0149")
        buf.write(u"\5\"\22\2\u0148\u0146\3\2\2\2\u0148\u0147\3\2\2\2\u0149")
        buf.write(u"\u0155\3\2\2\2\u014a\u014d\7#\2\2\u014b\u014e\5\4\3\2")
        buf.write(u"\u014c\u014e\5\"\22\2\u014d\u014b\3\2\2\2\u014d\u014c")
        buf.write(u"\3\2\2\2\u014e\u0152\3\2\2\2\u014f\u0150\5 \21\2\u0150")
        buf.write(u"\u0151\5\u0084C\2\u0151\u0153\3\2\2\2\u0152\u014f\3\2")
        buf.write(u"\2\2\u0152\u0153\3\2\2\2\u0153\u0155\3\2\2\2\u0154\u0148")
        buf.write(u"\3\2\2\2\u0154\u014a\3\2\2\2\u0155\u0157\3\2\2\2\u0156")
        buf.write(u"\u0138\3\2\2\2\u0156\u0139\3\2\2\2\u0156\u013b\3\2\2")
        buf.write(u"\2\u0157\31\3\2\2\2\u0158\u0167\7$\2\2\u0159\u015a\7")
        buf.write(u"Z\2\2\u015a\u015b\7\25\2\2\u015b\u0168\5n8\2\u015c\u0165")
        buf.write(u"\5n8\2\u015d\u0163\7%\2\2\u015e\u0164\7&\2\2\u015f\u0160")
        buf.write(u"\7\'\2\2\u0160\u0161\5\34\17\2\u0161\u0162\7(\2\2\u0162")
        buf.write(u"\u0164\3\2\2\2\u0163\u015e\3\2\2\2\u0163\u015f\3\2\2")
        buf.write(u"\2\u0164\u0166\3\2\2\2\u0165\u015d\3\2\2\2\u0165\u0166")
        buf.write(u"\3\2\2\2\u0166\u0168\3\2\2\2\u0167\u0159\3\2\2\2\u0167")
        buf.write(u"\u015c\3\2\2\2\u0168\u0169\3\2\2\2\u0169\u016a\5\u0084")
        buf.write(u"C\2\u016a\33\3\2\2\2\u016b\u0170\7Z\2\2\u016c\u016d\7")
        buf.write(u"\33\2\2\u016d\u016f\5\34\17\2\u016e\u016c\3\2\2\2\u016f")
        buf.write(u"\u0172\3\2\2\2\u0170\u016e\3\2\2\2\u0170\u0171\3\2\2")
        buf.write(u"\2\u0171\35\3\2\2\2\u0172\u0170\3\2\2\2\u0173\u0174\7")
        buf.write(u"\34\2\2\u0174\u0176\5n8\2\u0175\u0177\5\62\32\2\u0176")
        buf.write(u"\u0175\3\2\2\2\u0176\u0177\3\2\2\2\u0177\u0179\3\2\2")
        buf.write(u"\2\u0178\u017a\5\u0088E\2\u0179\u0178\3\2\2\2\u0179\u017a")
        buf.write(u"\3\2\2\2\u017a\37\3\2\2\2\u017b\u017c\7)\2\2\u017c\u017e")
        buf.write(u"\5n8\2\u017d\u017f\5\62\32\2\u017e\u017d\3\2\2\2\u017e")
        buf.write(u"\u017f\3\2\2\2\u017f!\3\2\2\2\u0180\u0181\5$\23\2\u0181")
        buf.write(u"\u0183\5&\24\2\u0182\u0184\5\u0080A\2\u0183\u0182\3\2")
        buf.write(u"\2\2\u0183\u0184\3\2\2\2\u0184\u0185\3\2\2\2\u0185\u0186")
        buf.write(u"\5(\25\2\u0186#\3\2\2\2\u0187\u0189\t\3\2\2\u0188\u0187")
        buf.write(u"\3\2\2\2\u0188\u0189\3\2\2\2\u0189\u018b\3\2\2\2\u018a")
        buf.write(u"\u018c\t\4\2\2\u018b\u018a\3\2\2\2\u018b\u018c\3\2\2")
        buf.write(u"\2\u018c\u018e\3\2\2\2\u018d\u018f\t\5\2\2\u018e\u018d")
        buf.write(u"\3\2\2\2\u018e\u018f\3\2\2\2\u018f%\3\2\2\2\u0190\u0191")
        buf.write(u"\5n8\2\u0191\'\3\2\2\2\u0192\u0197\5*\26\2\u0193\u0194")
        buf.write(u"\7\33\2\2\u0194\u0196\5*\26\2\u0195\u0193\3\2\2\2\u0196")
        buf.write(u"\u0199\3\2\2\2\u0197\u0195\3\2\2\2\u0197\u0198\3\2\2")
        buf.write(u"\2\u0198)\3\2\2\2\u0199\u0197\3\2\2\2\u019a\u019c\5.")
        buf.write(u"\30\2\u019b\u019d\5,\27\2\u019c\u019b\3\2\2\2\u019c\u019d")
        buf.write(u"\3\2\2\2\u019d\u019e\3\2\2\2\u019e\u019f\5\u0084C\2\u019f")
        buf.write(u"+\3\2\2\2\u01a0\u01a1\7\61\2\2\u01a1\u01a2\5f\64\2\u01a2")
        buf.write(u"-\3\2\2\2\u01a3\u01a5\7Z\2\2\u01a4\u01a6\5\u0080A\2\u01a5")
        buf.write(u"\u01a4\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6\u01a8\3\2\2")
        buf.write(u"\2\u01a7\u01a9\5\60\31\2\u01a8\u01a7\3\2\2\2\u01a8\u01a9")
        buf.write(u"\3\2\2\2\u01a9/\3\2\2\2\u01aa\u01ad\5\62\32\2\u01ab\u01ac")
        buf.write(u"\7\25\2\2\u01ac\u01ae\5f\64\2\u01ad\u01ab\3\2\2\2\u01ad")
        buf.write(u"\u01ae\3\2\2\2\u01ae\u01b4\3\2\2\2\u01af\u01b0\7\25\2")
        buf.write(u"\2\u01b0\u01b4\5f\64\2\u01b1\u01b2\7\62\2\2\u01b2\u01b4")
        buf.write(u"\5f\64\2\u01b3\u01aa\3\2\2\2\u01b3\u01af\3\2\2\2\u01b3")
        buf.write(u"\u01b1\3\2\2\2\u01b4\61\3\2\2\2\u01b5\u01b7\7\27\2\2")
        buf.write(u"\u01b6\u01b8\5\64\33\2\u01b7\u01b6\3\2\2\2\u01b7\u01b8")
        buf.write(u"\3\2\2\2\u01b8\u01b9\3\2\2\2\u01b9\u01ba\7\31\2\2\u01ba")
        buf.write(u"\63\3\2\2\2\u01bb\u01c0\5\66\34\2\u01bc\u01bd\7\33\2")
        buf.write(u"\2\u01bd\u01bf\5\66\34\2\u01be\u01bc\3\2\2\2\u01bf\u01c2")
        buf.write(u"\3\2\2\2\u01c0\u01be\3\2\2\2\u01c0\u01c1\3\2\2\2\u01c1")
        buf.write(u"\65\3\2\2\2\u01c2\u01c0\3\2\2\2\u01c3\u01c6\58\35\2\u01c4")
        buf.write(u"\u01c6\5<\37\2\u01c5\u01c3\3\2\2\2\u01c5\u01c4\3\2\2")
        buf.write(u"\2\u01c6\67\3\2\2\2\u01c7\u01c9\7\63\2\2\u01c8\u01c7")
        buf.write(u"\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01cb\3\2\2\2\u01ca")
        buf.write(u"\u01cc\7\5\2\2\u01cb\u01ca\3\2\2\2\u01cb\u01cc\3\2\2")
        buf.write(u"\2\u01cc\u01cf\3\2\2\2\u01cd\u01d0\5:\36\2\u01ce\u01d0")
        buf.write(u"\5> \2\u01cf\u01cd\3\2\2\2\u01cf\u01ce\3\2\2\2\u01d0")
        buf.write(u"9\3\2\2\2\u01d1\u01d3\5n8\2\u01d2\u01d4\5\60\31\2\u01d3")
        buf.write(u"\u01d2\3\2\2\2\u01d3\u01d4\3\2\2\2\u01d4\u01d5\3\2\2")
        buf.write(u"\2\u01d5\u01d6\5\u0086D\2\u01d6;\3\2\2\2\u01d7\u01d9")
        buf.write(u"\7 \2\2\u01d8\u01da\7\63\2\2\u01d9\u01d8\3\2\2\2\u01d9")
        buf.write(u"\u01da\3\2\2\2\u01da\u01dc\3\2\2\2\u01db\u01dd\7\5\2")
        buf.write(u"\2\u01dc\u01db\3\2\2\2\u01dc\u01dd\3\2\2\2\u01dd\u01e3")
        buf.write(u"\3\2\2\2\u01de\u01e1\5D#\2\u01df\u01e1\5@!\2\u01e0\u01de")
        buf.write(u"\3\2\2\2\u01e0\u01df\3\2\2\2\u01e1\u01e4\3\2\2\2\u01e2")
        buf.write(u"\u01e4\5> \2\u01e3\u01e0\3\2\2\2\u01e3\u01e2\3\2\2\2")
        buf.write(u"\u01e4=\3\2\2\2\u01e5\u01e8\7#\2\2\u01e6\u01e9\5D#\2")
        buf.write(u"\u01e7\u01e9\5@!\2\u01e8\u01e6\3\2\2\2\u01e8\u01e7\3")
        buf.write(u"\2\2\2\u01e9\u01eb\3\2\2\2\u01ea\u01ec\5 \21\2\u01eb")
        buf.write(u"\u01ea\3\2\2\2\u01eb\u01ec\3\2\2\2\u01ec?\3\2\2\2\u01ed")
        buf.write(u"\u01ee\5$\23\2\u01ee\u01ef\5&\24\2\u01ef\u01f0\5B\"\2")
        buf.write(u"\u01f0A\3\2\2\2\u01f1\u01f2\5.\30\2\u01f2\u01f3\5\u0084")
        buf.write(u"C\2\u01f3C\3\2\2\2\u01f4\u01f5\5\6\4\2\u01f5\u01f6\7")
        buf.write(u"Z\2\2\u01f6\u020b\7\25\2\2\u01f7\u01f8\5\n\6\2\u01f8")
        buf.write(u"\u01fa\5n8\2\u01f9\u01fb\5\u0080A\2\u01fa\u01f9\3\2\2")
        buf.write(u"\2\u01fa\u01fb\3\2\2\2\u01fb\u01fd\3\2\2\2\u01fc\u01fe")
        buf.write(u"\5\62\32\2\u01fd\u01fc\3\2\2\2\u01fd\u01fe\3\2\2\2\u01fe")
        buf.write(u"\u01ff\3\2\2\2\u01ff\u0200\5\u0084C\2\u0200\u020c\3\2")
        buf.write(u"\2\2\u0201\u0202\7\26\2\2\u0202\u0207\7\27\2\2\u0203")
        buf.write(u"\u0205\5\f\7\2\u0204\u0203\3\2\2\2\u0204\u0205\3\2\2")
        buf.write(u"\2\u0205\u0208\3\2\2\2\u0206\u0208\7\30\2\2\u0207\u0204")
        buf.write(u"\3\2\2\2\u0207\u0206\3\2\2\2\u0208\u0209\3\2\2\2\u0209")
        buf.write(u"\u020a\7\31\2\2\u020a\u020c\5\u0084C\2\u020b\u01f7\3")
        buf.write(u"\2\2\2\u020b\u0201\3\2\2\2\u020cE\3\2\2\2\u020d\u020f")
        buf.write(u"\7\64\2\2\u020e\u020d\3\2\2\2\u020e\u020f\3\2\2\2\u020f")
        buf.write(u"\u0210\3\2\2\2\u0210\u0216\7\65\2\2\u0211\u0212\5L\'")
        buf.write(u"\2\u0212\u0213\7\4\2\2\u0213\u0215\3\2\2\2\u0214\u0211")
        buf.write(u"\3\2\2\2\u0215\u0218\3\2\2\2\u0216\u0214\3\2\2\2\u0216")
        buf.write(u"\u0217\3\2\2\2\u0217G\3\2\2\2\u0218\u0216\3\2\2\2\u0219")
        buf.write(u"\u021b\7\64\2\2\u021a\u0219\3\2\2\2\u021a\u021b\3\2\2")
        buf.write(u"\2\u021b\u021c\3\2\2\2\u021c\u0222\7\66\2\2\u021d\u021e")
        buf.write(u"\5P)\2\u021e\u021f\7\4\2\2\u021f\u0221\3\2\2\2\u0220")
        buf.write(u"\u021d\3\2\2\2\u0221\u0224\3\2\2\2\u0222\u0220\3\2\2")
        buf.write(u"\2\u0222\u0223\3\2\2\2\u0223I\3\2\2\2\u0224\u0222\3\2")
        buf.write(u"\2\2\u0225\u0226\5h\65\2\u0226\u0227\7\25\2\2\u0227\u0228")
        buf.write(u"\5f\64\2\u0228\u0231\3\2\2\2\u0229\u0231\5R*\2\u022a")
        buf.write(u"\u0231\5V,\2\u022b\u0231\5d\63\2\u022c\u0231\5`\61\2")
        buf.write(u"\u022d\u022e\5n8\2\u022e\u022f\5r:\2\u022f\u0231\3\2")
        buf.write(u"\2\2\u0230\u0225\3\2\2\2\u0230\u0229\3\2\2\2\u0230\u022a")
        buf.write(u"\3\2\2\2\u0230\u022b\3\2\2\2\u0230\u022c\3\2\2\2\u0230")
        buf.write(u"\u022d\3\2\2\2\u0231K\3\2\2\2\u0232\u0233\5J&\2\u0233")
        buf.write(u"\u0234\5\u0084C\2\u0234M\3\2\2\2\u0235\u0239\5p9\2\u0236")
        buf.write(u"\u0237\7\62\2\2\u0237\u023a\5f\64\2\u0238\u023a\5r:\2")
        buf.write(u"\u0239\u0236\3\2\2\2\u0239\u0238\3\2\2\2\u023a\u0249")
        buf.write(u"\3\2\2\2\u023b\u023c\7\27\2\2\u023c\u023d\5|?\2\u023d")
        buf.write(u"\u023e\7\31\2\2\u023e\u023f\7\62\2\2\u023f\u0240\5p9")
        buf.write(u"\2\u0240\u0241\5r:\2\u0241\u0249\3\2\2\2\u0242\u0249")
        buf.write(u"\7\67\2\2\u0243\u0249\78\2\2\u0244\u0249\5T+\2\u0245")
        buf.write(u"\u0249\5X-\2\u0246\u0249\5^\60\2\u0247\u0249\5b\62\2")
        buf.write(u"\u0248\u0235\3\2\2\2\u0248\u023b\3\2\2\2\u0248\u0242")
        buf.write(u"\3\2\2\2\u0248\u0243\3\2\2\2\u0248\u0244\3\2\2\2\u0248")
        buf.write(u"\u0245\3\2\2\2\u0248\u0246\3\2\2\2\u0248\u0247\3\2\2")
        buf.write(u"\2\u0249O\3\2\2\2\u024a\u024b\5N(\2\u024b\u024c\5\u0084")
        buf.write(u"C\2\u024cQ\3\2\2\2\u024d\u024e\7\61\2\2\u024e\u024f\5")
        buf.write(u"f\64\2\u024f\u0255\79\2\2\u0250\u0251\5L\'\2\u0251\u0252")
        buf.write(u"\7\4\2\2\u0252\u0254\3\2\2\2\u0253\u0250\3\2\2\2\u0254")
        buf.write(u"\u0257\3\2\2\2\u0255\u0253\3\2\2\2\u0255\u0256\3\2\2")
        buf.write(u"\2\u0256\u0265\3\2\2\2\u0257\u0255\3\2\2\2\u0258\u0259")
        buf.write(u"\7:\2\2\u0259\u025a\5f\64\2\u025a\u0260\79\2\2\u025b")
        buf.write(u"\u025c\5L\'\2\u025c\u025d\7\4\2\2\u025d\u025f\3\2\2\2")
        buf.write(u"\u025e\u025b\3\2\2\2\u025f\u0262\3\2\2\2\u0260\u025e")
        buf.write(u"\3\2\2\2\u0260\u0261\3\2\2\2\u0261\u0264\3\2\2\2\u0262")
        buf.write(u"\u0260\3\2\2\2\u0263\u0258\3\2\2\2\u0264\u0267\3\2\2")
        buf.write(u"\2\u0265\u0263\3\2\2\2\u0265\u0266\3\2\2\2\u0266\u0271")
        buf.write(u"\3\2\2\2\u0267\u0265\3\2\2\2\u0268\u026e\7;\2\2\u0269")
        buf.write(u"\u026a\5L\'\2\u026a\u026b\7\4\2\2\u026b\u026d\3\2\2\2")
        buf.write(u"\u026c\u0269\3\2\2\2\u026d\u0270\3\2\2\2\u026e\u026c")
        buf.write(u"\3\2\2\2\u026e\u026f\3\2\2\2\u026f\u0272\3\2\2\2\u0270")
        buf.write(u"\u026e\3\2\2\2\u0271\u0268\3\2\2\2\u0271\u0272\3\2\2")
        buf.write(u"\2\u0272\u0273\3\2\2\2\u0273\u0274\7\24\2\2\u0274\u0275")
        buf.write(u"\7\61\2\2\u0275S\3\2\2\2\u0276\u0277\7\61\2\2\u0277\u0278")
        buf.write(u"\5f\64\2\u0278\u027e\79\2\2\u0279\u027a\5P)\2\u027a\u027b")
        buf.write(u"\7\4\2\2\u027b\u027d\3\2\2\2\u027c\u0279\3\2\2\2\u027d")
        buf.write(u"\u0280\3\2\2\2\u027e\u027c\3\2\2\2\u027e\u027f\3\2\2")
        buf.write(u"\2\u027f\u028e\3\2\2\2\u0280\u027e\3\2\2\2\u0281\u0282")
        buf.write(u"\7:\2\2\u0282\u0283\5f\64\2\u0283\u0289\79\2\2\u0284")
        buf.write(u"\u0285\5P)\2\u0285\u0286\7\4\2\2\u0286\u0288\3\2\2\2")
        buf.write(u"\u0287\u0284\3\2\2\2\u0288\u028b\3\2\2\2\u0289\u0287")
        buf.write(u"\3\2\2\2\u0289\u028a\3\2\2\2\u028a\u028d\3\2\2\2\u028b")
        buf.write(u"\u0289\3\2\2\2\u028c\u0281\3\2\2\2\u028d\u0290\3\2\2")
        buf.write(u"\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f\u029a")
        buf.write(u"\3\2\2\2\u0290\u028e\3\2\2\2\u0291\u0297\7;\2\2\u0292")
        buf.write(u"\u0293\5P)\2\u0293\u0294\7\4\2\2\u0294\u0296\3\2\2\2")
        buf.write(u"\u0295\u0292\3\2\2\2\u0296\u0299\3\2\2\2\u0297\u0295")
        buf.write(u"\3\2\2\2\u0297\u0298\3\2\2\2\u0298\u029b\3\2\2\2\u0299")
        buf.write(u"\u0297\3\2\2\2\u029a\u0291\3\2\2\2\u029a\u029b\3\2\2")
        buf.write(u"\2\u029b\u029c\3\2\2\2\u029c\u029d\7\24\2\2\u029d\u029e")
        buf.write(u"\7\61\2\2\u029eU\3\2\2\2\u029f\u02a0\7<\2\2\u02a0\u02a1")
        buf.write(u"\5Z.\2\u02a1\u02a7\7=\2\2\u02a2\u02a3\5L\'\2\u02a3\u02a4")
        buf.write(u"\7\4\2\2\u02a4\u02a6\3\2\2\2\u02a5\u02a2\3\2\2\2\u02a6")
        buf.write(u"\u02a9\3\2\2\2\u02a7\u02a5\3\2\2\2\u02a7\u02a8\3\2\2")
        buf.write(u"\2\u02a8\u02aa\3\2\2\2\u02a9\u02a7\3\2\2\2\u02aa\u02ab")
        buf.write(u"\7\24\2\2\u02ab\u02ac\7<\2\2\u02acW\3\2\2\2\u02ad\u02ae")
        buf.write(u"\7<\2\2\u02ae\u02af\5Z.\2\u02af\u02b5\7=\2\2\u02b0\u02b1")
        buf.write(u"\5P)\2\u02b1\u02b2\7\4\2\2\u02b2\u02b4\3\2\2\2\u02b3")
        buf.write(u"\u02b0\3\2\2\2\u02b4\u02b7\3\2\2\2\u02b5\u02b3\3\2\2")
        buf.write(u"\2\u02b5\u02b6\3\2\2\2\u02b6\u02b8\3\2\2\2\u02b7\u02b5")
        buf.write(u"\3\2\2\2\u02b8\u02b9\7\24\2\2\u02b9\u02ba\7<\2\2\u02ba")
        buf.write(u"Y\3\2\2\2\u02bb\u02c0\5\\/\2\u02bc\u02bd\7\33\2\2\u02bd")
        buf.write(u"\u02bf\5\\/\2\u02be\u02bc\3\2\2\2\u02bf\u02c2\3\2\2\2")
        buf.write(u"\u02c0\u02be\3\2\2\2\u02c0\u02c1\3\2\2\2\u02c1[\3\2\2")
        buf.write(u"\2\u02c2\u02c0\3\2\2\2\u02c3\u02c6\7Z\2\2\u02c4\u02c5")
        buf.write(u"\7>\2\2\u02c5\u02c7\5f\64\2\u02c6\u02c4\3\2\2\2\u02c6")
        buf.write(u"\u02c7\3\2\2\2\u02c7]\3\2\2\2\u02c8\u02c9\7?\2\2\u02c9")
        buf.write(u"\u02ca\5f\64\2\u02ca\u02d0\7=\2\2\u02cb\u02cc\5P)\2\u02cc")
        buf.write(u"\u02cd\7\4\2\2\u02cd\u02cf\3\2\2\2\u02ce\u02cb\3\2\2")
        buf.write(u"\2\u02cf\u02d2\3\2\2\2\u02d0\u02ce\3\2\2\2\u02d0\u02d1")
        buf.write(u"\3\2\2\2\u02d1\u02d3\3\2\2\2\u02d2\u02d0\3\2\2\2\u02d3")
        buf.write(u"\u02d4\7\24\2\2\u02d4\u02d5\7?\2\2\u02d5_\3\2\2\2\u02d6")
        buf.write(u"\u02d7\7@\2\2\u02d7\u02d8\5f\64\2\u02d8\u02de\79\2\2")
        buf.write(u"\u02d9\u02da\5L\'\2\u02da\u02db\7\4\2\2\u02db\u02dd\3")
        buf.write(u"\2\2\2\u02dc\u02d9\3\2\2\2\u02dd\u02e0\3\2\2\2\u02de")
        buf.write(u"\u02dc\3\2\2\2\u02de\u02df\3\2\2\2\u02df\u02ee\3\2\2")
        buf.write(u"\2\u02e0\u02de\3\2\2\2\u02e1\u02e2\7A\2\2\u02e2\u02e3")
        buf.write(u"\5f\64\2\u02e3\u02e9\79\2\2\u02e4\u02e5\5L\'\2\u02e5")
        buf.write(u"\u02e6\7\4\2\2\u02e6\u02e8\3\2\2\2\u02e7\u02e4\3\2\2")
        buf.write(u"\2\u02e8\u02eb\3\2\2\2\u02e9\u02e7\3\2\2\2\u02e9\u02ea")
        buf.write(u"\3\2\2\2\u02ea\u02ed\3\2\2\2\u02eb\u02e9\3\2\2\2\u02ec")
        buf.write(u"\u02e1\3\2\2\2\u02ed\u02f0\3\2\2\2\u02ee\u02ec\3\2\2")
        buf.write(u"\2\u02ee\u02ef\3\2\2\2\u02ef\u02f1\3\2\2\2\u02f0\u02ee")
        buf.write(u"\3\2\2\2\u02f1\u02f2\7\24\2\2\u02f2\u02f3\7@\2\2\u02f3")
        buf.write(u"a\3\2\2\2\u02f4\u02f5\7@\2\2\u02f5\u02f6\5f\64\2\u02f6")
        buf.write(u"\u02fc\79\2\2\u02f7\u02f8\5P)\2\u02f8\u02f9\7\4\2\2\u02f9")
        buf.write(u"\u02fb\3\2\2\2\u02fa\u02f7\3\2\2\2\u02fb\u02fe\3\2\2")
        buf.write(u"\2\u02fc\u02fa\3\2\2\2\u02fc\u02fd\3\2\2\2\u02fd\u030c")
        buf.write(u"\3\2\2\2\u02fe\u02fc\3\2\2\2\u02ff\u0300\7A\2\2\u0300")
        buf.write(u"\u0301\5f\64\2\u0301\u0307\79\2\2\u0302\u0303\5P)\2\u0303")
        buf.write(u"\u0304\7\4\2\2\u0304\u0306\3\2\2\2\u0305\u0302\3\2\2")
        buf.write(u"\2\u0306\u0309\3\2\2\2\u0307\u0305\3\2\2\2\u0307\u0308")
        buf.write(u"\3\2\2\2\u0308\u030b\3\2\2\2\u0309\u0307\3\2\2\2\u030a")
        buf.write(u"\u02ff\3\2\2\2\u030b\u030e\3\2\2\2\u030c\u030a\3\2\2")
        buf.write(u"\2\u030c\u030d\3\2\2\2\u030d\u030f\3\2\2\2\u030e\u030c")
        buf.write(u"\3\2\2\2\u030f\u0310\7\24\2\2\u0310\u0311\7@\2\2\u0311")
        buf.write(u"c\3\2\2\2\u0312\u0313\7B\2\2\u0313\u0314\7\27\2\2\u0314")
        buf.write(u"\u0315\5p9\2\u0315\u0316\7\33\2\2\u0316\u0317\5p9\2\u0317")
        buf.write(u"\u0318\7\31\2\2\u0318e\3\2\2\2\u0319\u032c\5h\65\2\u031a")
        buf.write(u"\u031b\7\61\2\2\u031b\u031c\5f\64\2\u031c\u031d\79\2")
        buf.write(u"\2\u031d\u0325\5f\64\2\u031e\u031f\7:\2\2\u031f\u0320")
        buf.write(u"\5f\64\2\u0320\u0321\79\2\2\u0321\u0322\5f\64\2\u0322")
        buf.write(u"\u0324\3\2\2\2\u0323\u031e\3\2\2\2\u0324\u0327\3\2\2")
        buf.write(u"\2\u0325\u0323\3\2\2\2\u0325\u0326\3\2\2\2\u0326\u0328")
        buf.write(u"\3\2\2\2\u0327\u0325\3\2\2\2\u0328\u0329\7;\2\2\u0329")
        buf.write(u"\u032a\5f\64\2\u032a\u032c\3\2\2\2\u032b\u0319\3\2\2")
        buf.write(u"\2\u032b\u031a\3\2\2\2\u032cg\3\2\2\2\u032d\u0334\5j")
        buf.write(u"\66\2\u032e\u032f\7\30\2\2\u032f\u0332\5j\66\2\u0330")
        buf.write(u"\u0331\7\30\2\2\u0331\u0333\5j\66\2\u0332\u0330\3\2\2")
        buf.write(u"\2\u0332\u0333\3\2\2\2\u0333\u0335\3\2\2\2\u0334\u032e")
        buf.write(u"\3\2\2\2\u0334\u0335\3\2\2\2\u0335i\3\2\2\2\u0336\u0337")
        buf.write(u"\b\66\1\2\u0337\u0338\7C\2\2\u0338\u0341\5j\66\13\u0339")
        buf.write(u"\u033a\7R\2\2\u033a\u0341\5j\66\6\u033b\u033c\5l\67\2")
        buf.write(u"\u033c\u033d\t\6\2\2\u033d\u033e\5l\67\2\u033e\u0341")
        buf.write(u"\3\2\2\2\u033f\u0341\5l\67\2\u0340\u0336\3\2\2\2\u0340")
        buf.write(u"\u0339\3\2\2\2\u0340\u033b\3\2\2\2\u0340\u033f\3\2\2")
        buf.write(u"\2\u0341\u0353\3\2\2\2\u0342\u0343\f\t\2\2\u0343\u0344")
        buf.write(u"\t\7\2\2\u0344\u0352\5j\66\n\u0345\u0346\f\b\2\2\u0346")
        buf.write(u"\u0347\t\b\2\2\u0347\u0352\5j\66\t\u0348\u0349\f\7\2")
        buf.write(u"\2\u0349\u034a\t\t\2\2\u034a\u0352\5j\66\b\u034b\u034c")
        buf.write(u"\f\5\2\2\u034c\u034d\7S\2\2\u034d\u0352\5j\66\6\u034e")
        buf.write(u"\u034f\f\4\2\2\u034f\u0350\7T\2\2\u0350\u0352\5j\66\5")
        buf.write(u"\u0351\u0342\3\2\2\2\u0351\u0345\3\2\2\2\u0351\u0348")
        buf.write(u"\3\2\2\2\u0351\u034b\3\2\2\2\u0351\u034e\3\2\2\2\u0352")
        buf.write(u"\u0355\3\2\2\2\u0353\u0351\3\2\2\2\u0353\u0354\3\2\2")
        buf.write(u"\2\u0354k\3\2\2\2\u0355\u0353\3\2\2\2\u0356\u0377\7\\")
        buf.write(u"\2\2\u0357\u0377\7[\2\2\u0358\u0377\7U\2\2\u0359\u0377")
        buf.write(u"\7V\2\2\u035a\u035b\5n8\2\u035b\u035c\5r:\2\u035c\u0377")
        buf.write(u"\3\2\2\2\u035d\u035e\7\32\2\2\u035e\u0377\5r:\2\u035f")
        buf.write(u"\u0360\7\64\2\2\u0360\u0377\5r:\2\u0361\u0377\5p9\2\u0362")
        buf.write(u"\u0363\7\27\2\2\u0363\u0364\5|?\2\u0364\u0365\7\31\2")
        buf.write(u"\2\u0365\u0377\3\2\2\2\u0366\u0367\7W\2\2\u0367\u036c")
        buf.write(u"\5~@\2\u0368\u0369\7\4\2\2\u0369\u036b\5~@\2\u036a\u0368")
        buf.write(u"\3\2\2\2\u036b\u036e\3\2\2\2\u036c\u036a\3\2\2\2\u036c")
        buf.write(u"\u036d\3\2\2\2\u036d\u036f\3\2\2\2\u036e\u036c\3\2\2")
        buf.write(u"\2\u036f\u0370\7X\2\2\u0370\u0377\3\2\2\2\u0371\u0372")
        buf.write(u"\7\'\2\2\u0372\u0373\5t;\2\u0373\u0374\7(\2\2\u0374\u0377")
        buf.write(u"\3\2\2\2\u0375\u0377\7\24\2\2\u0376\u0356\3\2\2\2\u0376")
        buf.write(u"\u0357\3\2\2\2\u0376\u0358\3\2\2\2\u0376\u0359\3\2\2")
        buf.write(u"\2\u0376\u035a\3\2\2\2\u0376\u035d\3\2\2\2\u0376\u035f")
        buf.write(u"\3\2\2\2\u0376\u0361\3\2\2\2\u0376\u0362\3\2\2\2\u0376")
        buf.write(u"\u0366\3\2\2\2\u0376\u0371\3\2\2\2\u0376\u0375\3\2\2")
        buf.write(u"\2\u0377m\3\2\2\2\u0378\u037a\7%\2\2\u0379\u0378\3\2")
        buf.write(u"\2\2\u0379\u037a\3\2\2\2\u037a\u037b\3\2\2\2\u037b\u0380")
        buf.write(u"\7Z\2\2\u037c\u037d\7%\2\2\u037d\u037f\7Z\2\2\u037e\u037c")
        buf.write(u"\3\2\2\2\u037f\u0382\3\2\2\2\u0380\u037e\3\2\2\2\u0380")
        buf.write(u"\u0381\3\2\2\2\u0381o\3\2\2\2\u0382\u0380\3\2\2\2\u0383")
        buf.write(u"\u0385\7%\2\2\u0384\u0383\3\2\2\2\u0384\u0385\3\2\2\2")
        buf.write(u"\u0385\u0386\3\2\2\2\u0386\u0388\7Z\2\2\u0387\u0389\5")
        buf.write(u"\u0080A\2\u0388\u0387\3\2\2\2\u0388\u0389\3\2\2\2\u0389")
        buf.write(u"\u0391\3\2\2\2\u038a\u038b\7%\2\2\u038b\u038d\7Z\2\2")
        buf.write(u"\u038c\u038e\5\u0080A\2\u038d\u038c\3\2\2\2\u038d\u038e")
        buf.write(u"\3\2\2\2\u038e\u0390\3\2\2\2\u038f\u038a\3\2\2\2\u0390")
        buf.write(u"\u0393\3\2\2\2\u0391\u038f\3\2\2\2\u0391\u0392\3\2\2")
        buf.write(u"\2\u0392q\3\2\2\2\u0393\u0391\3\2\2\2\u0394\u0396\7\27")
        buf.write(u"\2\2\u0395\u0397\5t;\2\u0396\u0395\3\2\2\2\u0396\u0397")
        buf.write(u"\3\2\2\2\u0397\u0398\3\2\2\2\u0398\u0399\7\31\2\2\u0399")
        buf.write(u"s\3\2\2\2\u039a\u03a1\5z>\2\u039b\u039c\7\33\2\2\u039c")
        buf.write(u"\u03a0\5z>\2\u039d\u039e\7<\2\2\u039e\u03a0\5Z.\2\u039f")
        buf.write(u"\u039b\3\2\2\2\u039f\u039d\3\2\2\2\u03a0\u03a3\3\2\2")
        buf.write(u"\2\u03a1\u039f\3\2\2\2\u03a1\u03a2\3\2\2\2\u03a2\u03a6")
        buf.write(u"\3\2\2\2\u03a3\u03a1\3\2\2\2\u03a4\u03a6\5v<\2\u03a5")
        buf.write(u"\u039a\3\2\2\2\u03a5\u03a4\3\2\2\2\u03a6u\3\2\2\2\u03a7")
        buf.write(u"\u03ac\5x=\2\u03a8\u03a9\7\33\2\2\u03a9\u03ab\5x=\2\u03aa")
        buf.write(u"\u03a8\3\2\2\2\u03ab\u03ae\3\2\2\2\u03ac\u03aa\3\2\2")
        buf.write(u"\2\u03ac\u03ad\3\2\2\2\u03adw\3\2\2\2\u03ae\u03ac\3\2")
        buf.write(u"\2\2\u03af\u03b0\7Z\2\2\u03b0\u03b1\7\25\2\2\u03b1\u03b2")
        buf.write(u"\5z>\2\u03b2y\3\2\2\2\u03b3\u03b4\7\23\2\2\u03b4\u03b5")
        buf.write(u"\5n8\2\u03b5\u03b7\7\27\2\2\u03b6\u03b8\5v<\2\u03b7\u03b6")
        buf.write(u"\3\2\2\2\u03b7\u03b8\3\2\2\2\u03b8\u03b9\3\2\2\2\u03b9")
        buf.write(u"\u03ba\7\31\2\2\u03ba\u03bd\3\2\2\2\u03bb\u03bd\5f\64")
        buf.write(u"\2\u03bc\u03b3\3\2\2\2\u03bc\u03bb\3\2\2\2\u03bd{\3\2")
        buf.write(u"\2\2\u03be\u03c0\5f\64\2\u03bf\u03be\3\2\2\2\u03bf\u03c0")
        buf.write(u"\3\2\2\2\u03c0\u03c5\3\2\2\2\u03c1\u03c2\7\33\2\2\u03c2")
        buf.write(u"\u03c4\5f\64\2\u03c3\u03c1\3\2\2\2\u03c4\u03c7\3\2\2")
        buf.write(u"\2\u03c5\u03c3\3\2\2\2\u03c5\u03c6\3\2\2\2\u03c6}\3\2")
        buf.write(u"\2\2\u03c7\u03c5\3\2\2\2\u03c8\u03cd\5f\64\2\u03c9\u03ca")
        buf.write(u"\7\33\2\2\u03ca\u03cc\5f\64\2\u03cb\u03c9\3\2\2\2\u03cc")
        buf.write(u"\u03cf\3\2\2\2\u03cd\u03cb\3\2\2\2\u03cd\u03ce\3\2\2")
        buf.write(u"\2\u03ce\177\3\2\2\2\u03cf\u03cd\3\2\2\2\u03d0\u03d1")
        buf.write(u"\7W\2\2\u03d1\u03d6\5\u0082B\2\u03d2\u03d3\7\33\2\2\u03d3")
        buf.write(u"\u03d5\5\u0082B\2\u03d4\u03d2\3\2\2\2\u03d5\u03d8\3\2")
        buf.write(u"\2\2\u03d6\u03d4\3\2\2\2\u03d6\u03d7\3\2\2\2\u03d7\u03d9")
        buf.write(u"\3\2\2\2\u03d8\u03d6\3\2\2\2\u03d9\u03da\7X\2\2\u03da")
        buf.write(u"\u0081\3\2\2\2\u03db\u03de\7\30\2\2\u03dc\u03de\5f\64")
        buf.write(u"\2\u03dd\u03db\3\2\2\2\u03dd\u03dc\3\2\2\2\u03de\u0083")
        buf.write(u"\3\2\2\2\u03df\u03e1\5\u0086D\2\u03e0\u03e2\5\u0088E")
        buf.write(u"\2\u03e1\u03e0\3\2\2\2\u03e1\u03e2\3\2\2\2\u03e2\u0085")
        buf.write(u"\3\2\2\2\u03e3\u03e8\7[\2\2\u03e4\u03e5\7I\2\2\u03e5")
        buf.write(u"\u03e7\7[\2\2\u03e6\u03e4\3\2\2\2\u03e7\u03ea\3\2\2\2")
        buf.write(u"\u03e8\u03e6\3\2\2\2\u03e8\u03e9\3\2\2\2\u03e9\u03ec")
        buf.write(u"\3\2\2\2\u03ea\u03e8\3\2\2\2\u03eb\u03e3\3\2\2\2\u03eb")
        buf.write(u"\u03ec\3\2\2\2\u03ec\u0087\3\2\2\2\u03ed\u03ee\7Y\2\2")
        buf.write(u"\u03ee\u03ef\5\62\32\2\u03ef\u0089\3\2\2\2\u0085\u008c")
        buf.write(u"\u008f\u0092\u0099\u009d\u00a3\u00a8\u00ad\u00b3\u00b6")
        buf.write(u"\u00ba\u00c7\u00ca\u00d3\u00d6\u00e5\u00ee\u00f5\u00fe")
        buf.write(u"\u010b\u010d\u0112\u0115\u0118\u011b\u0120\u0127\u012c")
        buf.write(u"\u0135\u013b\u013e\u0141\u0144\u0148\u014d\u0152\u0154")
        buf.write(u"\u0156\u0163\u0165\u0167\u0170\u0176\u0179\u017e\u0183")
        buf.write(u"\u0188\u018b\u018e\u0197\u019c\u01a5\u01a8\u01ad\u01b3")
        buf.write(u"\u01b7\u01c0\u01c5\u01c8\u01cb\u01cf\u01d3\u01d9\u01dc")
        buf.write(u"\u01e0\u01e3\u01e8\u01eb\u01fa\u01fd\u0204\u0207\u020b")
        buf.write(u"\u020e\u0216\u021a\u0222\u0230\u0239\u0248\u0255\u0260")
        buf.write(u"\u0265\u026e\u0271\u027e\u0289\u028e\u0297\u029a\u02a7")
        buf.write(u"\u02b5\u02c0\u02c6\u02d0\u02de\u02e9\u02ee\u02fc\u0307")
        buf.write(u"\u030c\u0325\u032b\u0332\u0334\u0340\u0351\u0353\u036c")
        buf.write(u"\u0376\u0379\u0380\u0384\u0388\u038d\u0391\u0396\u039f")
        buf.write(u"\u03a1\u03a5\u03ac\u03b7\u03bc\u03bf\u03c5\u03cd\u03d6")
        buf.write(u"\u03dd\u03e1\u03e8\u03eb")
        return buf.getvalue()


class ModelicaParser ( Parser ):

    grammarFileName = "Modelica.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ u"<INVALID>", u"'within'", u"';'", u"'final'", u"'encapsulated'", 
                     u"'partial'", u"'class'", u"'model'", u"'operator'", 
                     u"'record'", u"'block'", u"'expandable'", u"'connector'", 
                     u"'type'", u"'package'", u"'pure'", u"'impure'", u"'function'", 
                     u"'end'", u"'='", u"'enumeration'", u"'('", u"':'", 
                     u"')'", u"'der'", u"','", u"'extends'", u"'public'", 
                     u"'protected'", u"'external'", u"'redeclare'", u"'inner'", 
                     u"'outer'", u"'replaceable'", u"'import'", u"'.'", 
                     u"'*'", u"'{'", u"'}'", u"'constrainedby'", u"'flow'", 
                     u"'stream'", u"'discrete'", u"'parameter'", u"'constant'", 
                     u"'input'", u"'output'", u"'if'", u"':='", u"'each'", 
                     u"'initial'", u"'equation'", u"'algorithm'", u"'break'", 
                     u"'return'", u"'then'", u"'elseif'", u"'else'", u"'for'", 
                     u"'loop'", u"'in'", u"'while'", u"'when'", u"'elsewhen'", 
                     u"'connect'", u"'-'", u"'^'", u"'.^'", u"'/'", u"'.*'", 
                     u"'./'", u"'+'", u"'.+'", u"'.-'", u"'<'", u"'<='", 
                     u"'>'", u"'>='", u"'=='", u"'<>'", u"'not'", u"'and'", 
                     u"'or'", u"'false'", u"'true'", u"'['", u"']'", u"'annotation'" ]

    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"<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"<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"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"<INVALID>", u"<INVALID>", u"<INVALID>", u"<INVALID>", 
                      u"IDENT", u"STRING", u"UNSIGNED_NUMBER", u"COMMENT", 
                      u"WS" ]

    RULE_stored_definition = 0
    RULE_class_definition = 1
    RULE_class_prefixes = 2
    RULE_class_specifier = 3
    RULE_base_prefix = 4
    RULE_enum_list = 5
    RULE_enumeration_literal = 6
    RULE_composition = 7
    RULE_language_specification = 8
    RULE_external_function_call = 9
    RULE_element_list = 10
    RULE_element = 11
    RULE_import_clause = 12
    RULE_import_list = 13
    RULE_extends_clause = 14
    RULE_constraining_clause = 15
    RULE_component_clause = 16
    RULE_type_prefix = 17
    RULE_type_specifier = 18
    RULE_component_list = 19
    RULE_component_declaration = 20
    RULE_condition_attribute = 21
    RULE_declaration = 22
    RULE_modification = 23
    RULE_class_modification = 24
    RULE_argument_list = 25
    RULE_argument = 26
    RULE_element_modification_or_replaceable = 27
    RULE_element_modification = 28
    RULE_element_redeclaration = 29
    RULE_element_replaceable = 30
    RULE_component_clause1 = 31
    RULE_component_declaration1 = 32
    RULE_short_class_definition = 33
    RULE_equation_section = 34
    RULE_algorithm_section = 35
    RULE_equation_options = 36
    RULE_equation = 37
    RULE_statement_options = 38
    RULE_statement = 39
    RULE_if_equation = 40
    RULE_if_statement = 41
    RULE_for_equation = 42
    RULE_for_statement = 43
    RULE_for_indices = 44
    RULE_for_index = 45
    RULE_while_statement = 46
    RULE_when_equation = 47
    RULE_when_statement = 48
    RULE_connect_clause = 49
    RULE_expression = 50
    RULE_simple_expression = 51
    RULE_expr = 52
    RULE_primary = 53
    RULE_name = 54
    RULE_component_reference = 55
    RULE_function_call_args = 56
    RULE_function_arguments = 57
    RULE_named_arguments = 58
    RULE_named_argument = 59
    RULE_function_argument = 60
    RULE_output_expression_list = 61
    RULE_expression_list = 62
    RULE_array_subscripts = 63
    RULE_subscript = 64
    RULE_comment = 65
    RULE_string_comment = 66
    RULE_annotation = 67

    ruleNames =  [ u"stored_definition", u"class_definition", u"class_prefixes", 
                   u"class_specifier", u"base_prefix", u"enum_list", u"enumeration_literal", 
                   u"composition", u"language_specification", u"external_function_call", 
                   u"element_list", u"element", u"import_clause", u"import_list", 
                   u"extends_clause", u"constraining_clause", u"component_clause", 
                   u"type_prefix", u"type_specifier", u"component_list", 
                   u"component_declaration", u"condition_attribute", u"declaration", 
                   u"modification", u"class_modification", u"argument_list", 
                   u"argument", u"element_modification_or_replaceable", 
                   u"element_modification", u"element_redeclaration", u"element_replaceable", 
                   u"component_clause1", u"component_declaration1", u"short_class_definition", 
                   u"equation_section", u"algorithm_section", u"equation_options", 
                   u"equation", u"statement_options", u"statement", u"if_equation", 
                   u"if_statement", u"for_equation", u"for_statement", u"for_indices", 
                   u"for_index", u"while_statement", u"when_equation", u"when_statement", 
                   u"connect_clause", u"expression", u"simple_expression", 
                   u"expr", u"primary", u"name", u"component_reference", 
                   u"function_call_args", u"function_arguments", u"named_arguments", 
                   u"named_argument", u"function_argument", u"output_expression_list", 
                   u"expression_list", u"array_subscripts", u"subscript", 
                   u"comment", u"string_comment", u"annotation" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    T__19=20
    T__20=21
    T__21=22
    T__22=23
    T__23=24
    T__24=25
    T__25=26
    T__26=27
    T__27=28
    T__28=29
    T__29=30
    T__30=31
    T__31=32
    T__32=33
    T__33=34
    T__34=35
    T__35=36
    T__36=37
    T__37=38
    T__38=39
    T__39=40
    T__40=41
    T__41=42
    T__42=43
    T__43=44
    T__44=45
    T__45=46
    T__46=47
    T__47=48
    T__48=49
    T__49=50
    T__50=51
    T__51=52
    T__52=53
    T__53=54
    T__54=55
    T__55=56
    T__56=57
    T__57=58
    T__58=59
    T__59=60
    T__60=61
    T__61=62
    T__62=63
    T__63=64
    T__64=65
    T__65=66
    T__66=67
    T__67=68
    T__68=69
    T__69=70
    T__70=71
    T__71=72
    T__72=73
    T__73=74
    T__74=75
    T__75=76
    T__76=77
    T__77=78
    T__78=79
    T__79=80
    T__80=81
    T__81=82
    T__82=83
    T__83=84
    T__84=85
    T__85=86
    T__86=87
    IDENT=88
    STRING=89
    UNSIGNED_NUMBER=90
    COMMENT=91
    WS=92

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



    class Stored_definitionContext(ParserRuleContext):

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

        def class_definition(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Class_definitionContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Class_definitionContext,i)


        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_stored_definition

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

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




    def stored_definition(self):

        localctx = ModelicaParser.Stored_definitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_stored_definition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 141
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__0:
                self.state = 136
                self.match(ModelicaParser.T__0)
                self.state = 138
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__34 or _la==ModelicaParser.IDENT:
                    self.state = 137
                    self.name()


                self.state = 140
                self.match(ModelicaParser.T__1)


            self.state = 151
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__2) | (1 << ModelicaParser.T__3) | (1 << ModelicaParser.T__4) | (1 << ModelicaParser.T__5) | (1 << ModelicaParser.T__6) | (1 << ModelicaParser.T__7) | (1 << ModelicaParser.T__8) | (1 << ModelicaParser.T__9) | (1 << ModelicaParser.T__10) | (1 << ModelicaParser.T__11) | (1 << ModelicaParser.T__12) | (1 << ModelicaParser.T__13) | (1 << ModelicaParser.T__14) | (1 << ModelicaParser.T__15) | (1 << ModelicaParser.T__16))) != 0):
                self.state = 144
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__2:
                    self.state = 143
                    self.match(ModelicaParser.T__2)


                self.state = 146
                self.class_definition()
                self.state = 147
                self.match(ModelicaParser.T__1)
                self.state = 153
                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 Class_definitionContext(ParserRuleContext):

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

        def class_prefixes(self):
            return self.getTypedRuleContext(ModelicaParser.Class_prefixesContext,0)


        def class_specifier(self):
            return self.getTypedRuleContext(ModelicaParser.Class_specifierContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_class_definition

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

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




    def class_definition(self):

        localctx = ModelicaParser.Class_definitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_class_definition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 155
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__3:
                self.state = 154
                self.match(ModelicaParser.T__3)


            self.state = 157
            self.class_prefixes()
            self.state = 158
            self.class_specifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Class_prefixesContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_class_prefixes

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

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




    def class_prefixes(self):

        localctx = ModelicaParser.Class_prefixesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_class_prefixes)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 161
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__4:
                self.state = 160
                self.match(ModelicaParser.T__4)


            self.state = 184
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.state = 163
                self.match(ModelicaParser.T__5)
                pass

            elif la_ == 2:
                self.state = 164
                self.match(ModelicaParser.T__6)
                pass

            elif la_ == 3:
                self.state = 166
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__7:
                    self.state = 165
                    self.match(ModelicaParser.T__7)


                self.state = 168
                self.match(ModelicaParser.T__8)
                pass

            elif la_ == 4:
                self.state = 169
                self.match(ModelicaParser.T__9)
                pass

            elif la_ == 5:
                self.state = 171
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__10:
                    self.state = 170
                    self.match(ModelicaParser.T__10)


                self.state = 173
                self.match(ModelicaParser.T__11)
                pass

            elif la_ == 6:
                self.state = 174
                self.match(ModelicaParser.T__12)
                pass

            elif la_ == 7:
                self.state = 175
                self.match(ModelicaParser.T__13)
                pass

            elif la_ == 8:
                self.state = 177
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__14 or _la==ModelicaParser.T__15:
                    self.state = 176
                    _la = self._input.LA(1)
                    if not(_la==ModelicaParser.T__14 or _la==ModelicaParser.T__15):
                        self._errHandler.recoverInline(self)
                    else:
                        self.consume()


                self.state = 180
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__7:
                    self.state = 179
                    self.match(ModelicaParser.T__7)


                self.state = 182
                self.match(ModelicaParser.T__16)
                pass

            elif la_ == 9:
                self.state = 183
                self.match(ModelicaParser.T__7)
                pass


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

    class Class_specifierContext(ParserRuleContext):

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

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

        def string_comment(self):
            return self.getTypedRuleContext(ModelicaParser.String_commentContext,0)


        def composition(self):
            return self.getTypedRuleContext(ModelicaParser.CompositionContext,0)


        def base_prefix(self):
            return self.getTypedRuleContext(ModelicaParser.Base_prefixContext,0)


        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def array_subscripts(self):
            return self.getTypedRuleContext(ModelicaParser.Array_subscriptsContext,0)


        def class_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Class_modificationContext,0)


        def enum_list(self):
            return self.getTypedRuleContext(ModelicaParser.Enum_listContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_class_specifier

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

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




    def class_specifier(self):

        localctx = ModelicaParser.Class_specifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_class_specifier)
        self._la = 0 # Token type
        try:
            self.state = 243
            la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 186
                self.match(ModelicaParser.IDENT)
                self.state = 187
                self.string_comment()
                self.state = 188
                self.composition()
                self.state = 189
                self.match(ModelicaParser.T__17)
                self.state = 190
                self.match(ModelicaParser.IDENT)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 192
                self.match(ModelicaParser.IDENT)
                self.state = 193
                self.match(ModelicaParser.T__18)
                self.state = 194
                self.base_prefix()
                self.state = 195
                self.name()
                self.state = 197
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__84:
                    self.state = 196
                    self.array_subscripts()


                self.state = 200
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__20:
                    self.state = 199
                    self.class_modification()


                self.state = 202
                self.comment()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 204
                self.match(ModelicaParser.IDENT)
                self.state = 205
                self.match(ModelicaParser.T__18)
                self.state = 206
                self.match(ModelicaParser.T__19)
                self.state = 207
                self.match(ModelicaParser.T__20)
                self.state = 212
                token = self._input.LA(1)
                if token in [ModelicaParser.T__22, ModelicaParser.IDENT]:
                    self.state = 209
                    _la = self._input.LA(1)
                    if _la==ModelicaParser.IDENT:
                        self.state = 208
                        self.enum_list()



                elif token in [ModelicaParser.T__21]:
                    self.state = 211
                    self.match(ModelicaParser.T__21)

                else:
                    raise NoViableAltException(self)

                self.state = 214
                self.match(ModelicaParser.T__22)
                self.state = 215
                self.comment()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 216
                self.match(ModelicaParser.IDENT)
                self.state = 217
                self.match(ModelicaParser.T__18)
                self.state = 218
                self.match(ModelicaParser.T__23)
                self.state = 219
                self.match(ModelicaParser.T__20)
                self.state = 220
                self.name()
                self.state = 221
                self.match(ModelicaParser.T__24)
                self.state = 222
                self.match(ModelicaParser.IDENT)
                self.state = 227
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__24:
                    self.state = 223
                    self.match(ModelicaParser.T__24)
                    self.state = 224
                    self.match(ModelicaParser.IDENT)
                    self.state = 229
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 230
                self.match(ModelicaParser.T__22)
                self.state = 231
                self.comment()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 233
                self.match(ModelicaParser.T__25)
                self.state = 234
                self.match(ModelicaParser.IDENT)
                self.state = 236
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__20:
                    self.state = 235
                    self.class_modification()


                self.state = 238
                self.string_comment()
                self.state = 239
                self.composition()
                self.state = 240
                self.match(ModelicaParser.T__17)
                self.state = 241
                self.match(ModelicaParser.IDENT)
                pass


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

    class Base_prefixContext(ParserRuleContext):

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

        def type_prefix(self):
            return self.getTypedRuleContext(ModelicaParser.Type_prefixContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_base_prefix

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

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




    def base_prefix(self):

        localctx = ModelicaParser.Base_prefixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_base_prefix)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 245
            self.type_prefix()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Enum_listContext(ParserRuleContext):

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

        def enumeration_literal(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Enumeration_literalContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Enumeration_literalContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_enum_list

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

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




    def enum_list(self):

        localctx = ModelicaParser.Enum_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_enum_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 247
            self.enumeration_literal()
            self.state = 252
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__24:
                self.state = 248
                self.match(ModelicaParser.T__24)
                self.state = 249
                self.enumeration_literal()
                self.state = 254
                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 Enumeration_literalContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_enumeration_literal

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

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




    def enumeration_literal(self):

        localctx = ModelicaParser.Enumeration_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_enumeration_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 255
            self.match(ModelicaParser.IDENT)
            self.state = 256
            self.comment()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class CompositionContext(ParserRuleContext):

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

        def element_list(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Element_listContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Element_listContext,i)


        def equation_section(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Equation_sectionContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Equation_sectionContext,i)


        def algorithm_section(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Algorithm_sectionContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Algorithm_sectionContext,i)


        def annotation(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.AnnotationContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.AnnotationContext,i)


        def language_specification(self):
            return self.getTypedRuleContext(ModelicaParser.Language_specificationContext,0)


        def external_function_call(self):
            return self.getTypedRuleContext(ModelicaParser.External_function_callContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_composition

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

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




    def composition(self):

        localctx = ModelicaParser.CompositionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_composition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 258
            self.element_list()
            self.state = 267
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__26) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__49) | (1 << ModelicaParser.T__50) | (1 << ModelicaParser.T__51))) != 0):
                self.state = 265
                la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                if la_ == 1:
                    self.state = 259
                    self.match(ModelicaParser.T__26)
                    self.state = 260
                    self.element_list()
                    pass

                elif la_ == 2:
                    self.state = 261
                    self.match(ModelicaParser.T__27)
                    self.state = 262
                    self.element_list()
                    pass

                elif la_ == 3:
                    self.state = 263
                    self.equation_section()
                    pass

                elif la_ == 4:
                    self.state = 264
                    self.algorithm_section()
                    pass


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

            self.state = 281
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__28:
                self.state = 270
                self.match(ModelicaParser.T__28)
                self.state = 272
                _la = self._input.LA(1)
                if _la==ModelicaParser.STRING:
                    self.state = 271
                    self.language_specification()


                self.state = 275
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__34 or _la==ModelicaParser.IDENT:
                    self.state = 274
                    self.external_function_call()


                self.state = 278
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__86:
                    self.state = 277
                    self.annotation()


                self.state = 280
                self.match(ModelicaParser.T__21)


            self.state = 286
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__86:
                self.state = 283
                self.annotation()
                self.state = 284
                self.match(ModelicaParser.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 Language_specificationContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_language_specification

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

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




    def language_specification(self):

        localctx = ModelicaParser.Language_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_language_specification)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 288
            self.match(ModelicaParser.STRING)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class External_function_callContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

        def component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext,0)


        def expression_list(self):
            return self.getTypedRuleContext(ModelicaParser.Expression_listContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_external_function_call

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

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




    def external_function_call(self):

        localctx = ModelicaParser.External_function_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_external_function_call)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 293
            la_ = self._interp.adaptivePredict(self._input,26,self._ctx)
            if la_ == 1:
                self.state = 290
                self.component_reference()
                self.state = 291
                self.match(ModelicaParser.T__18)


            self.state = 295
            self.match(ModelicaParser.IDENT)
            self.state = 296
            self.match(ModelicaParser.T__20)
            self.state = 298
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__17) | (1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__23) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__36) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__49))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (ModelicaParser.T__64 - 65)) | (1 << (ModelicaParser.T__79 - 65)) | (1 << (ModelicaParser.T__82 - 65)) | (1 << (ModelicaParser.T__83 - 65)) | (1 << (ModelicaParser.T__84 - 65)) | (1 << (ModelicaParser.IDENT - 65)) | (1 << (ModelicaParser.STRING - 65)) | (1 << (ModelicaParser.UNSIGNED_NUMBER - 65)))) != 0):
                self.state = 297
                self.expression_list()


            self.state = 300
            self.match(ModelicaParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Element_listContext(ParserRuleContext):

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

        def element(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.ElementContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.ElementContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_element_list

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

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




    def element_list(self):

        localctx = ModelicaParser.Element_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_element_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 307
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__2) | (1 << ModelicaParser.T__3) | (1 << ModelicaParser.T__4) | (1 << ModelicaParser.T__5) | (1 << ModelicaParser.T__6) | (1 << ModelicaParser.T__7) | (1 << ModelicaParser.T__8) | (1 << ModelicaParser.T__9) | (1 << ModelicaParser.T__10) | (1 << ModelicaParser.T__11) | (1 << ModelicaParser.T__12) | (1 << ModelicaParser.T__13) | (1 << ModelicaParser.T__14) | (1 << ModelicaParser.T__15) | (1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__25) | (1 << ModelicaParser.T__29) | (1 << ModelicaParser.T__30) | (1 << ModelicaParser.T__31) | (1 << ModelicaParser.T__32) | (1 << ModelicaParser.T__33) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__40) | (1 << ModelicaParser.T__41) | (1 << ModelicaParser.T__42) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__45))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 302
                self.element()
                self.state = 303
                self.match(ModelicaParser.T__1)
                self.state = 309
                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 ElementContext(ParserRuleContext):

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

        def import_clause(self):
            return self.getTypedRuleContext(ModelicaParser.Import_clauseContext,0)


        def extends_clause(self):
            return self.getTypedRuleContext(ModelicaParser.Extends_clauseContext,0)


        def class_definition(self):
            return self.getTypedRuleContext(ModelicaParser.Class_definitionContext,0)


        def component_clause(self):
            return self.getTypedRuleContext(ModelicaParser.Component_clauseContext,0)


        def constraining_clause(self):
            return self.getTypedRuleContext(ModelicaParser.Constraining_clauseContext,0)


        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_element

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

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




    def element(self):

        localctx = ModelicaParser.ElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_element)
        self._la = 0 # Token type
        try:
            self.state = 340
            token = self._input.LA(1)
            if token in [ModelicaParser.T__33]:
                self.enterOuterAlt(localctx, 1)
                self.state = 310
                self.import_clause()

            elif token in [ModelicaParser.T__25]:
                self.enterOuterAlt(localctx, 2)
                self.state = 311
                self.extends_clause()

            elif token in [ModelicaParser.T__2, ModelicaParser.T__3, ModelicaParser.T__4, ModelicaParser.T__5, ModelicaParser.T__6, ModelicaParser.T__7, ModelicaParser.T__8, ModelicaParser.T__9, ModelicaParser.T__10, ModelicaParser.T__11, ModelicaParser.T__12, ModelicaParser.T__13, ModelicaParser.T__14, ModelicaParser.T__15, ModelicaParser.T__16, ModelicaParser.T__29, ModelicaParser.T__30, ModelicaParser.T__31, ModelicaParser.T__32, ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 313
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__29:
                    self.state = 312
                    self.match(ModelicaParser.T__29)


                self.state = 316
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__2:
                    self.state = 315
                    self.match(ModelicaParser.T__2)


                self.state = 319
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__30:
                    self.state = 318
                    self.match(ModelicaParser.T__30)


                self.state = 322
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__31:
                    self.state = 321
                    self.match(ModelicaParser.T__31)


                self.state = 338
                token = self._input.LA(1)
                if token in [ModelicaParser.T__3, ModelicaParser.T__4, ModelicaParser.T__5, ModelicaParser.T__6, ModelicaParser.T__7, ModelicaParser.T__8, ModelicaParser.T__9, ModelicaParser.T__10, ModelicaParser.T__11, ModelicaParser.T__12, ModelicaParser.T__13, ModelicaParser.T__14, ModelicaParser.T__15, ModelicaParser.T__16, ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                    self.state = 326
                    token = self._input.LA(1)
                    if token in [ModelicaParser.T__3, ModelicaParser.T__4, ModelicaParser.T__5, ModelicaParser.T__6, ModelicaParser.T__7, ModelicaParser.T__8, ModelicaParser.T__9, ModelicaParser.T__10, ModelicaParser.T__11, ModelicaParser.T__12, ModelicaParser.T__13, ModelicaParser.T__14, ModelicaParser.T__15, ModelicaParser.T__16]:
                        self.state = 324
                        self.class_definition()

                    elif token in [ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                        self.state = 325
                        self.component_clause()

                    else:
                        raise NoViableAltException(self)


                elif token in [ModelicaParser.T__32]:
                    self.state = 328
                    self.match(ModelicaParser.T__32)
                    self.state = 331
                    token = self._input.LA(1)
                    if token in [ModelicaParser.T__3, ModelicaParser.T__4, ModelicaParser.T__5, ModelicaParser.T__6, ModelicaParser.T__7, ModelicaParser.T__8, ModelicaParser.T__9, ModelicaParser.T__10, ModelicaParser.T__11, ModelicaParser.T__12, ModelicaParser.T__13, ModelicaParser.T__14, ModelicaParser.T__15, ModelicaParser.T__16]:
                        self.state = 329
                        self.class_definition()

                    elif token in [ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                        self.state = 330
                        self.component_clause()

                    else:
                        raise NoViableAltException(self)

                    self.state = 336
                    _la = self._input.LA(1)
                    if _la==ModelicaParser.T__38:
                        self.state = 333
                        self.constraining_clause()
                        self.state = 334
                        self.comment()



                else:
                    raise NoViableAltException(self)


            else:
                raise NoViableAltException(self)

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

    class Import_clauseContext(ParserRuleContext):

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

        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def import_list(self):
            return self.getTypedRuleContext(ModelicaParser.Import_listContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_import_clause

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

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




    def import_clause(self):

        localctx = ModelicaParser.Import_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_import_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 342
            self.match(ModelicaParser.T__33)
            self.state = 357
            la_ = self._interp.adaptivePredict(self._input,40,self._ctx)
            if la_ == 1:
                self.state = 343
                self.match(ModelicaParser.IDENT)
                self.state = 344
                self.match(ModelicaParser.T__18)
                self.state = 345
                self.name()
                pass

            elif la_ == 2:
                self.state = 346
                self.name()
                self.state = 355
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__34:
                    self.state = 347
                    self.match(ModelicaParser.T__34)
                    self.state = 353
                    token = self._input.LA(1)
                    if token in [ModelicaParser.T__35]:
                        self.state = 348
                        self.match(ModelicaParser.T__35)

                    elif token in [ModelicaParser.T__36]:
                        self.state = 349
                        self.match(ModelicaParser.T__36)
                        self.state = 350
                        self.import_list()
                        self.state = 351
                        self.match(ModelicaParser.T__37)

                    else:
                        raise NoViableAltException(self)



                pass


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

    class Import_listContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

        def import_list(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Import_listContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Import_listContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_import_list

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

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




    def import_list(self):

        localctx = ModelicaParser.Import_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_import_list)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 361
            self.match(ModelicaParser.IDENT)
            self.state = 366
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,41,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 362
                    self.match(ModelicaParser.T__24)
                    self.state = 363
                    self.import_list() 
                self.state = 368
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,41,self._ctx)

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

    class Extends_clauseContext(ParserRuleContext):

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

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def class_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Class_modificationContext,0)


        def annotation(self):
            return self.getTypedRuleContext(ModelicaParser.AnnotationContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_extends_clause

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

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




    def extends_clause(self):

        localctx = ModelicaParser.Extends_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_extends_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 369
            self.match(ModelicaParser.T__25)
            self.state = 370
            self.name()
            self.state = 372
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__20:
                self.state = 371
                self.class_modification()


            self.state = 375
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__86:
                self.state = 374
                self.annotation()


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

    class Constraining_clauseContext(ParserRuleContext):

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

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def class_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Class_modificationContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_constraining_clause

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

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




    def constraining_clause(self):

        localctx = ModelicaParser.Constraining_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_constraining_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 377
            self.match(ModelicaParser.T__38)
            self.state = 378
            self.name()
            self.state = 380
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__20:
                self.state = 379
                self.class_modification()


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

    class Component_clauseContext(ParserRuleContext):

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

        def type_prefix(self):
            return self.getTypedRuleContext(ModelicaParser.Type_prefixContext,0)


        def type_specifier(self):
            return self.getTypedRuleContext(ModelicaParser.Type_specifierContext,0)


        def component_list(self):
            return self.getTypedRuleContext(ModelicaParser.Component_listContext,0)


        def array_subscripts(self):
            return self.getTypedRuleContext(ModelicaParser.Array_subscriptsContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_component_clause

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

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




    def component_clause(self):

        localctx = ModelicaParser.Component_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_component_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 382
            self.type_prefix()
            self.state = 383
            self.type_specifier()
            self.state = 385
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__84:
                self.state = 384
                self.array_subscripts()


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

    class Type_prefixContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_type_prefix

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

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




    def type_prefix(self):

        localctx = ModelicaParser.Type_prefixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_type_prefix)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 390
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__39 or _la==ModelicaParser.T__40:
                self.state = 389
                _la = self._input.LA(1)
                if not(_la==ModelicaParser.T__39 or _la==ModelicaParser.T__40):
                    self._errHandler.recoverInline(self)
                else:
                    self.consume()


            self.state = 393
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__41) | (1 << ModelicaParser.T__42) | (1 << ModelicaParser.T__43))) != 0):
                self.state = 392
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__41) | (1 << ModelicaParser.T__42) | (1 << ModelicaParser.T__43))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self.consume()


            self.state = 396
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__44 or _la==ModelicaParser.T__45:
                self.state = 395
                _la = self._input.LA(1)
                if not(_la==ModelicaParser.T__44 or _la==ModelicaParser.T__45):
                    self._errHandler.recoverInline(self)
                else:
                    self.consume()


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

    class Type_specifierContext(ParserRuleContext):

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

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_type_specifier

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

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




    def type_specifier(self):

        localctx = ModelicaParser.Type_specifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_type_specifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 398
            self.name()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Component_listContext(ParserRuleContext):

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

        def component_declaration(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Component_declarationContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Component_declarationContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_component_list

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

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




    def component_list(self):

        localctx = ModelicaParser.Component_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_component_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 400
            self.component_declaration()
            self.state = 405
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__24:
                self.state = 401
                self.match(ModelicaParser.T__24)
                self.state = 402
                self.component_declaration()
                self.state = 407
                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 Component_declarationContext(ParserRuleContext):

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

        def declaration(self):
            return self.getTypedRuleContext(ModelicaParser.DeclarationContext,0)


        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def condition_attribute(self):
            return self.getTypedRuleContext(ModelicaParser.Condition_attributeContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_component_declaration

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

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




    def component_declaration(self):

        localctx = ModelicaParser.Component_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_component_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 408
            self.declaration()
            self.state = 410
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__46:
                self.state = 409
                self.condition_attribute()


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

    class Condition_attributeContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_condition_attribute

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

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




    def condition_attribute(self):

        localctx = ModelicaParser.Condition_attributeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_condition_attribute)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 414
            self.match(ModelicaParser.T__46)
            self.state = 415
            self.expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class DeclarationContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

        def array_subscripts(self):
            return self.getTypedRuleContext(ModelicaParser.Array_subscriptsContext,0)


        def modification(self):
            return self.getTypedRuleContext(ModelicaParser.ModificationContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_declaration

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

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




    def declaration(self):

        localctx = ModelicaParser.DeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 417
            self.match(ModelicaParser.IDENT)
            self.state = 419
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__84:
                self.state = 418
                self.array_subscripts()


            self.state = 422
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__18) | (1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__47))) != 0):
                self.state = 421
                self.modification()


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

    class ModificationContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_modification

     
        def copyFrom(self, ctx):
            super(ModelicaParser.ModificationContext, self).copyFrom(ctx)



    class Modification_assignmentContext(ModificationContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ModificationContext)
            super(ModelicaParser.Modification_assignmentContext, self).__init__(parser)
            self.copyFrom(ctx)

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


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

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


    class Modification_assignment2Context(ModificationContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ModificationContext)
            super(ModelicaParser.Modification_assignment2Context, self).__init__(parser)
            self.copyFrom(ctx)

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


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

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


    class Modification_classContext(ModificationContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ModificationContext)
            super(ModelicaParser.Modification_classContext, self).__init__(parser)
            self.copyFrom(ctx)

        def class_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Class_modificationContext,0)

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


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

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



    def modification(self):

        localctx = ModelicaParser.ModificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_modification)
        self._la = 0 # Token type
        try:
            self.state = 433
            token = self._input.LA(1)
            if token in [ModelicaParser.T__20]:
                localctx = ModelicaParser.Modification_classContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 424
                self.class_modification()
                self.state = 427
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__18:
                    self.state = 425
                    self.match(ModelicaParser.T__18)
                    self.state = 426
                    self.expression()



            elif token in [ModelicaParser.T__18]:
                localctx = ModelicaParser.Modification_assignmentContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 429
                self.match(ModelicaParser.T__18)
                self.state = 430
                self.expression()

            elif token in [ModelicaParser.T__47]:
                localctx = ModelicaParser.Modification_assignment2Context(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 431
                self.match(ModelicaParser.T__47)
                self.state = 432
                self.expression()

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

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

        def argument_list(self):
            return self.getTypedRuleContext(ModelicaParser.Argument_listContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_class_modification

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

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




    def class_modification(self):

        localctx = ModelicaParser.Class_modificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_class_modification)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 435
            self.match(ModelicaParser.T__20)
            self.state = 437
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__2) | (1 << ModelicaParser.T__29) | (1 << ModelicaParser.T__32) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__48))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 436
                self.argument_list()


            self.state = 439
            self.match(ModelicaParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Argument_listContext(ParserRuleContext):

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

        def argument(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.ArgumentContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.ArgumentContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_argument_list

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

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




    def argument_list(self):

        localctx = ModelicaParser.Argument_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_argument_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 441
            self.argument()
            self.state = 446
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__24:
                self.state = 442
                self.match(ModelicaParser.T__24)
                self.state = 443
                self.argument()
                self.state = 448
                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 ArgumentContext(ParserRuleContext):

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

        def element_modification_or_replaceable(self):
            return self.getTypedRuleContext(ModelicaParser.Element_modification_or_replaceableContext,0)


        def element_redeclaration(self):
            return self.getTypedRuleContext(ModelicaParser.Element_redeclarationContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_argument

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

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




    def argument(self):

        localctx = ModelicaParser.ArgumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_argument)
        try:
            self.state = 451
            token = self._input.LA(1)
            if token in [ModelicaParser.T__2, ModelicaParser.T__32, ModelicaParser.T__34, ModelicaParser.T__48, ModelicaParser.IDENT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 449
                self.element_modification_or_replaceable()

            elif token in [ModelicaParser.T__29]:
                self.enterOuterAlt(localctx, 2)
                self.state = 450
                self.element_redeclaration()

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

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

        def element_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Element_modificationContext,0)


        def element_replaceable(self):
            return self.getTypedRuleContext(ModelicaParser.Element_replaceableContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_element_modification_or_replaceable

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

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




    def element_modification_or_replaceable(self):

        localctx = ModelicaParser.Element_modification_or_replaceableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_element_modification_or_replaceable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 454
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__48:
                self.state = 453
                self.match(ModelicaParser.T__48)


            self.state = 457
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__2:
                self.state = 456
                self.match(ModelicaParser.T__2)


            self.state = 461
            token = self._input.LA(1)
            if token in [ModelicaParser.T__34, ModelicaParser.IDENT]:
                self.state = 459
                self.element_modification()

            elif token in [ModelicaParser.T__32]:
                self.state = 460
                self.element_replaceable()

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

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

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def string_comment(self):
            return self.getTypedRuleContext(ModelicaParser.String_commentContext,0)


        def modification(self):
            return self.getTypedRuleContext(ModelicaParser.ModificationContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_element_modification

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

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




    def element_modification(self):

        localctx = ModelicaParser.Element_modificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_element_modification)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 463
            self.name()
            self.state = 465
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__18) | (1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__47))) != 0):
                self.state = 464
                self.modification()


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

    class Element_redeclarationContext(ParserRuleContext):

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

        def element_replaceable(self):
            return self.getTypedRuleContext(ModelicaParser.Element_replaceableContext,0)


        def short_class_definition(self):
            return self.getTypedRuleContext(ModelicaParser.Short_class_definitionContext,0)


        def component_clause1(self):
            return self.getTypedRuleContext(ModelicaParser.Component_clause1Context,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_element_redeclaration

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

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




    def element_redeclaration(self):

        localctx = ModelicaParser.Element_redeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_element_redeclaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 469
            self.match(ModelicaParser.T__29)
            self.state = 471
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__48:
                self.state = 470
                self.match(ModelicaParser.T__48)


            self.state = 474
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__2:
                self.state = 473
                self.match(ModelicaParser.T__2)


            self.state = 481
            token = self._input.LA(1)
            if token in [ModelicaParser.T__4, ModelicaParser.T__5, ModelicaParser.T__6, ModelicaParser.T__7, ModelicaParser.T__8, ModelicaParser.T__9, ModelicaParser.T__10, ModelicaParser.T__11, ModelicaParser.T__12, ModelicaParser.T__13, ModelicaParser.T__14, ModelicaParser.T__15, ModelicaParser.T__16, ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                self.state = 478
                token = self._input.LA(1)
                if token in [ModelicaParser.T__4, ModelicaParser.T__5, ModelicaParser.T__6, ModelicaParser.T__7, ModelicaParser.T__8, ModelicaParser.T__9, ModelicaParser.T__10, ModelicaParser.T__11, ModelicaParser.T__12, ModelicaParser.T__13, ModelicaParser.T__14, ModelicaParser.T__15, ModelicaParser.T__16]:
                    self.state = 476
                    self.short_class_definition()

                elif token in [ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                    self.state = 477
                    self.component_clause1()

                else:
                    raise NoViableAltException(self)


            elif token in [ModelicaParser.T__32]:
                self.state = 480
                self.element_replaceable()

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

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

        def short_class_definition(self):
            return self.getTypedRuleContext(ModelicaParser.Short_class_definitionContext,0)


        def component_clause1(self):
            return self.getTypedRuleContext(ModelicaParser.Component_clause1Context,0)


        def constraining_clause(self):
            return self.getTypedRuleContext(ModelicaParser.Constraining_clauseContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_element_replaceable

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

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




    def element_replaceable(self):

        localctx = ModelicaParser.Element_replaceableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_element_replaceable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 483
            self.match(ModelicaParser.T__32)
            self.state = 486
            token = self._input.LA(1)
            if token in [ModelicaParser.T__4, ModelicaParser.T__5, ModelicaParser.T__6, ModelicaParser.T__7, ModelicaParser.T__8, ModelicaParser.T__9, ModelicaParser.T__10, ModelicaParser.T__11, ModelicaParser.T__12, ModelicaParser.T__13, ModelicaParser.T__14, ModelicaParser.T__15, ModelicaParser.T__16]:
                self.state = 484
                self.short_class_definition()

            elif token in [ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                self.state = 485
                self.component_clause1()

            else:
                raise NoViableAltException(self)

            self.state = 489
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__38:
                self.state = 488
                self.constraining_clause()


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

    class Component_clause1Context(ParserRuleContext):

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

        def type_prefix(self):
            return self.getTypedRuleContext(ModelicaParser.Type_prefixContext,0)


        def type_specifier(self):
            return self.getTypedRuleContext(ModelicaParser.Type_specifierContext,0)


        def component_declaration1(self):
            return self.getTypedRuleContext(ModelicaParser.Component_declaration1Context,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_component_clause1

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

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




    def component_clause1(self):

        localctx = ModelicaParser.Component_clause1Context(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_component_clause1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 491
            self.type_prefix()
            self.state = 492
            self.type_specifier()
            self.state = 493
            self.component_declaration1()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Component_declaration1Context(ParserRuleContext):

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

        def declaration(self):
            return self.getTypedRuleContext(ModelicaParser.DeclarationContext,0)


        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_component_declaration1

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

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




    def component_declaration1(self):

        localctx = ModelicaParser.Component_declaration1Context(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_component_declaration1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 495
            self.declaration()
            self.state = 496
            self.comment()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Short_class_definitionContext(ParserRuleContext):

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

        def class_prefixes(self):
            return self.getTypedRuleContext(ModelicaParser.Class_prefixesContext,0)


        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

        def base_prefix(self):
            return self.getTypedRuleContext(ModelicaParser.Base_prefixContext,0)


        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)


        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def array_subscripts(self):
            return self.getTypedRuleContext(ModelicaParser.Array_subscriptsContext,0)


        def class_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Class_modificationContext,0)


        def enum_list(self):
            return self.getTypedRuleContext(ModelicaParser.Enum_listContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_short_class_definition

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

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




    def short_class_definition(self):

        localctx = ModelicaParser.Short_class_definitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_short_class_definition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 498
            self.class_prefixes()
            self.state = 499
            self.match(ModelicaParser.IDENT)
            self.state = 500
            self.match(ModelicaParser.T__18)
            self.state = 521
            token = self._input.LA(1)
            if token in [ModelicaParser.T__34, ModelicaParser.T__39, ModelicaParser.T__40, ModelicaParser.T__41, ModelicaParser.T__42, ModelicaParser.T__43, ModelicaParser.T__44, ModelicaParser.T__45, ModelicaParser.IDENT]:
                self.state = 501
                self.base_prefix()
                self.state = 502
                self.name()
                self.state = 504
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__84:
                    self.state = 503
                    self.array_subscripts()


                self.state = 507
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__20:
                    self.state = 506
                    self.class_modification()


                self.state = 509
                self.comment()

            elif token in [ModelicaParser.T__19]:
                self.state = 511
                self.match(ModelicaParser.T__19)
                self.state = 512
                self.match(ModelicaParser.T__20)
                self.state = 517
                token = self._input.LA(1)
                if token in [ModelicaParser.T__22, ModelicaParser.IDENT]:
                    self.state = 514
                    _la = self._input.LA(1)
                    if _la==ModelicaParser.IDENT:
                        self.state = 513
                        self.enum_list()



                elif token in [ModelicaParser.T__21]:
                    self.state = 516
                    self.match(ModelicaParser.T__21)

                else:
                    raise NoViableAltException(self)

                self.state = 519
                self.match(ModelicaParser.T__22)
                self.state = 520
                self.comment()

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

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

        def equation(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.EquationContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.EquationContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_equation_section

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

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




    def equation_section(self):

        localctx = ModelicaParser.Equation_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_equation_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 524
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__49:
                self.state = 523
                self.match(ModelicaParser.T__49)


            self.state = 526
            self.match(ModelicaParser.T__50)
            self.state = 532
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,74,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 527
                    self.equation()
                    self.state = 528
                    self.match(ModelicaParser.T__1) 
                self.state = 534
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,74,self._ctx)

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

    class Algorithm_sectionContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_algorithm_section

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

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




    def algorithm_section(self):

        localctx = ModelicaParser.Algorithm_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_algorithm_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 536
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__49:
                self.state = 535
                self.match(ModelicaParser.T__49)


            self.state = 538
            self.match(ModelicaParser.T__51)
            self.state = 544
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 539
                self.statement()
                self.state = 540
                self.match(ModelicaParser.T__1)
                self.state = 546
                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 Equation_optionsContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_equation_options

     
        def copyFrom(self, ctx):
            super(ModelicaParser.Equation_optionsContext, self).copyFrom(ctx)



    class Equation_functionContext(Equation_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Equation_optionsContext)
            super(ModelicaParser.Equation_functionContext, self).__init__(parser)
            self.copyFrom(ctx)

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)

        def function_call_args(self):
            return self.getTypedRuleContext(ModelicaParser.Function_call_argsContext,0)


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

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


    class Equation_whenContext(Equation_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Equation_optionsContext)
            super(ModelicaParser.Equation_whenContext, self).__init__(parser)
            self.copyFrom(ctx)

        def when_equation(self):
            return self.getTypedRuleContext(ModelicaParser.When_equationContext,0)


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

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


    class Equation_connect_clauseContext(Equation_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Equation_optionsContext)
            super(ModelicaParser.Equation_connect_clauseContext, self).__init__(parser)
            self.copyFrom(ctx)

        def connect_clause(self):
            return self.getTypedRuleContext(ModelicaParser.Connect_clauseContext,0)


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

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


    class Equation_simpleContext(Equation_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Equation_optionsContext)
            super(ModelicaParser.Equation_simpleContext, self).__init__(parser)
            self.copyFrom(ctx)

        def simple_expression(self):
            return self.getTypedRuleContext(ModelicaParser.Simple_expressionContext,0)

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


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

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


    class Equation_forContext(Equation_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Equation_optionsContext)
            super(ModelicaParser.Equation_forContext, self).__init__(parser)
            self.copyFrom(ctx)

        def for_equation(self):
            return self.getTypedRuleContext(ModelicaParser.For_equationContext,0)


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

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


    class Equation_ifContext(Equation_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Equation_optionsContext)
            super(ModelicaParser.Equation_ifContext, self).__init__(parser)
            self.copyFrom(ctx)

        def if_equation(self):
            return self.getTypedRuleContext(ModelicaParser.If_equationContext,0)


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

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



    def equation_options(self):

        localctx = ModelicaParser.Equation_optionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_equation_options)
        try:
            self.state = 558
            la_ = self._interp.adaptivePredict(self._input,77,self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Equation_simpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 547
                self.simple_expression()
                self.state = 548
                self.match(ModelicaParser.T__18)
                self.state = 549
                self.expression()
                pass

            elif la_ == 2:
                localctx = ModelicaParser.Equation_ifContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 551
                self.if_equation()
                pass

            elif la_ == 3:
                localctx = ModelicaParser.Equation_forContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 552
                self.for_equation()
                pass

            elif la_ == 4:
                localctx = ModelicaParser.Equation_connect_clauseContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 553
                self.connect_clause()
                pass

            elif la_ == 5:
                localctx = ModelicaParser.Equation_whenContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 554
                self.when_equation()
                pass

            elif la_ == 6:
                localctx = ModelicaParser.Equation_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 555
                self.name()
                self.state = 556
                self.function_call_args()
                pass


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

    class EquationContext(ParserRuleContext):

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

        def equation_options(self):
            return self.getTypedRuleContext(ModelicaParser.Equation_optionsContext,0)


        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_equation

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

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




    def equation(self):

        localctx = ModelicaParser.EquationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_equation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 560
            self.equation_options()
            self.state = 561
            self.comment()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Statement_optionsContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_statement_options

     
        def copyFrom(self, ctx):
            super(ModelicaParser.Statement_optionsContext, self).copyFrom(ctx)



    class Statement_forContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_forContext, self).__init__(parser)
            self.copyFrom(ctx)

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


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

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


    class Statement_returnContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_returnContext, self).__init__(parser)
            self.copyFrom(ctx)


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

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


    class Statement_component_referenceContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_component_referenceContext, self).__init__(parser)
            self.copyFrom(ctx)

        def component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext,0)

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

        def function_call_args(self):
            return self.getTypedRuleContext(ModelicaParser.Function_call_argsContext,0)


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

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


    class Statement_component_functionContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_component_functionContext, self).__init__(parser)
            self.copyFrom(ctx)

        def output_expression_list(self):
            return self.getTypedRuleContext(ModelicaParser.Output_expression_listContext,0)

        def component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext,0)

        def function_call_args(self):
            return self.getTypedRuleContext(ModelicaParser.Function_call_argsContext,0)


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

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


    class Statement_ifContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_ifContext, self).__init__(parser)
            self.copyFrom(ctx)

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


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

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


    class Statement_whenContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_whenContext, self).__init__(parser)
            self.copyFrom(ctx)

        def when_statement(self):
            return self.getTypedRuleContext(ModelicaParser.When_statementContext,0)


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

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


    class Statement_whileContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_whileContext, self).__init__(parser)
            self.copyFrom(ctx)

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


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

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


    class Statement_breakContext(Statement_optionsContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Statement_optionsContext)
            super(ModelicaParser.Statement_breakContext, self).__init__(parser)
            self.copyFrom(ctx)


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

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



    def statement_options(self):

        localctx = ModelicaParser.Statement_optionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_statement_options)
        try:
            self.state = 582
            token = self._input.LA(1)
            if token in [ModelicaParser.T__34, ModelicaParser.IDENT]:
                localctx = ModelicaParser.Statement_component_referenceContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 563
                self.component_reference()
                self.state = 567
                token = self._input.LA(1)
                if token in [ModelicaParser.T__47]:
                    self.state = 564
                    self.match(ModelicaParser.T__47)
                    self.state = 565
                    self.expression()

                elif token in [ModelicaParser.T__20]:
                    self.state = 566
                    self.function_call_args()

                else:
                    raise NoViableAltException(self)


            elif token in [ModelicaParser.T__20]:
                localctx = ModelicaParser.Statement_component_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 569
                self.match(ModelicaParser.T__20)
                self.state = 570
                self.output_expression_list()
                self.state = 571
                self.match(ModelicaParser.T__22)
                self.state = 572
                self.match(ModelicaParser.T__47)
                self.state = 573
                self.component_reference()
                self.state = 574
                self.function_call_args()

            elif token in [ModelicaParser.T__52]:
                localctx = ModelicaParser.Statement_breakContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 576
                self.match(ModelicaParser.T__52)

            elif token in [ModelicaParser.T__53]:
                localctx = ModelicaParser.Statement_returnContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 577
                self.match(ModelicaParser.T__53)

            elif token in [ModelicaParser.T__46]:
                localctx = ModelicaParser.Statement_ifContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 578
                self.if_statement()

            elif token in [ModelicaParser.T__57]:
                localctx = ModelicaParser.Statement_forContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 579
                self.for_statement()

            elif token in [ModelicaParser.T__60]:
                localctx = ModelicaParser.Statement_whileContext(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 580
                self.while_statement()

            elif token in [ModelicaParser.T__61]:
                localctx = ModelicaParser.Statement_whenContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 581
                self.when_statement()

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

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

        def statement_options(self):
            return self.getTypedRuleContext(ModelicaParser.Statement_optionsContext,0)


        def comment(self):
            return self.getTypedRuleContext(ModelicaParser.CommentContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_statement

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

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




    def statement(self):

        localctx = ModelicaParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 584
            self.statement_options()
            self.state = 585
            self.comment()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class If_equationContext(ParserRuleContext):

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

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


        def equation(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.EquationContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.EquationContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_if_equation

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

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




    def if_equation(self):

        localctx = ModelicaParser.If_equationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_if_equation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 587
            self.match(ModelicaParser.T__46)
            self.state = 588
            self.expression()
            self.state = 589
            self.match(ModelicaParser.T__54)
            self.state = 595
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,80,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 590
                    self.equation()
                    self.state = 591
                    self.match(ModelicaParser.T__1) 
                self.state = 597
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,80,self._ctx)

            self.state = 611
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__55:
                self.state = 598
                self.match(ModelicaParser.T__55)
                self.state = 599
                self.expression()
                self.state = 600
                self.match(ModelicaParser.T__54)
                self.state = 606
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,81,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 601
                        self.equation()
                        self.state = 602
                        self.match(ModelicaParser.T__1) 
                    self.state = 608
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,81,self._ctx)

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

            self.state = 623
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__56:
                self.state = 614
                self.match(ModelicaParser.T__56)
                self.state = 620
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,83,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 615
                        self.equation()
                        self.state = 616
                        self.match(ModelicaParser.T__1) 
                    self.state = 622
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,83,self._ctx)



            self.state = 625
            self.match(ModelicaParser.T__17)
            self.state = 626
            self.match(ModelicaParser.T__46)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class If_statementContext(ParserRuleContext):

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

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


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


        def getRuleIndex(self):
            return ModelicaParser.RULE_if_statement

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

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




    def if_statement(self):

        localctx = ModelicaParser.If_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_if_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 628
            self.match(ModelicaParser.T__46)
            self.state = 629
            self.expression()
            self.state = 630
            self.match(ModelicaParser.T__54)
            self.state = 636
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 631
                self.statement()
                self.state = 632
                self.match(ModelicaParser.T__1)
                self.state = 638
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 652
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__55:
                self.state = 639
                self.match(ModelicaParser.T__55)
                self.state = 640
                self.expression()
                self.state = 641
                self.match(ModelicaParser.T__54)
                self.state = 647
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                    self.state = 642
                    self.statement()
                    self.state = 643
                    self.match(ModelicaParser.T__1)
                    self.state = 649
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            self.state = 664
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__56:
                self.state = 655
                self.match(ModelicaParser.T__56)
                self.state = 661
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                    self.state = 656
                    self.statement()
                    self.state = 657
                    self.match(ModelicaParser.T__1)
                    self.state = 663
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 666
            self.match(ModelicaParser.T__17)
            self.state = 667
            self.match(ModelicaParser.T__46)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class For_equationContext(ParserRuleContext):

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

        def for_indices(self):
            return self.getTypedRuleContext(ModelicaParser.For_indicesContext,0)


        def equation(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.EquationContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.EquationContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_for_equation

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

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




    def for_equation(self):

        localctx = ModelicaParser.For_equationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_for_equation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 669
            self.match(ModelicaParser.T__57)
            self.state = 670
            self.for_indices()
            self.state = 671
            self.match(ModelicaParser.T__58)
            self.state = 677
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,90,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 672
                    self.equation()
                    self.state = 673
                    self.match(ModelicaParser.T__1) 
                self.state = 679
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,90,self._ctx)

            self.state = 680
            self.match(ModelicaParser.T__17)
            self.state = 681
            self.match(ModelicaParser.T__57)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class For_statementContext(ParserRuleContext):

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

        def for_indices(self):
            return self.getTypedRuleContext(ModelicaParser.For_indicesContext,0)


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


        def getRuleIndex(self):
            return ModelicaParser.RULE_for_statement

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

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




    def for_statement(self):

        localctx = ModelicaParser.For_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_for_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 683
            self.match(ModelicaParser.T__57)
            self.state = 684
            self.for_indices()
            self.state = 685
            self.match(ModelicaParser.T__58)
            self.state = 691
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 686
                self.statement()
                self.state = 687
                self.match(ModelicaParser.T__1)
                self.state = 693
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 694
            self.match(ModelicaParser.T__17)
            self.state = 695
            self.match(ModelicaParser.T__57)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class For_indicesContext(ParserRuleContext):

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

        def for_index(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.For_indexContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.For_indexContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_for_indices

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

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




    def for_indices(self):

        localctx = ModelicaParser.For_indicesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_for_indices)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 697
            self.for_index()
            self.state = 702
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,92,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 698
                    self.match(ModelicaParser.T__24)
                    self.state = 699
                    self.for_index() 
                self.state = 704
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,92,self._ctx)

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

    class For_indexContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_for_index

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

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




    def for_index(self):

        localctx = ModelicaParser.For_indexContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_for_index)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 705
            self.match(ModelicaParser.IDENT)
            self.state = 708
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__59:
                self.state = 706
                self.match(ModelicaParser.T__59)
                self.state = 707
                self.expression()


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

    class While_statementContext(ParserRuleContext):

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

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


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


        def getRuleIndex(self):
            return ModelicaParser.RULE_while_statement

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

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




    def while_statement(self):

        localctx = ModelicaParser.While_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_while_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 710
            self.match(ModelicaParser.T__60)
            self.state = 711
            self.expression()
            self.state = 712
            self.match(ModelicaParser.T__58)
            self.state = 718
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 713
                self.statement()
                self.state = 714
                self.match(ModelicaParser.T__1)
                self.state = 720
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 721
            self.match(ModelicaParser.T__17)
            self.state = 722
            self.match(ModelicaParser.T__60)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class When_equationContext(ParserRuleContext):

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

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


        def equation(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.EquationContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.EquationContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_when_equation

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

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




    def when_equation(self):

        localctx = ModelicaParser.When_equationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_when_equation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 724
            self.match(ModelicaParser.T__61)
            self.state = 725
            self.expression()
            self.state = 726
            self.match(ModelicaParser.T__54)
            self.state = 732
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,95,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 727
                    self.equation()
                    self.state = 728
                    self.match(ModelicaParser.T__1) 
                self.state = 734
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,95,self._ctx)

            self.state = 748
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__62:
                self.state = 735
                self.match(ModelicaParser.T__62)
                self.state = 736
                self.expression()
                self.state = 737
                self.match(ModelicaParser.T__54)
                self.state = 743
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,96,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 738
                        self.equation()
                        self.state = 739
                        self.match(ModelicaParser.T__1) 
                    self.state = 745
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,96,self._ctx)

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

            self.state = 751
            self.match(ModelicaParser.T__17)
            self.state = 752
            self.match(ModelicaParser.T__61)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class When_statementContext(ParserRuleContext):

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

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


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


        def getRuleIndex(self):
            return ModelicaParser.RULE_when_statement

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

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




    def when_statement(self):

        localctx = ModelicaParser.When_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_when_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 754
            self.match(ModelicaParser.T__61)
            self.state = 755
            self.expression()
            self.state = 756
            self.match(ModelicaParser.T__54)
            self.state = 762
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 757
                self.statement()
                self.state = 758
                self.match(ModelicaParser.T__1)
                self.state = 764
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 778
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__62:
                self.state = 765
                self.match(ModelicaParser.T__62)
                self.state = 766
                self.expression()
                self.state = 767
                self.match(ModelicaParser.T__54)
                self.state = 773
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__52) | (1 << ModelicaParser.T__53) | (1 << ModelicaParser.T__57) | (1 << ModelicaParser.T__60) | (1 << ModelicaParser.T__61))) != 0) or _la==ModelicaParser.IDENT:
                    self.state = 768
                    self.statement()
                    self.state = 769
                    self.match(ModelicaParser.T__1)
                    self.state = 775
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            self.state = 781
            self.match(ModelicaParser.T__17)
            self.state = 782
            self.match(ModelicaParser.T__61)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Connect_clauseContext(ParserRuleContext):

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

        def component_reference(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Component_referenceContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Component_referenceContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_connect_clause

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

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




    def connect_clause(self):

        localctx = ModelicaParser.Connect_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_connect_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 784
            self.match(ModelicaParser.T__63)
            self.state = 785
            self.match(ModelicaParser.T__20)
            self.state = 786
            self.component_reference()
            self.state = 787
            self.match(ModelicaParser.T__24)
            self.state = 788
            self.component_reference()
            self.state = 789
            self.match(ModelicaParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ExpressionContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_expression

     
        def copyFrom(self, ctx):
            super(ModelicaParser.ExpressionContext, self).copyFrom(ctx)



    class Expression_simpleContext(ExpressionContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ExpressionContext)
            super(ModelicaParser.Expression_simpleContext, self).__init__(parser)
            self.copyFrom(ctx)

        def simple_expression(self):
            return self.getTypedRuleContext(ModelicaParser.Simple_expressionContext,0)


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

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


    class Expression_ifContext(ExpressionContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ExpressionContext)
            super(ModelicaParser.Expression_ifContext, self).__init__(parser)
            self.copyFrom(ctx)

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


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

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



    def expression(self):

        localctx = ModelicaParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_expression)
        self._la = 0 # Token type
        try:
            self.state = 809
            token = self._input.LA(1)
            if token in [ModelicaParser.T__17, ModelicaParser.T__20, ModelicaParser.T__23, ModelicaParser.T__34, ModelicaParser.T__36, ModelicaParser.T__49, ModelicaParser.T__64, ModelicaParser.T__79, ModelicaParser.T__82, ModelicaParser.T__83, ModelicaParser.T__84, ModelicaParser.IDENT, ModelicaParser.STRING, ModelicaParser.UNSIGNED_NUMBER]:
                localctx = ModelicaParser.Expression_simpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 791
                self.simple_expression()

            elif token in [ModelicaParser.T__46]:
                localctx = ModelicaParser.Expression_ifContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 792
                self.match(ModelicaParser.T__46)
                self.state = 793
                self.expression()
                self.state = 794
                self.match(ModelicaParser.T__54)
                self.state = 795
                self.expression()
                self.state = 803
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__55:
                    self.state = 796
                    self.match(ModelicaParser.T__55)
                    self.state = 797
                    self.expression()
                    self.state = 798
                    self.match(ModelicaParser.T__54)
                    self.state = 799
                    self.expression()
                    self.state = 805
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 806
                self.match(ModelicaParser.T__56)
                self.state = 807
                self.expression()

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

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

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_simple_expression

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

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




    def simple_expression(self):

        localctx = ModelicaParser.Simple_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_simple_expression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 811
            self.expr(0)
            self.state = 818
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__21:
                self.state = 812
                self.match(ModelicaParser.T__21)
                self.state = 813
                self.expr(0)
                self.state = 816
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__21:
                    self.state = 814
                    self.match(ModelicaParser.T__21)
                    self.state = 815
                    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 ExprContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_expr

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


    class Expr_orContext(ExprContext):

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

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


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

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


    class Expr_primaryContext(ExprContext):

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

        def primary(self):
            return self.getTypedRuleContext(ModelicaParser.PrimaryContext,0)


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

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


    class Expr_andContext(ExprContext):

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

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


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

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


    class Expr_relContext(ExprContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ExprContext)
            super(ModelicaParser.Expr_relContext, self).__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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


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

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


    class Expr_negContext(ExprContext):

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

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


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

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


    class Expr_notContext(ExprContext):

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

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


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

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


    class Expr_mulContext(ExprContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ExprContext)
            super(ModelicaParser.Expr_mulContext, self).__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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


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

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


    class Expr_addContext(ExprContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ExprContext)
            super(ModelicaParser.Expr_addContext, self).__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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


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

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


    class Expr_expContext(ExprContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ExprContext)
            super(ModelicaParser.Expr_expContext, self).__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

        def primary(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.PrimaryContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.PrimaryContext,i)


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

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



    def expr(self, _p=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ModelicaParser.ExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 104
        self.enterRecursionRule(localctx, 104, self.RULE_expr, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 830
            la_ = self._interp.adaptivePredict(self._input,105,self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Expr_negContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 821
                self.match(ModelicaParser.T__64)
                self.state = 822
                self.expr(9)
                pass

            elif la_ == 2:
                localctx = ModelicaParser.Expr_notContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 823
                self.match(ModelicaParser.T__79)
                self.state = 824
                self.expr(4)
                pass

            elif la_ == 3:
                localctx = ModelicaParser.Expr_expContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 825
                self.primary()
                self.state = 826
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==ModelicaParser.T__65 or _la==ModelicaParser.T__66):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self.consume()
                self.state = 827
                self.primary()
                pass

            elif la_ == 4:
                localctx = ModelicaParser.Expr_primaryContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 829
                self.primary()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 849
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,107,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 = 847
                    la_ = self._interp.adaptivePredict(self._input,106,self._ctx)
                    if la_ == 1:
                        localctx = ModelicaParser.Expr_mulContext(self, ModelicaParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 832
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 833
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(((((_la - 36)) & ~0x3f) == 0 and ((1 << (_la - 36)) & ((1 << (ModelicaParser.T__35 - 36)) | (1 << (ModelicaParser.T__67 - 36)) | (1 << (ModelicaParser.T__68 - 36)) | (1 << (ModelicaParser.T__69 - 36)))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self.consume()
                        self.state = 834
                        self.expr(8)
                        pass

                    elif la_ == 2:
                        localctx = ModelicaParser.Expr_addContext(self, ModelicaParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 835
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 836
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (ModelicaParser.T__64 - 65)) | (1 << (ModelicaParser.T__70 - 65)) | (1 << (ModelicaParser.T__71 - 65)) | (1 << (ModelicaParser.T__72 - 65)))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self.consume()
                        self.state = 837
                        self.expr(7)
                        pass

                    elif la_ == 3:
                        localctx = ModelicaParser.Expr_relContext(self, ModelicaParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 838
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 839
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(((((_la - 74)) & ~0x3f) == 0 and ((1 << (_la - 74)) & ((1 << (ModelicaParser.T__73 - 74)) | (1 << (ModelicaParser.T__74 - 74)) | (1 << (ModelicaParser.T__75 - 74)) | (1 << (ModelicaParser.T__76 - 74)) | (1 << (ModelicaParser.T__77 - 74)) | (1 << (ModelicaParser.T__78 - 74)))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self.consume()
                        self.state = 840
                        self.expr(6)
                        pass

                    elif la_ == 4:
                        localctx = ModelicaParser.Expr_andContext(self, ModelicaParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 841
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 842
                        self.match(ModelicaParser.T__80)
                        self.state = 843
                        self.expr(4)
                        pass

                    elif la_ == 5:
                        localctx = ModelicaParser.Expr_orContext(self, ModelicaParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 844
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 845
                        self.match(ModelicaParser.T__81)
                        self.state = 846
                        self.expr(3)
                        pass

             
                self.state = 851
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,107,self._ctx)

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

    class PrimaryContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_primary

     
        def copyFrom(self, ctx):
            super(ModelicaParser.PrimaryContext, self).copyFrom(ctx)



    class Primary_initialContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_initialContext, self).__init__(parser)
            self.copyFrom(ctx)

        def function_call_args(self):
            return self.getTypedRuleContext(ModelicaParser.Function_call_argsContext,0)


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

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


    class Primary_derivativeContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_derivativeContext, self).__init__(parser)
            self.copyFrom(ctx)

        def function_call_args(self):
            return self.getTypedRuleContext(ModelicaParser.Function_call_argsContext,0)


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

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


    class Primary_output_expression_listContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_output_expression_listContext, self).__init__(parser)
            self.copyFrom(ctx)

        def output_expression_list(self):
            return self.getTypedRuleContext(ModelicaParser.Output_expression_listContext,0)


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

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


    class Primary_functionContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_functionContext, self).__init__(parser)
            self.copyFrom(ctx)

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)

        def function_call_args(self):
            return self.getTypedRuleContext(ModelicaParser.Function_call_argsContext,0)


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

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


    class Primary_expression_listContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_expression_listContext, self).__init__(parser)
            self.copyFrom(ctx)

        def expression_list(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Expression_listContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Expression_listContext,i)


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

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


    class Primary_falseContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_falseContext, self).__init__(parser)
            self.copyFrom(ctx)


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

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


    class Primary_function_argumentsContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_function_argumentsContext, self).__init__(parser)
            self.copyFrom(ctx)

        def function_arguments(self):
            return self.getTypedRuleContext(ModelicaParser.Function_argumentsContext,0)


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

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


    class Primary_endContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_endContext, self).__init__(parser)
            self.copyFrom(ctx)


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

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


    class Primary_trueContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_trueContext, self).__init__(parser)
            self.copyFrom(ctx)


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

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


    class Primary_component_referenceContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_component_referenceContext, self).__init__(parser)
            self.copyFrom(ctx)

        def component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext,0)


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

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


    class Primary_stringContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_stringContext, self).__init__(parser)
            self.copyFrom(ctx)

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

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

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


    class Primary_unsigned_numberContext(PrimaryContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.PrimaryContext)
            super(ModelicaParser.Primary_unsigned_numberContext, self).__init__(parser)
            self.copyFrom(ctx)

        def UNSIGNED_NUMBER(self):
            return self.getToken(ModelicaParser.UNSIGNED_NUMBER, 0)

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

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



    def primary(self):

        localctx = ModelicaParser.PrimaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_primary)
        self._la = 0 # Token type
        try:
            self.state = 884
            la_ = self._interp.adaptivePredict(self._input,109,self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Primary_unsigned_numberContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 852
                self.match(ModelicaParser.UNSIGNED_NUMBER)
                pass

            elif la_ == 2:
                localctx = ModelicaParser.Primary_stringContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 853
                self.match(ModelicaParser.STRING)
                pass

            elif la_ == 3:
                localctx = ModelicaParser.Primary_falseContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 854
                self.match(ModelicaParser.T__82)
                pass

            elif la_ == 4:
                localctx = ModelicaParser.Primary_trueContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 855
                self.match(ModelicaParser.T__83)
                pass

            elif la_ == 5:
                localctx = ModelicaParser.Primary_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 856
                self.name()
                self.state = 857
                self.function_call_args()
                pass

            elif la_ == 6:
                localctx = ModelicaParser.Primary_derivativeContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 859
                self.match(ModelicaParser.T__23)
                self.state = 860
                self.function_call_args()
                pass

            elif la_ == 7:
                localctx = ModelicaParser.Primary_initialContext(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 861
                self.match(ModelicaParser.T__49)
                self.state = 862
                self.function_call_args()
                pass

            elif la_ == 8:
                localctx = ModelicaParser.Primary_component_referenceContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 863
                self.component_reference()
                pass

            elif la_ == 9:
                localctx = ModelicaParser.Primary_output_expression_listContext(self, localctx)
                self.enterOuterAlt(localctx, 9)
                self.state = 864
                self.match(ModelicaParser.T__20)
                self.state = 865
                self.output_expression_list()
                self.state = 866
                self.match(ModelicaParser.T__22)
                pass

            elif la_ == 10:
                localctx = ModelicaParser.Primary_expression_listContext(self, localctx)
                self.enterOuterAlt(localctx, 10)
                self.state = 868
                self.match(ModelicaParser.T__84)
                self.state = 869
                self.expression_list()
                self.state = 874
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__1:
                    self.state = 870
                    self.match(ModelicaParser.T__1)
                    self.state = 871
                    self.expression_list()
                    self.state = 876
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 877
                self.match(ModelicaParser.T__85)
                pass

            elif la_ == 11:
                localctx = ModelicaParser.Primary_function_argumentsContext(self, localctx)
                self.enterOuterAlt(localctx, 11)
                self.state = 879
                self.match(ModelicaParser.T__36)
                self.state = 880
                self.function_arguments()
                self.state = 881
                self.match(ModelicaParser.T__37)
                pass

            elif la_ == 12:
                localctx = ModelicaParser.Primary_endContext(self, localctx)
                self.enterOuterAlt(localctx, 12)
                self.state = 883
                self.match(ModelicaParser.T__17)
                pass


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

    class NameContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_name

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

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




    def name(self):

        localctx = ModelicaParser.NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 887
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__34:
                self.state = 886
                self.match(ModelicaParser.T__34)


            self.state = 889
            self.match(ModelicaParser.IDENT)
            self.state = 894
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,111,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 890
                    self.match(ModelicaParser.T__34)
                    self.state = 891
                    self.match(ModelicaParser.IDENT) 
                self.state = 896
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,111,self._ctx)

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

    class Component_referenceContext(ParserRuleContext):

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

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

        def array_subscripts(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Array_subscriptsContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Array_subscriptsContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_component_reference

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

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




    def component_reference(self):

        localctx = ModelicaParser.Component_referenceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_component_reference)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 898
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__34:
                self.state = 897
                self.match(ModelicaParser.T__34)


            self.state = 900
            self.match(ModelicaParser.IDENT)
            self.state = 902
            la_ = self._interp.adaptivePredict(self._input,113,self._ctx)
            if la_ == 1:
                self.state = 901
                self.array_subscripts()


            self.state = 911
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,115,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 904
                    self.match(ModelicaParser.T__34)
                    self.state = 905
                    self.match(ModelicaParser.IDENT)
                    self.state = 907
                    la_ = self._interp.adaptivePredict(self._input,114,self._ctx)
                    if la_ == 1:
                        self.state = 906
                        self.array_subscripts()

             
                self.state = 913
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,115,self._ctx)

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

    class Function_call_argsContext(ParserRuleContext):

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

        def function_arguments(self):
            return self.getTypedRuleContext(ModelicaParser.Function_argumentsContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_function_call_args

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

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




    def function_call_args(self):

        localctx = ModelicaParser.Function_call_argsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_function_call_args)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 914
            self.match(ModelicaParser.T__20)
            self.state = 916
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__17) | (1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__23) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__36) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__49))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (ModelicaParser.T__64 - 65)) | (1 << (ModelicaParser.T__79 - 65)) | (1 << (ModelicaParser.T__82 - 65)) | (1 << (ModelicaParser.T__83 - 65)) | (1 << (ModelicaParser.T__84 - 65)) | (1 << (ModelicaParser.IDENT - 65)) | (1 << (ModelicaParser.STRING - 65)) | (1 << (ModelicaParser.UNSIGNED_NUMBER - 65)))) != 0):
                self.state = 915
                self.function_arguments()


            self.state = 918
            self.match(ModelicaParser.T__22)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Function_argumentsContext(ParserRuleContext):

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

        def function_argument(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Function_argumentContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Function_argumentContext,i)


        def for_indices(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.For_indicesContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.For_indicesContext,i)


        def named_arguments(self):
            return self.getTypedRuleContext(ModelicaParser.Named_argumentsContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_function_arguments

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

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




    def function_arguments(self):

        localctx = ModelicaParser.Function_argumentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_function_arguments)
        self._la = 0 # Token type
        try:
            self.state = 931
            la_ = self._interp.adaptivePredict(self._input,119,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 920
                self.function_argument()
                self.state = 927
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__24 or _la==ModelicaParser.T__57:
                    self.state = 925
                    token = self._input.LA(1)
                    if token in [ModelicaParser.T__24]:
                        self.state = 921
                        self.match(ModelicaParser.T__24)
                        self.state = 922
                        self.function_argument()

                    elif token in [ModelicaParser.T__57]:
                        self.state = 923
                        self.match(ModelicaParser.T__57)
                        self.state = 924
                        self.for_indices()

                    else:
                        raise NoViableAltException(self)

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

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 930
                self.named_arguments()
                pass


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

    class Named_argumentsContext(ParserRuleContext):

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

        def named_argument(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Named_argumentContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Named_argumentContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_named_arguments

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

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




    def named_arguments(self):

        localctx = ModelicaParser.Named_argumentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_named_arguments)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 933
            self.named_argument()
            self.state = 938
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__24:
                self.state = 934
                self.match(ModelicaParser.T__24)
                self.state = 935
                self.named_argument()
                self.state = 940
                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 Named_argumentContext(ParserRuleContext):

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

        def IDENT(self):
            return self.getToken(ModelicaParser.IDENT, 0)

        def function_argument(self):
            return self.getTypedRuleContext(ModelicaParser.Function_argumentContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_named_argument

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

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




    def named_argument(self):

        localctx = ModelicaParser.Named_argumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_named_argument)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 941
            self.match(ModelicaParser.IDENT)
            self.state = 942
            self.match(ModelicaParser.T__18)
            self.state = 943
            self.function_argument()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Function_argumentContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_function_argument

     
        def copyFrom(self, ctx):
            super(ModelicaParser.Function_argumentContext, self).copyFrom(ctx)



    class Argument_functionContext(Function_argumentContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Function_argumentContext)
            super(ModelicaParser.Argument_functionContext, self).__init__(parser)
            self.copyFrom(ctx)

        def name(self):
            return self.getTypedRuleContext(ModelicaParser.NameContext,0)

        def named_arguments(self):
            return self.getTypedRuleContext(ModelicaParser.Named_argumentsContext,0)


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

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


    class Argument_expressionContext(Function_argumentContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.Function_argumentContext)
            super(ModelicaParser.Argument_expressionContext, self).__init__(parser)
            self.copyFrom(ctx)

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


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

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



    def function_argument(self):

        localctx = ModelicaParser.Function_argumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_function_argument)
        self._la = 0 # Token type
        try:
            self.state = 954
            token = self._input.LA(1)
            if token in [ModelicaParser.T__16]:
                localctx = ModelicaParser.Argument_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 945
                self.match(ModelicaParser.T__16)
                self.state = 946
                self.name()
                self.state = 947
                self.match(ModelicaParser.T__20)
                self.state = 949
                _la = self._input.LA(1)
                if _la==ModelicaParser.IDENT:
                    self.state = 948
                    self.named_arguments()


                self.state = 951
                self.match(ModelicaParser.T__22)

            elif token in [ModelicaParser.T__17, ModelicaParser.T__20, ModelicaParser.T__23, ModelicaParser.T__34, ModelicaParser.T__36, ModelicaParser.T__46, ModelicaParser.T__49, ModelicaParser.T__64, ModelicaParser.T__79, ModelicaParser.T__82, ModelicaParser.T__83, ModelicaParser.T__84, ModelicaParser.IDENT, ModelicaParser.STRING, ModelicaParser.UNSIGNED_NUMBER]:
                localctx = ModelicaParser.Argument_expressionContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 953
                self.expression()

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

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

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_output_expression_list

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

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




    def output_expression_list(self):

        localctx = ModelicaParser.Output_expression_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_output_expression_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 957
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__17) | (1 << ModelicaParser.T__20) | (1 << ModelicaParser.T__23) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__36) | (1 << ModelicaParser.T__46) | (1 << ModelicaParser.T__49))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (ModelicaParser.T__64 - 65)) | (1 << (ModelicaParser.T__79 - 65)) | (1 << (ModelicaParser.T__82 - 65)) | (1 << (ModelicaParser.T__83 - 65)) | (1 << (ModelicaParser.T__84 - 65)) | (1 << (ModelicaParser.IDENT - 65)) | (1 << (ModelicaParser.STRING - 65)) | (1 << (ModelicaParser.UNSIGNED_NUMBER - 65)))) != 0):
                self.state = 956
                self.expression()


            self.state = 963
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__24:
                self.state = 959
                self.match(ModelicaParser.T__24)
                self.state = 960
                self.expression()
                self.state = 965
                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 Expression_listContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_expression_list

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

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




    def expression_list(self):

        localctx = ModelicaParser.Expression_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_expression_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 966
            self.expression()
            self.state = 971
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__24:
                self.state = 967
                self.match(ModelicaParser.T__24)
                self.state = 968
                self.expression()
                self.state = 973
                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 Array_subscriptsContext(ParserRuleContext):

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

        def subscript(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.SubscriptContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.SubscriptContext,i)


        def getRuleIndex(self):
            return ModelicaParser.RULE_array_subscripts

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

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




    def array_subscripts(self):

        localctx = ModelicaParser.Array_subscriptsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_array_subscripts)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 974
            self.match(ModelicaParser.T__84)
            self.state = 975
            self.subscript()
            self.state = 980
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__24:
                self.state = 976
                self.match(ModelicaParser.T__24)
                self.state = 977
                self.subscript()
                self.state = 982
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 983
            self.match(ModelicaParser.T__85)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class SubscriptContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_subscript

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

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




    def subscript(self):

        localctx = ModelicaParser.SubscriptContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_subscript)
        try:
            self.state = 987
            token = self._input.LA(1)
            if token in [ModelicaParser.T__21]:
                self.enterOuterAlt(localctx, 1)
                self.state = 985
                self.match(ModelicaParser.T__21)

            elif token in [ModelicaParser.T__17, ModelicaParser.T__20, ModelicaParser.T__23, ModelicaParser.T__34, ModelicaParser.T__36, ModelicaParser.T__46, ModelicaParser.T__49, ModelicaParser.T__64, ModelicaParser.T__79, ModelicaParser.T__82, ModelicaParser.T__83, ModelicaParser.T__84, ModelicaParser.IDENT, ModelicaParser.STRING, ModelicaParser.UNSIGNED_NUMBER]:
                self.enterOuterAlt(localctx, 2)
                self.state = 986
                self.expression()

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

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

        def string_comment(self):
            return self.getTypedRuleContext(ModelicaParser.String_commentContext,0)


        def annotation(self):
            return self.getTypedRuleContext(ModelicaParser.AnnotationContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_comment

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

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




    def comment(self):

        localctx = ModelicaParser.CommentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 989
            self.string_comment()
            self.state = 991
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__86:
                self.state = 990
                self.annotation()


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

    class String_commentContext(ParserRuleContext):

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_string_comment

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

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




    def string_comment(self):

        localctx = ModelicaParser.String_commentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_string_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1001
            _la = self._input.LA(1)
            if _la==ModelicaParser.STRING:
                self.state = 993
                self.match(ModelicaParser.STRING)
                self.state = 998
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__70:
                    self.state = 994
                    self.match(ModelicaParser.T__70)
                    self.state = 995
                    self.match(ModelicaParser.STRING)
                    self.state = 1000
                    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 AnnotationContext(ParserRuleContext):

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

        def class_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Class_modificationContext,0)


        def getRuleIndex(self):
            return ModelicaParser.RULE_annotation

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

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




    def annotation(self):

        localctx = ModelicaParser.AnnotationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_annotation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1003
            self.match(ModelicaParser.T__86)
            self.state = 1004
            self.class_modification()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx, ruleIndex, predIndex):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[52] = 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, 7)
         

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

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

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

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




