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

    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"EACH", 
                      u"PARTIAL", u"FINAL", u"WITHIN", u"ENCAPSULATED", 
                      u"REDECLARE", u"INNER", u"OUTER", u"INITIAL", u"IDENT", 
                      u"STRING", u"UNSIGNED_NUMBER", u"COMMENT", u"WS" ]

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

    ruleNames =  [ u"stored_definition", u"stored_definition_class", u"class_definition", 
                   u"class_prefixes", u"class_type", 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"regular_element", u"replaceable_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
    EACH=79
    PARTIAL=80
    FINAL=81
    WITHIN=82
    ENCAPSULATED=83
    REDECLARE=84
    INNER=85
    OUTER=86
    INITIAL=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 WITHIN(self):
            return self.getToken(ModelicaParser.WITHIN, 0)

        def stored_definition_class(self, i=None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Stored_definition_classContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Stored_definition_classContext,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 accept(self, visitor):
            if hasattr(visitor, "visitStored_definition"):
                return visitor.visitStored_definition(self)
            else:
                return visitor.visitChildren(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 = 149
            _la = self._input.LA(1)
            if _la==ModelicaParser.WITHIN:
                self.state = 144
                self.match(ModelicaParser.WITHIN)
                self.state = 146
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__27 or _la==ModelicaParser.IDENT:
                    self.state = 145
                    self.name()


                self.state = 148
                self.match(ModelicaParser.T__0)


            self.state = 154
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__1) | (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))) != 0) or ((((_la - 80)) & ~0x3f) == 0 and ((1 << (_la - 80)) & ((1 << (ModelicaParser.PARTIAL - 80)) | (1 << (ModelicaParser.FINAL - 80)) | (1 << (ModelicaParser.ENCAPSULATED - 80)))) != 0):
                self.state = 151
                self.stored_definition_class()
                self.state = 156
                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 Stored_definition_classContext(ParserRuleContext):

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

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


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

        def getRuleIndex(self):
            return ModelicaParser.RULE_stored_definition_class

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

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

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




    def stored_definition_class(self):

        localctx = ModelicaParser.Stored_definition_classContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_stored_definition_class)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 158
            _la = self._input.LA(1)
            if _la==ModelicaParser.FINAL:
                self.state = 157
                self.match(ModelicaParser.FINAL)


            self.state = 160
            self.class_definition()
            self.state = 161
            self.match(ModelicaParser.T__0)
        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 ENCAPSULATED(self):
            return self.getToken(ModelicaParser.ENCAPSULATED, 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 accept(self, visitor):
            if hasattr(visitor, "visitClass_definition"):
                return visitor.visitClass_definition(self)
            else:
                return visitor.visitChildren(self)




    def class_definition(self):

        localctx = ModelicaParser.Class_definitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_class_definition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 164
            _la = self._input.LA(1)
            if _la==ModelicaParser.ENCAPSULATED:
                self.state = 163
                self.match(ModelicaParser.ENCAPSULATED)


            self.state = 166
            self.class_prefixes()
            self.state = 167
            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 class_type(self):
            return self.getTypedRuleContext(ModelicaParser.Class_typeContext,0)


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

        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 accept(self, visitor):
            if hasattr(visitor, "visitClass_prefixes"):
                return visitor.visitClass_prefixes(self)
            else:
                return visitor.visitChildren(self)




    def class_prefixes(self):

        localctx = ModelicaParser.Class_prefixesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_class_prefixes)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 170
            _la = self._input.LA(1)
            if _la==ModelicaParser.PARTIAL:
                self.state = 169
                self.match(ModelicaParser.PARTIAL)


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

    class Class_typeContext(ParserRuleContext):

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


        def getRuleIndex(self):
            return ModelicaParser.RULE_class_type

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

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

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




    def class_type(self):

        localctx = ModelicaParser.Class_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_class_type)
        self._la = 0 # Token type
        try:
            self.state = 195
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 174
                self.match(ModelicaParser.T__1)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 175
                self.match(ModelicaParser.T__2)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 177
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__3:
                    self.state = 176
                    self.match(ModelicaParser.T__3)


                self.state = 179
                self.match(ModelicaParser.T__4)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 180
                self.match(ModelicaParser.T__5)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 182
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__6:
                    self.state = 181
                    self.match(ModelicaParser.T__6)


                self.state = 184
                self.match(ModelicaParser.T__7)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 185
                self.match(ModelicaParser.T__8)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 186
                self.match(ModelicaParser.T__9)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 188
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__10 or _la==ModelicaParser.T__11:
                    self.state = 187
                    _la = self._input.LA(1)
                    if not(_la==ModelicaParser.T__10 or _la==ModelicaParser.T__11):
                        self._errHandler.recoverInline(self)
                    else:
                        self.consume()


                self.state = 191
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__3:
                    self.state = 190
                    self.match(ModelicaParser.T__3)


                self.state = 193
                self.match(ModelicaParser.T__12)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 194
                self.match(ModelicaParser.T__3)
                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 getRuleIndex(self):
            return ModelicaParser.RULE_class_specifier

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



    class Class_spec_enumContext(Class_specifierContext):

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

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

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


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

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

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


    class Class_spec_extendsContext(Class_specifierContext):

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

        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 class_modification(self):
            return self.getTypedRuleContext(ModelicaParser.Class_modificationContext,0)


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

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

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


    class Class_spec_derContext(Class_specifierContext):

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

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

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


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

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

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


    class Class_spec_baseContext(Class_specifierContext):

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

        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 enterRule(self, listener):
            if hasattr(listener, "enterClass_spec_base"):
                listener.enterClass_spec_base(self)

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

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


    class Class_spec_compContext(Class_specifierContext):

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

        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 enterRule(self, listener):
            if hasattr(listener, "enterClass_spec_comp"):
                listener.enterClass_spec_comp(self)

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

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



    def class_specifier(self):

        localctx = ModelicaParser.Class_specifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_class_specifier)
        self._la = 0 # Token type
        try:
            self.state = 254
            la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Class_spec_compContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 197
                self.match(ModelicaParser.IDENT)
                self.state = 198
                self.string_comment()
                self.state = 199
                self.composition()
                self.state = 200
                self.match(ModelicaParser.T__13)
                self.state = 201
                self.match(ModelicaParser.IDENT)
                pass

            elif la_ == 2:
                localctx = ModelicaParser.Class_spec_baseContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 203
                self.match(ModelicaParser.IDENT)
                self.state = 204
                self.match(ModelicaParser.T__14)
                self.state = 205
                self.base_prefix()
                self.state = 206
                self.name()
                self.state = 208
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__75:
                    self.state = 207
                    self.array_subscripts()


                self.state = 211
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__16:
                    self.state = 210
                    self.class_modification()


                self.state = 213
                self.comment()
                pass

            elif la_ == 3:
                localctx = ModelicaParser.Class_spec_enumContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 215
                self.match(ModelicaParser.IDENT)
                self.state = 216
                self.match(ModelicaParser.T__14)
                self.state = 217
                self.match(ModelicaParser.T__15)
                self.state = 218
                self.match(ModelicaParser.T__16)
                self.state = 223
                token = self._input.LA(1)
                if token in [ModelicaParser.T__18, ModelicaParser.IDENT]:
                    self.state = 220
                    _la = self._input.LA(1)
                    if _la==ModelicaParser.IDENT:
                        self.state = 219
                        self.enum_list()



                elif token in [ModelicaParser.T__17]:
                    self.state = 222
                    self.match(ModelicaParser.T__17)

                else:
                    raise NoViableAltException(self)

                self.state = 225
                self.match(ModelicaParser.T__18)
                self.state = 226
                self.comment()
                pass

            elif la_ == 4:
                localctx = ModelicaParser.Class_spec_derContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 227
                self.match(ModelicaParser.IDENT)
                self.state = 228
                self.match(ModelicaParser.T__14)
                self.state = 229
                self.match(ModelicaParser.T__19)
                self.state = 230
                self.match(ModelicaParser.T__16)
                self.state = 231
                self.name()
                self.state = 232
                self.match(ModelicaParser.T__20)
                self.state = 233
                self.match(ModelicaParser.IDENT)
                self.state = 238
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__20:
                    self.state = 234
                    self.match(ModelicaParser.T__20)
                    self.state = 235
                    self.match(ModelicaParser.IDENT)
                    self.state = 240
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 241
                self.match(ModelicaParser.T__18)
                self.state = 242
                self.comment()
                pass

            elif la_ == 5:
                localctx = ModelicaParser.Class_spec_extendsContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 244
                self.match(ModelicaParser.T__21)
                self.state = 245
                self.match(ModelicaParser.IDENT)
                self.state = 247
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__16:
                    self.state = 246
                    self.class_modification()


                self.state = 249
                self.string_comment()
                self.state = 250
                self.composition()
                self.state = 251
                self.match(ModelicaParser.T__13)
                self.state = 252
                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 accept(self, visitor):
            if hasattr(visitor, "visitBase_prefix"):
                return visitor.visitBase_prefix(self)
            else:
                return visitor.visitChildren(self)




    def base_prefix(self):

        localctx = ModelicaParser.Base_prefixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_base_prefix)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 256
            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 accept(self, visitor):
            if hasattr(visitor, "visitEnum_list"):
                return visitor.visitEnum_list(self)
            else:
                return visitor.visitChildren(self)




    def enum_list(self):

        localctx = ModelicaParser.Enum_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_enum_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 258
            self.enumeration_literal()
            self.state = 263
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__20:
                self.state = 259
                self.match(ModelicaParser.T__20)
                self.state = 260
                self.enumeration_literal()
                self.state = 265
                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 accept(self, visitor):
            if hasattr(visitor, "visitEnumeration_literal"):
                return visitor.visitEnumeration_literal(self)
            else:
                return visitor.visitChildren(self)




    def enumeration_literal(self):

        localctx = ModelicaParser.Enumeration_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_enumeration_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 266
            self.match(ModelicaParser.IDENT)
            self.state = 267
            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
            self.epriv = None # Element_listContext
            self.epub = None # Element_listContext
            self.epro = None # Element_listContext
            self.ext_annotation = None # AnnotationContext
            self.comp_annotation = None # AnnotationContext

        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 accept(self, visitor):
            if hasattr(visitor, "visitComposition"):
                return visitor.visitComposition(self)
            else:
                return visitor.visitChildren(self)




    def composition(self):

        localctx = ModelicaParser.CompositionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_composition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 269
            localctx.epriv = self.element_list()
            self.state = 278
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__22) | (1 << ModelicaParser.T__23) | (1 << ModelicaParser.T__41) | (1 << ModelicaParser.T__42))) != 0) or _la==ModelicaParser.INITIAL:
                self.state = 276
                la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                if la_ == 1:
                    self.state = 270
                    self.match(ModelicaParser.T__22)
                    self.state = 271
                    localctx.epub = self.element_list()
                    pass

                elif la_ == 2:
                    self.state = 272
                    self.match(ModelicaParser.T__23)
                    self.state = 273
                    localctx.epro = self.element_list()
                    pass

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

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


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

            self.state = 292
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__24:
                self.state = 281
                self.match(ModelicaParser.T__24)
                self.state = 283
                _la = self._input.LA(1)
                if _la==ModelicaParser.STRING:
                    self.state = 282
                    self.language_specification()


                self.state = 286
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__27 or _la==ModelicaParser.IDENT:
                    self.state = 285
                    self.external_function_call()


                self.state = 289
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__77:
                    self.state = 288
                    localctx.ext_annotation = self.annotation()


                self.state = 291
                self.match(ModelicaParser.T__17)


            self.state = 297
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__77:
                self.state = 294
                localctx.comp_annotation = self.annotation()
                self.state = 295
                self.match(ModelicaParser.T__0)


        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 accept(self, visitor):
            if hasattr(visitor, "visitLanguage_specification"):
                return visitor.visitLanguage_specification(self)
            else:
                return visitor.visitChildren(self)




    def language_specification(self):

        localctx = ModelicaParser.Language_specificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_language_specification)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 299
            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 accept(self, visitor):
            if hasattr(visitor, "visitExternal_function_call"):
                return visitor.visitExternal_function_call(self)
            else:
                return visitor.visitChildren(self)




    def external_function_call(self):

        localctx = ModelicaParser.External_function_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_external_function_call)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 304
            la_ = self._interp.adaptivePredict(self._input,26,self._ctx)
            if la_ == 1:
                self.state = 301
                self.component_reference()
                self.state = 302
                self.match(ModelicaParser.T__14)


            self.state = 306
            self.match(ModelicaParser.IDENT)
            self.state = 307
            self.match(ModelicaParser.T__16)
            self.state = 309
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__13) | (1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__19) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__29) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__55))) != 0) or ((((_la - 71)) & ~0x3f) == 0 and ((1 << (_la - 71)) & ((1 << (ModelicaParser.T__70 - 71)) | (1 << (ModelicaParser.T__73 - 71)) | (1 << (ModelicaParser.T__74 - 71)) | (1 << (ModelicaParser.T__75 - 71)) | (1 << (ModelicaParser.INITIAL - 71)) | (1 << (ModelicaParser.IDENT - 71)) | (1 << (ModelicaParser.STRING - 71)) | (1 << (ModelicaParser.UNSIGNED_NUMBER - 71)))) != 0):
                self.state = 308
                self.expression_list()


            self.state = 311
            self.match(ModelicaParser.T__18)
        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 accept(self, visitor):
            if hasattr(visitor, "visitElement_list"):
                return visitor.visitElement_list(self)
            else:
                return visitor.visitChildren(self)




    def element_list(self):

        localctx = ModelicaParser.Element_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_element_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 318
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__1) | (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__21) | (1 << ModelicaParser.T__25) | (1 << ModelicaParser.T__26) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__32) | (1 << ModelicaParser.T__33) | (1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__35) | (1 << ModelicaParser.T__36) | (1 << ModelicaParser.T__37) | (1 << ModelicaParser.T__38))) != 0) or ((((_la - 80)) & ~0x3f) == 0 and ((1 << (_la - 80)) & ((1 << (ModelicaParser.PARTIAL - 80)) | (1 << (ModelicaParser.FINAL - 80)) | (1 << (ModelicaParser.ENCAPSULATED - 80)) | (1 << (ModelicaParser.REDECLARE - 80)) | (1 << (ModelicaParser.INNER - 80)) | (1 << (ModelicaParser.OUTER - 80)) | (1 << (ModelicaParser.IDENT - 80)))) != 0):
                self.state = 313
                self.element()
                self.state = 314
                self.match(ModelicaParser.T__0)
                self.state = 320
                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 regular_element(self):
            return self.getTypedRuleContext(ModelicaParser.Regular_elementContext,0)


        def replaceable_element(self):
            return self.getTypedRuleContext(ModelicaParser.Replaceable_elementContext,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 accept(self, visitor):
            if hasattr(visitor, "visitElement"):
                return visitor.visitElement(self)
            else:
                return visitor.visitChildren(self)




    def element(self):

        localctx = ModelicaParser.ElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_element)
        try:
            self.state = 325
            la_ = self._interp.adaptivePredict(self._input,29,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 321
                self.import_clause()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 322
                self.extends_clause()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 323
                self.regular_element()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 324
                self.replaceable_element()
                pass


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

    class Regular_elementContext(ParserRuleContext):

        def __init__(self, parser, parent=None, invokingState=-1):
            super(ModelicaParser.Regular_elementContext, self).__init__(parent, invokingState)
            self.parser = parser
            self.class_elem = None # Class_definitionContext
            self.comp_elem = None # Component_clauseContext

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

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

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

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

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


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


        def getRuleIndex(self):
            return ModelicaParser.RULE_regular_element

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

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

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




    def regular_element(self):

        localctx = ModelicaParser.Regular_elementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_regular_element)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 328
            _la = self._input.LA(1)
            if _la==ModelicaParser.REDECLARE:
                self.state = 327
                self.match(ModelicaParser.REDECLARE)


            self.state = 331
            _la = self._input.LA(1)
            if _la==ModelicaParser.FINAL:
                self.state = 330
                self.match(ModelicaParser.FINAL)


            self.state = 334
            _la = self._input.LA(1)
            if _la==ModelicaParser.INNER:
                self.state = 333
                self.match(ModelicaParser.INNER)


            self.state = 337
            _la = self._input.LA(1)
            if _la==ModelicaParser.OUTER:
                self.state = 336
                self.match(ModelicaParser.OUTER)


            self.state = 341
            token = self._input.LA(1)
            if token in [ModelicaParser.T__1, 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.PARTIAL, ModelicaParser.ENCAPSULATED]:
                self.state = 339
                localctx.class_elem = self.class_definition()

            elif token in [ModelicaParser.T__27, ModelicaParser.T__32, ModelicaParser.T__33, ModelicaParser.T__34, ModelicaParser.T__35, ModelicaParser.T__36, ModelicaParser.T__37, ModelicaParser.T__38, ModelicaParser.IDENT]:
                self.state = 340
                localctx.comp_elem = self.component_clause()

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

        def __init__(self, parser, parent=None, invokingState=-1):
            super(ModelicaParser.Replaceable_elementContext, self).__init__(parent, invokingState)
            self.parser = parser
            self.class_elem = None # Class_definitionContext
            self.comp_elem = None # Component_clauseContext

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

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

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

        def OUTER(self):
            return self.getToken(ModelicaParser.OUTER, 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_replaceable_element

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

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

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




    def replaceable_element(self):

        localctx = ModelicaParser.Replaceable_elementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_replaceable_element)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 344
            _la = self._input.LA(1)
            if _la==ModelicaParser.REDECLARE:
                self.state = 343
                self.match(ModelicaParser.REDECLARE)


            self.state = 347
            _la = self._input.LA(1)
            if _la==ModelicaParser.FINAL:
                self.state = 346
                self.match(ModelicaParser.FINAL)


            self.state = 350
            _la = self._input.LA(1)
            if _la==ModelicaParser.INNER:
                self.state = 349
                self.match(ModelicaParser.INNER)


            self.state = 353
            _la = self._input.LA(1)
            if _la==ModelicaParser.OUTER:
                self.state = 352
                self.match(ModelicaParser.OUTER)


            self.state = 355
            self.match(ModelicaParser.T__25)
            self.state = 358
            token = self._input.LA(1)
            if token in [ModelicaParser.T__1, 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.PARTIAL, ModelicaParser.ENCAPSULATED]:
                self.state = 356
                localctx.class_elem = self.class_definition()

            elif token in [ModelicaParser.T__27, ModelicaParser.T__32, ModelicaParser.T__33, ModelicaParser.T__34, ModelicaParser.T__35, ModelicaParser.T__36, ModelicaParser.T__37, ModelicaParser.T__38, ModelicaParser.IDENT]:
                self.state = 357
                localctx.comp_elem = self.component_clause()

            else:
                raise NoViableAltException(self)

            self.state = 363
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__31:
                self.state = 360
                self.constraining_clause()
                self.state = 361
                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_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 accept(self, visitor):
            if hasattr(visitor, "visitImport_clause"):
                return visitor.visitImport_clause(self)
            else:
                return visitor.visitChildren(self)




    def import_clause(self):

        localctx = ModelicaParser.Import_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_import_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 365
            self.match(ModelicaParser.T__26)
            self.state = 380
            la_ = self._interp.adaptivePredict(self._input,43,self._ctx)
            if la_ == 1:
                self.state = 366
                self.match(ModelicaParser.IDENT)
                self.state = 367
                self.match(ModelicaParser.T__14)
                self.state = 368
                self.name()
                pass

            elif la_ == 2:
                self.state = 369
                self.name()
                self.state = 378
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__27:
                    self.state = 370
                    self.match(ModelicaParser.T__27)
                    self.state = 376
                    token = self._input.LA(1)
                    if token in [ModelicaParser.T__28]:
                        self.state = 371
                        self.match(ModelicaParser.T__28)

                    elif token in [ModelicaParser.T__29]:
                        self.state = 372
                        self.match(ModelicaParser.T__29)
                        self.state = 373
                        self.import_list()
                        self.state = 374
                        self.match(ModelicaParser.T__30)

                    else:
                        raise NoViableAltException(self)



                pass


            self.state = 382
            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 accept(self, visitor):
            if hasattr(visitor, "visitImport_list"):
                return visitor.visitImport_list(self)
            else:
                return visitor.visitChildren(self)




    def import_list(self):

        localctx = ModelicaParser.Import_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_import_list)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 384
            self.match(ModelicaParser.IDENT)
            self.state = 389
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,44,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 385
                    self.match(ModelicaParser.T__20)
                    self.state = 386
                    self.import_list() 
                self.state = 391
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,44,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 accept(self, visitor):
            if hasattr(visitor, "visitExtends_clause"):
                return visitor.visitExtends_clause(self)
            else:
                return visitor.visitChildren(self)




    def extends_clause(self):

        localctx = ModelicaParser.Extends_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_extends_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 392
            self.match(ModelicaParser.T__21)
            self.state = 393
            self.name()
            self.state = 395
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__16:
                self.state = 394
                self.class_modification()


            self.state = 398
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__77:
                self.state = 397
                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 accept(self, visitor):
            if hasattr(visitor, "visitConstraining_clause"):
                return visitor.visitConstraining_clause(self)
            else:
                return visitor.visitChildren(self)




    def constraining_clause(self):

        localctx = ModelicaParser.Constraining_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_constraining_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 400
            self.match(ModelicaParser.T__31)
            self.state = 401
            self.name()
            self.state = 403
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__16:
                self.state = 402
                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 accept(self, visitor):
            if hasattr(visitor, "visitComponent_clause"):
                return visitor.visitComponent_clause(self)
            else:
                return visitor.visitChildren(self)




    def component_clause(self):

        localctx = ModelicaParser.Component_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_component_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 405
            self.type_prefix()
            self.state = 406
            self.type_specifier()
            self.state = 408
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__75:
                self.state = 407
                self.array_subscripts()


            self.state = 410
            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 accept(self, visitor):
            if hasattr(visitor, "visitType_prefix"):
                return visitor.visitType_prefix(self)
            else:
                return visitor.visitChildren(self)




    def type_prefix(self):

        localctx = ModelicaParser.Type_prefixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_type_prefix)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 413
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__32 or _la==ModelicaParser.T__33:
                self.state = 412
                _la = self._input.LA(1)
                if not(_la==ModelicaParser.T__32 or _la==ModelicaParser.T__33):
                    self._errHandler.recoverInline(self)
                else:
                    self.consume()


            self.state = 416
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__35) | (1 << ModelicaParser.T__36))) != 0):
                self.state = 415
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__34) | (1 << ModelicaParser.T__35) | (1 << ModelicaParser.T__36))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self.consume()


            self.state = 419
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__37 or _la==ModelicaParser.T__38:
                self.state = 418
                _la = self._input.LA(1)
                if not(_la==ModelicaParser.T__37 or _la==ModelicaParser.T__38):
                    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 accept(self, visitor):
            if hasattr(visitor, "visitType_specifier"):
                return visitor.visitType_specifier(self)
            else:
                return visitor.visitChildren(self)




    def type_specifier(self):

        localctx = ModelicaParser.Type_specifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_type_specifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 421
            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 accept(self, visitor):
            if hasattr(visitor, "visitComponent_list"):
                return visitor.visitComponent_list(self)
            else:
                return visitor.visitChildren(self)




    def component_list(self):

        localctx = ModelicaParser.Component_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_component_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 423
            self.component_declaration()
            self.state = 428
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__20:
                self.state = 424
                self.match(ModelicaParser.T__20)
                self.state = 425
                self.component_declaration()
                self.state = 430
                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 accept(self, visitor):
            if hasattr(visitor, "visitComponent_declaration"):
                return visitor.visitComponent_declaration(self)
            else:
                return visitor.visitChildren(self)




    def component_declaration(self):

        localctx = ModelicaParser.Component_declarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_component_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 431
            self.declaration()
            self.state = 433
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__39:
                self.state = 432
                self.condition_attribute()


            self.state = 435
            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 accept(self, visitor):
            if hasattr(visitor, "visitCondition_attribute"):
                return visitor.visitCondition_attribute(self)
            else:
                return visitor.visitChildren(self)




    def condition_attribute(self):

        localctx = ModelicaParser.Condition_attributeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_condition_attribute)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 437
            self.match(ModelicaParser.T__39)
            self.state = 438
            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 accept(self, visitor):
            if hasattr(visitor, "visitDeclaration"):
                return visitor.visitDeclaration(self)
            else:
                return visitor.visitChildren(self)




    def declaration(self):

        localctx = ModelicaParser.DeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_declaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 440
            self.match(ModelicaParser.IDENT)
            self.state = 442
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__75:
                self.state = 441
                self.array_subscripts()


            self.state = 445
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__14) | (1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__40))) != 0):
                self.state = 444
                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)

        def accept(self, visitor):
            if hasattr(visitor, "visitModification_assignment"):
                return visitor.visitModification_assignment(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitModification_assignment2"):
                return visitor.visitModification_assignment2(self)
            else:
                return visitor.visitChildren(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 accept(self, visitor):
            if hasattr(visitor, "visitModification_class"):
                return visitor.visitModification_class(self)
            else:
                return visitor.visitChildren(self)



    def modification(self):

        localctx = ModelicaParser.ModificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_modification)
        self._la = 0 # Token type
        try:
            self.state = 456
            token = self._input.LA(1)
            if token in [ModelicaParser.T__16]:
                localctx = ModelicaParser.Modification_classContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 447
                self.class_modification()
                self.state = 450
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__14:
                    self.state = 448
                    self.match(ModelicaParser.T__14)
                    self.state = 449
                    self.expression()



            elif token in [ModelicaParser.T__14]:
                localctx = ModelicaParser.Modification_assignmentContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 452
                self.match(ModelicaParser.T__14)
                self.state = 453
                self.expression()

            elif token in [ModelicaParser.T__40]:
                localctx = ModelicaParser.Modification_assignment2Context(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 454
                self.match(ModelicaParser.T__40)
                self.state = 455
                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 accept(self, visitor):
            if hasattr(visitor, "visitClass_modification"):
                return visitor.visitClass_modification(self)
            else:
                return visitor.visitChildren(self)




    def class_modification(self):

        localctx = ModelicaParser.Class_modificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_class_modification)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 458
            self.match(ModelicaParser.T__16)
            self.state = 460
            _la = self._input.LA(1)
            if ((((_la - 26)) & ~0x3f) == 0 and ((1 << (_la - 26)) & ((1 << (ModelicaParser.T__25 - 26)) | (1 << (ModelicaParser.T__27 - 26)) | (1 << (ModelicaParser.EACH - 26)) | (1 << (ModelicaParser.FINAL - 26)) | (1 << (ModelicaParser.REDECLARE - 26)) | (1 << (ModelicaParser.IDENT - 26)))) != 0):
                self.state = 459
                self.argument_list()


            self.state = 462
            self.match(ModelicaParser.T__18)
        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 accept(self, visitor):
            if hasattr(visitor, "visitArgument_list"):
                return visitor.visitArgument_list(self)
            else:
                return visitor.visitChildren(self)




    def argument_list(self):

        localctx = ModelicaParser.Argument_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_argument_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 464
            self.argument()
            self.state = 469
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__20:
                self.state = 465
                self.match(ModelicaParser.T__20)
                self.state = 466
                self.argument()
                self.state = 471
                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
            self.arg = None # Element_modification_or_replaceableContext

        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 accept(self, visitor):
            if hasattr(visitor, "visitArgument"):
                return visitor.visitArgument(self)
            else:
                return visitor.visitChildren(self)




    def argument(self):

        localctx = ModelicaParser.ArgumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_argument)
        try:
            self.state = 474
            token = self._input.LA(1)
            if token in [ModelicaParser.T__25, ModelicaParser.T__27, ModelicaParser.EACH, ModelicaParser.FINAL, ModelicaParser.IDENT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 472
                localctx.arg = self.element_modification_or_replaceable()

            elif token in [ModelicaParser.REDECLARE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 473
                localctx.arg = 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
            self.elem = None # Element_modificationContext

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

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

        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 accept(self, visitor):
            if hasattr(visitor, "visitElement_modification_or_replaceable"):
                return visitor.visitElement_modification_or_replaceable(self)
            else:
                return visitor.visitChildren(self)




    def element_modification_or_replaceable(self):

        localctx = ModelicaParser.Element_modification_or_replaceableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_element_modification_or_replaceable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 477
            _la = self._input.LA(1)
            if _la==ModelicaParser.EACH:
                self.state = 476
                self.match(ModelicaParser.EACH)


            self.state = 480
            _la = self._input.LA(1)
            if _la==ModelicaParser.FINAL:
                self.state = 479
                self.match(ModelicaParser.FINAL)


            self.state = 484
            token = self._input.LA(1)
            if token in [ModelicaParser.T__27, ModelicaParser.IDENT]:
                self.state = 482
                localctx.elem = self.element_modification()

            elif token in [ModelicaParser.T__25]:
                self.state = 483
                localctx.elem = 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 accept(self, visitor):
            if hasattr(visitor, "visitElement_modification"):
                return visitor.visitElement_modification(self)
            else:
                return visitor.visitChildren(self)




    def element_modification(self):

        localctx = ModelicaParser.Element_modificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_element_modification)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 486
            self.name()
            self.state = 488
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__14) | (1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__40))) != 0):
                self.state = 487
                self.modification()


            self.state = 490
            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 REDECLARE(self):
            return self.getToken(ModelicaParser.REDECLARE, 0)

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


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

        def FINAL(self):
            return self.getToken(ModelicaParser.FINAL, 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 accept(self, visitor):
            if hasattr(visitor, "visitElement_redeclaration"):
                return visitor.visitElement_redeclaration(self)
            else:
                return visitor.visitChildren(self)




    def element_redeclaration(self):

        localctx = ModelicaParser.Element_redeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_element_redeclaration)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 492
            self.match(ModelicaParser.REDECLARE)
            self.state = 494
            _la = self._input.LA(1)
            if _la==ModelicaParser.EACH:
                self.state = 493
                self.match(ModelicaParser.EACH)


            self.state = 497
            _la = self._input.LA(1)
            if _la==ModelicaParser.FINAL:
                self.state = 496
                self.match(ModelicaParser.FINAL)


            self.state = 504
            token = self._input.LA(1)
            if token in [ModelicaParser.T__1, 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__27, ModelicaParser.T__32, ModelicaParser.T__33, ModelicaParser.T__34, ModelicaParser.T__35, ModelicaParser.T__36, ModelicaParser.T__37, ModelicaParser.T__38, ModelicaParser.PARTIAL, ModelicaParser.IDENT]:
                self.state = 501
                token = self._input.LA(1)
                if token in [ModelicaParser.T__1, 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.PARTIAL]:
                    self.state = 499
                    self.short_class_definition()

                elif token in [ModelicaParser.T__27, ModelicaParser.T__32, ModelicaParser.T__33, ModelicaParser.T__34, ModelicaParser.T__35, ModelicaParser.T__36, ModelicaParser.T__37, ModelicaParser.T__38, ModelicaParser.IDENT]:
                    self.state = 500
                    self.component_clause1()

                else:
                    raise NoViableAltException(self)


            elif token in [ModelicaParser.T__25]:
                self.state = 503
                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 accept(self, visitor):
            if hasattr(visitor, "visitElement_replaceable"):
                return visitor.visitElement_replaceable(self)
            else:
                return visitor.visitChildren(self)




    def element_replaceable(self):

        localctx = ModelicaParser.Element_replaceableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_element_replaceable)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 506
            self.match(ModelicaParser.T__25)
            self.state = 509
            token = self._input.LA(1)
            if token in [ModelicaParser.T__1, 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.PARTIAL]:
                self.state = 507
                self.short_class_definition()

            elif token in [ModelicaParser.T__27, ModelicaParser.T__32, ModelicaParser.T__33, ModelicaParser.T__34, ModelicaParser.T__35, ModelicaParser.T__36, ModelicaParser.T__37, ModelicaParser.T__38, ModelicaParser.IDENT]:
                self.state = 508
                self.component_clause1()

            else:
                raise NoViableAltException(self)

            self.state = 512
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__31:
                self.state = 511
                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 accept(self, visitor):
            if hasattr(visitor, "visitComponent_clause1"):
                return visitor.visitComponent_clause1(self)
            else:
                return visitor.visitChildren(self)




    def component_clause1(self):

        localctx = ModelicaParser.Component_clause1Context(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_component_clause1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 514
            self.type_prefix()
            self.state = 515
            self.type_specifier()
            self.state = 516
            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 accept(self, visitor):
            if hasattr(visitor, "visitComponent_declaration1"):
                return visitor.visitComponent_declaration1(self)
            else:
                return visitor.visitChildren(self)




    def component_declaration1(self):

        localctx = ModelicaParser.Component_declaration1Context(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_component_declaration1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 518
            self.declaration()
            self.state = 519
            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 accept(self, visitor):
            if hasattr(visitor, "visitShort_class_definition"):
                return visitor.visitShort_class_definition(self)
            else:
                return visitor.visitChildren(self)




    def short_class_definition(self):

        localctx = ModelicaParser.Short_class_definitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_short_class_definition)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 521
            self.class_prefixes()
            self.state = 522
            self.match(ModelicaParser.IDENT)
            self.state = 523
            self.match(ModelicaParser.T__14)
            self.state = 544
            token = self._input.LA(1)
            if token in [ModelicaParser.T__27, ModelicaParser.T__32, ModelicaParser.T__33, ModelicaParser.T__34, ModelicaParser.T__35, ModelicaParser.T__36, ModelicaParser.T__37, ModelicaParser.T__38, ModelicaParser.IDENT]:
                self.state = 524
                self.base_prefix()
                self.state = 525
                self.name()
                self.state = 527
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__75:
                    self.state = 526
                    self.array_subscripts()


                self.state = 530
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__16:
                    self.state = 529
                    self.class_modification()


                self.state = 532
                self.comment()

            elif token in [ModelicaParser.T__15]:
                self.state = 534
                self.match(ModelicaParser.T__15)
                self.state = 535
                self.match(ModelicaParser.T__16)
                self.state = 540
                token = self._input.LA(1)
                if token in [ModelicaParser.T__18, ModelicaParser.IDENT]:
                    self.state = 537
                    _la = self._input.LA(1)
                    if _la==ModelicaParser.IDENT:
                        self.state = 536
                        self.enum_list()



                elif token in [ModelicaParser.T__17]:
                    self.state = 539
                    self.match(ModelicaParser.T__17)

                else:
                    raise NoViableAltException(self)

                self.state = 542
                self.match(ModelicaParser.T__18)
                self.state = 543
                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 INITIAL(self):
            return self.getToken(ModelicaParser.INITIAL, 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_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 accept(self, visitor):
            if hasattr(visitor, "visitEquation_section"):
                return visitor.visitEquation_section(self)
            else:
                return visitor.visitChildren(self)




    def equation_section(self):

        localctx = ModelicaParser.Equation_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_equation_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 547
            _la = self._input.LA(1)
            if _la==ModelicaParser.INITIAL:
                self.state = 546
                self.match(ModelicaParser.INITIAL)


            self.state = 549
            self.match(ModelicaParser.T__41)
            self.state = 555
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,77,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 550
                    self.equation()
                    self.state = 551
                    self.match(ModelicaParser.T__0) 
                self.state = 557
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,77,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 INITIAL(self):
            return self.getToken(ModelicaParser.INITIAL, 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_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 accept(self, visitor):
            if hasattr(visitor, "visitAlgorithm_section"):
                return visitor.visitAlgorithm_section(self)
            else:
                return visitor.visitChildren(self)




    def algorithm_section(self):

        localctx = ModelicaParser.Algorithm_sectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_algorithm_section)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 559
            _la = self._input.LA(1)
            if _la==ModelicaParser.INITIAL:
                self.state = 558
                self.match(ModelicaParser.INITIAL)


            self.state = 561
            self.match(ModelicaParser.T__42)
            self.state = 567
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 562
                self.statement()
                self.state = 563
                self.match(ModelicaParser.T__0)
                self.state = 569
                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)

        def accept(self, visitor):
            if hasattr(visitor, "visitEquation_function"):
                return visitor.visitEquation_function(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitEquation_when"):
                return visitor.visitEquation_when(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitEquation_connect_clause"):
                return visitor.visitEquation_connect_clause(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitEquation_simple"):
                return visitor.visitEquation_simple(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitEquation_for"):
                return visitor.visitEquation_for(self)
            else:
                return visitor.visitChildren(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 accept(self, visitor):
            if hasattr(visitor, "visitEquation_if"):
                return visitor.visitEquation_if(self)
            else:
                return visitor.visitChildren(self)



    def equation_options(self):

        localctx = ModelicaParser.Equation_optionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_equation_options)
        try:
            self.state = 581
            la_ = self._interp.adaptivePredict(self._input,80,self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Equation_simpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 570
                self.simple_expression()
                self.state = 571
                self.match(ModelicaParser.T__14)
                self.state = 572
                self.expression()
                pass

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

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

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

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

            elif la_ == 6:
                localctx = ModelicaParser.Equation_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 578
                self.name()
                self.state = 579
                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 accept(self, visitor):
            if hasattr(visitor, "visitEquation"):
                return visitor.visitEquation(self)
            else:
                return visitor.visitChildren(self)




    def equation(self):

        localctx = ModelicaParser.EquationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_equation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 583
            self.equation_options()
            self.state = 584
            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)

        def accept(self, visitor):
            if hasattr(visitor, "visitStatement_for"):
                return visitor.visitStatement_for(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitStatement_return"):
                return visitor.visitStatement_return(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitStatement_component_reference"):
                return visitor.visitStatement_component_reference(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitStatement_component_function"):
                return visitor.visitStatement_component_function(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitStatement_if"):
                return visitor.visitStatement_if(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitStatement_when"):
                return visitor.visitStatement_when(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitStatement_while"):
                return visitor.visitStatement_while(self)
            else:
                return visitor.visitChildren(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 accept(self, visitor):
            if hasattr(visitor, "visitStatement_break"):
                return visitor.visitStatement_break(self)
            else:
                return visitor.visitChildren(self)



    def statement_options(self):

        localctx = ModelicaParser.Statement_optionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_statement_options)
        try:
            self.state = 605
            token = self._input.LA(1)
            if token in [ModelicaParser.T__27, ModelicaParser.IDENT]:
                localctx = ModelicaParser.Statement_component_referenceContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 586
                self.component_reference()
                self.state = 590
                token = self._input.LA(1)
                if token in [ModelicaParser.T__40]:
                    self.state = 587
                    self.match(ModelicaParser.T__40)
                    self.state = 588
                    self.expression()

                elif token in [ModelicaParser.T__16]:
                    self.state = 589
                    self.function_call_args()

                else:
                    raise NoViableAltException(self)


            elif token in [ModelicaParser.T__16]:
                localctx = ModelicaParser.Statement_component_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 592
                self.match(ModelicaParser.T__16)
                self.state = 593
                self.output_expression_list()
                self.state = 594
                self.match(ModelicaParser.T__18)
                self.state = 595
                self.match(ModelicaParser.T__40)
                self.state = 596
                self.component_reference()
                self.state = 597
                self.function_call_args()

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

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

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

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

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

            elif token in [ModelicaParser.T__52]:
                localctx = ModelicaParser.Statement_whenContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 604
                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 accept(self, visitor):
            if hasattr(visitor, "visitStatement"):
                return visitor.visitStatement(self)
            else:
                return visitor.visitChildren(self)




    def statement(self):

        localctx = ModelicaParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 607
            self.statement_options()
            self.state = 608
            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 accept(self, visitor):
            if hasattr(visitor, "visitIf_equation"):
                return visitor.visitIf_equation(self)
            else:
                return visitor.visitChildren(self)




    def if_equation(self):

        localctx = ModelicaParser.If_equationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_if_equation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 610
            self.match(ModelicaParser.T__39)
            self.state = 611
            self.expression()
            self.state = 612
            self.match(ModelicaParser.T__45)
            self.state = 618
            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 = 613
                    self.equation()
                    self.state = 614
                    self.match(ModelicaParser.T__0) 
                self.state = 620
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,83,self._ctx)

            self.state = 634
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__46:
                self.state = 621
                self.match(ModelicaParser.T__46)
                self.state = 622
                self.expression()
                self.state = 623
                self.match(ModelicaParser.T__45)
                self.state = 629
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,84,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 624
                        self.equation()
                        self.state = 625
                        self.match(ModelicaParser.T__0) 
                    self.state = 631
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,84,self._ctx)

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

            self.state = 646
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__47:
                self.state = 637
                self.match(ModelicaParser.T__47)
                self.state = 643
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,86,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 638
                        self.equation()
                        self.state = 639
                        self.match(ModelicaParser.T__0) 
                    self.state = 645
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,86,self._ctx)



            self.state = 648
            self.match(ModelicaParser.T__13)
            self.state = 649
            self.match(ModelicaParser.T__39)
        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 accept(self, visitor):
            if hasattr(visitor, "visitIf_statement"):
                return visitor.visitIf_statement(self)
            else:
                return visitor.visitChildren(self)




    def if_statement(self):

        localctx = ModelicaParser.If_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_if_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 651
            self.match(ModelicaParser.T__39)
            self.state = 652
            self.expression()
            self.state = 653
            self.match(ModelicaParser.T__45)
            self.state = 659
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 654
                self.statement()
                self.state = 655
                self.match(ModelicaParser.T__0)
                self.state = 661
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 675
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__46:
                self.state = 662
                self.match(ModelicaParser.T__46)
                self.state = 663
                self.expression()
                self.state = 664
                self.match(ModelicaParser.T__45)
                self.state = 670
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                    self.state = 665
                    self.statement()
                    self.state = 666
                    self.match(ModelicaParser.T__0)
                    self.state = 672
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            self.state = 687
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__47:
                self.state = 678
                self.match(ModelicaParser.T__47)
                self.state = 684
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                    self.state = 679
                    self.statement()
                    self.state = 680
                    self.match(ModelicaParser.T__0)
                    self.state = 686
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 689
            self.match(ModelicaParser.T__13)
            self.state = 690
            self.match(ModelicaParser.T__39)
        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 accept(self, visitor):
            if hasattr(visitor, "visitFor_equation"):
                return visitor.visitFor_equation(self)
            else:
                return visitor.visitChildren(self)




    def for_equation(self):

        localctx = ModelicaParser.For_equationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_for_equation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 692
            self.match(ModelicaParser.T__48)
            self.state = 693
            self.for_indices()
            self.state = 694
            self.match(ModelicaParser.T__49)
            self.state = 700
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,93,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 695
                    self.equation()
                    self.state = 696
                    self.match(ModelicaParser.T__0) 
                self.state = 702
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,93,self._ctx)

            self.state = 703
            self.match(ModelicaParser.T__13)
            self.state = 704
            self.match(ModelicaParser.T__48)
        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 accept(self, visitor):
            if hasattr(visitor, "visitFor_statement"):
                return visitor.visitFor_statement(self)
            else:
                return visitor.visitChildren(self)




    def for_statement(self):

        localctx = ModelicaParser.For_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_for_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 706
            self.match(ModelicaParser.T__48)
            self.state = 707
            self.for_indices()
            self.state = 708
            self.match(ModelicaParser.T__49)
            self.state = 714
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 709
                self.statement()
                self.state = 710
                self.match(ModelicaParser.T__0)
                self.state = 716
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 717
            self.match(ModelicaParser.T__13)
            self.state = 718
            self.match(ModelicaParser.T__48)
        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 accept(self, visitor):
            if hasattr(visitor, "visitFor_indices"):
                return visitor.visitFor_indices(self)
            else:
                return visitor.visitChildren(self)




    def for_indices(self):

        localctx = ModelicaParser.For_indicesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_for_indices)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 720
            self.for_index()
            self.state = 725
            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 = 721
                    self.match(ModelicaParser.T__20)
                    self.state = 722
                    self.for_index() 
                self.state = 727
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,95,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 accept(self, visitor):
            if hasattr(visitor, "visitFor_index"):
                return visitor.visitFor_index(self)
            else:
                return visitor.visitChildren(self)




    def for_index(self):

        localctx = ModelicaParser.For_indexContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_for_index)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 728
            self.match(ModelicaParser.IDENT)
            self.state = 731
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__50:
                self.state = 729
                self.match(ModelicaParser.T__50)
                self.state = 730
                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 accept(self, visitor):
            if hasattr(visitor, "visitWhile_statement"):
                return visitor.visitWhile_statement(self)
            else:
                return visitor.visitChildren(self)




    def while_statement(self):

        localctx = ModelicaParser.While_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_while_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 733
            self.match(ModelicaParser.T__51)
            self.state = 734
            self.expression()
            self.state = 735
            self.match(ModelicaParser.T__49)
            self.state = 741
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 736
                self.statement()
                self.state = 737
                self.match(ModelicaParser.T__0)
                self.state = 743
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 744
            self.match(ModelicaParser.T__13)
            self.state = 745
            self.match(ModelicaParser.T__51)
        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 accept(self, visitor):
            if hasattr(visitor, "visitWhen_equation"):
                return visitor.visitWhen_equation(self)
            else:
                return visitor.visitChildren(self)




    def when_equation(self):

        localctx = ModelicaParser.When_equationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_when_equation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 747
            self.match(ModelicaParser.T__52)
            self.state = 748
            self.expression()
            self.state = 749
            self.match(ModelicaParser.T__45)
            self.state = 755
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,98,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 750
                    self.equation()
                    self.state = 751
                    self.match(ModelicaParser.T__0) 
                self.state = 757
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,98,self._ctx)

            self.state = 771
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__53:
                self.state = 758
                self.match(ModelicaParser.T__53)
                self.state = 759
                self.expression()
                self.state = 760
                self.match(ModelicaParser.T__45)
                self.state = 766
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,99,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 761
                        self.equation()
                        self.state = 762
                        self.match(ModelicaParser.T__0) 
                    self.state = 768
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,99,self._ctx)

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

            self.state = 774
            self.match(ModelicaParser.T__13)
            self.state = 775
            self.match(ModelicaParser.T__52)
        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 accept(self, visitor):
            if hasattr(visitor, "visitWhen_statement"):
                return visitor.visitWhen_statement(self)
            else:
                return visitor.visitChildren(self)




    def when_statement(self):

        localctx = ModelicaParser.When_statementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_when_statement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 777
            self.match(ModelicaParser.T__52)
            self.state = 778
            self.expression()
            self.state = 779
            self.match(ModelicaParser.T__45)
            self.state = 785
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                self.state = 780
                self.statement()
                self.state = 781
                self.match(ModelicaParser.T__0)
                self.state = 787
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 801
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__53:
                self.state = 788
                self.match(ModelicaParser.T__53)
                self.state = 789
                self.expression()
                self.state = 790
                self.match(ModelicaParser.T__45)
                self.state = 796
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__43) | (1 << ModelicaParser.T__44) | (1 << ModelicaParser.T__48) | (1 << ModelicaParser.T__51) | (1 << ModelicaParser.T__52))) != 0) or _la==ModelicaParser.IDENT:
                    self.state = 791
                    self.statement()
                    self.state = 792
                    self.match(ModelicaParser.T__0)
                    self.state = 798
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            self.state = 804
            self.match(ModelicaParser.T__13)
            self.state = 805
            self.match(ModelicaParser.T__52)
        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 accept(self, visitor):
            if hasattr(visitor, "visitConnect_clause"):
                return visitor.visitConnect_clause(self)
            else:
                return visitor.visitChildren(self)




    def connect_clause(self):

        localctx = ModelicaParser.Connect_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_connect_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 807
            self.match(ModelicaParser.T__54)
            self.state = 808
            self.match(ModelicaParser.T__16)
            self.state = 809
            self.component_reference()
            self.state = 810
            self.match(ModelicaParser.T__20)
            self.state = 811
            self.component_reference()
            self.state = 812
            self.match(ModelicaParser.T__18)
        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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpression_simple"):
                return visitor.visitExpression_simple(self)
            else:
                return visitor.visitChildren(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 accept(self, visitor):
            if hasattr(visitor, "visitExpression_if"):
                return visitor.visitExpression_if(self)
            else:
                return visitor.visitChildren(self)



    def expression(self):

        localctx = ModelicaParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_expression)
        self._la = 0 # Token type
        try:
            self.state = 832
            token = self._input.LA(1)
            if token in [ModelicaParser.T__13, ModelicaParser.T__16, ModelicaParser.T__19, ModelicaParser.T__27, ModelicaParser.T__29, ModelicaParser.T__55, ModelicaParser.T__70, ModelicaParser.T__73, ModelicaParser.T__74, ModelicaParser.T__75, ModelicaParser.INITIAL, ModelicaParser.IDENT, ModelicaParser.STRING, ModelicaParser.UNSIGNED_NUMBER]:
                localctx = ModelicaParser.Expression_simpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 814
                self.simple_expression()

            elif token in [ModelicaParser.T__39]:
                localctx = ModelicaParser.Expression_ifContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 815
                self.match(ModelicaParser.T__39)
                self.state = 816
                self.expression()
                self.state = 817
                self.match(ModelicaParser.T__45)
                self.state = 818
                self.expression()
                self.state = 826
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__46:
                    self.state = 819
                    self.match(ModelicaParser.T__46)
                    self.state = 820
                    self.expression()
                    self.state = 821
                    self.match(ModelicaParser.T__45)
                    self.state = 822
                    self.expression()
                    self.state = 828
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 829
                self.match(ModelicaParser.T__47)
                self.state = 830
                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 accept(self, visitor):
            if hasattr(visitor, "visitSimple_expression"):
                return visitor.visitSimple_expression(self)
            else:
                return visitor.visitChildren(self)




    def simple_expression(self):

        localctx = ModelicaParser.Simple_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_simple_expression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 834
            self.expr(0)
            self.state = 841
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__17:
                self.state = 835
                self.match(ModelicaParser.T__17)
                self.state = 836
                self.expr(0)
                self.state = 839
                _la = self._input.LA(1)
                if _la==ModelicaParser.T__17:
                    self.state = 837
                    self.match(ModelicaParser.T__17)
                    self.state = 838
                    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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpr_or"):
                return visitor.visitExpr_or(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpr_primary"):
                return visitor.visitExpr_primary(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpr_and"):
                return visitor.visitExpr_and(self)
            else:
                return visitor.visitChildren(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)

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


    class Expr_negContext(ExprContext):

        def __init__(self, parser, ctx): # actually a ModelicaParser.ExprContext)
            super(ModelicaParser.Expr_negContext, self).__init__(parser)
            self.op = None # Token
            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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpr_neg"):
                return visitor.visitExpr_neg(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpr_not"):
                return visitor.visitExpr_not(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpr_mul"):
                return visitor.visitExpr_mul(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitExpr_add"):
                return visitor.visitExpr_add(self)
            else:
                return visitor.visitChildren(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 accept(self, visitor):
            if hasattr(visitor, "visitExpr_exp"):
                return visitor.visitExpr_exp(self)
            else:
                return visitor.visitChildren(self)



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

                self.state = 844
                localctx.op = self.match(ModelicaParser.T__55)
                self.state = 845
                self.expr(9)
                pass

            elif la_ == 2:
                localctx = ModelicaParser.Expr_notContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 846
                self.match(ModelicaParser.T__70)
                self.state = 847
                self.expr(4)
                pass

            elif la_ == 3:
                localctx = ModelicaParser.Expr_expContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 848
                self.primary()
                self.state = 849
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==ModelicaParser.T__56 or _la==ModelicaParser.T__57):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self.consume()
                self.state = 850
                self.primary()
                pass

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


            self._ctx.stop = self._input.LT(-1)
            self.state = 872
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,110,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 = 870
                    la_ = self._interp.adaptivePredict(self._input,109,self._ctx)
                    if la_ == 1:
                        localctx = ModelicaParser.Expr_mulContext(self, ModelicaParser.ExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 855
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 856
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__28) | (1 << ModelicaParser.T__58) | (1 << ModelicaParser.T__59) | (1 << ModelicaParser.T__60))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self.consume()
                        self.state = 857
                        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 = 858
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 859
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(((((_la - 56)) & ~0x3f) == 0 and ((1 << (_la - 56)) & ((1 << (ModelicaParser.T__55 - 56)) | (1 << (ModelicaParser.T__61 - 56)) | (1 << (ModelicaParser.T__62 - 56)) | (1 << (ModelicaParser.T__63 - 56)))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self.consume()
                        self.state = 860
                        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 = 861
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 862
                        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__65 - 65)) | (1 << (ModelicaParser.T__66 - 65)) | (1 << (ModelicaParser.T__67 - 65)) | (1 << (ModelicaParser.T__68 - 65)) | (1 << (ModelicaParser.T__69 - 65)))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self.consume()
                        self.state = 863
                        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 = 864
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 865
                        self.match(ModelicaParser.T__71)
                        self.state = 866
                        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 = 867
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 868
                        self.match(ModelicaParser.T__72)
                        self.state = 869
                        self.expr(3)
                        pass

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

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_initial"):
                return visitor.visitPrimary_initial(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_derivative"):
                return visitor.visitPrimary_derivative(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_output_expression_list"):
                return visitor.visitPrimary_output_expression_list(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_function"):
                return visitor.visitPrimary_function(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_expression_list"):
                return visitor.visitPrimary_expression_list(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_false"):
                return visitor.visitPrimary_false(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_function_arguments"):
                return visitor.visitPrimary_function_arguments(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_end"):
                return visitor.visitPrimary_end(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_true"):
                return visitor.visitPrimary_true(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_component_reference"):
                return visitor.visitPrimary_component_reference(self)
            else:
                return visitor.visitChildren(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)

        def accept(self, visitor):
            if hasattr(visitor, "visitPrimary_string"):
                return visitor.visitPrimary_string(self)
            else:
                return visitor.visitChildren(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 accept(self, visitor):
            if hasattr(visitor, "visitPrimary_unsigned_number"):
                return visitor.visitPrimary_unsigned_number(self)
            else:
                return visitor.visitChildren(self)



    def primary(self):

        localctx = ModelicaParser.PrimaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_primary)
        self._la = 0 # Token type
        try:
            self.state = 911
            la_ = self._interp.adaptivePredict(self._input,112,self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Primary_unsigned_numberContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 875
                self.match(ModelicaParser.UNSIGNED_NUMBER)
                pass

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

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

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

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

            elif la_ == 6:
                localctx = ModelicaParser.Primary_derivativeContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 882
                self.match(ModelicaParser.T__19)
                self.state = 883
                self.function_call_args()
                pass

            elif la_ == 7:
                localctx = ModelicaParser.Primary_initialContext(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 884
                self.match(ModelicaParser.INITIAL)
                self.state = 885
                self.function_call_args()
                pass

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

            elif la_ == 9:
                localctx = ModelicaParser.Primary_output_expression_listContext(self, localctx)
                self.enterOuterAlt(localctx, 9)
                self.state = 887
                self.match(ModelicaParser.T__16)
                self.state = 888
                self.output_expression_list()
                self.state = 889
                self.match(ModelicaParser.T__18)
                pass

            elif la_ == 10:
                localctx = ModelicaParser.Primary_expression_listContext(self, localctx)
                self.enterOuterAlt(localctx, 10)
                self.state = 891
                self.match(ModelicaParser.T__75)
                self.state = 892
                self.expression_list()
                self.state = 897
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__0:
                    self.state = 893
                    self.match(ModelicaParser.T__0)
                    self.state = 894
                    self.expression_list()
                    self.state = 899
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 900
                self.match(ModelicaParser.T__76)
                pass

            elif la_ == 11:
                localctx = ModelicaParser.Primary_function_argumentsContext(self, localctx)
                self.enterOuterAlt(localctx, 11)
                self.state = 902
                self.match(ModelicaParser.T__29)
                self.state = 903
                self.function_arguments()
                self.state = 904
                self.match(ModelicaParser.T__30)
                pass

            elif la_ == 12:
                localctx = ModelicaParser.Primary_function_argumentsContext(self, localctx)
                self.enterOuterAlt(localctx, 12)
                self.state = 906
                self.match(ModelicaParser.T__29)
                self.state = 907
                self.function_arguments()
                self.state = 908
                self.match(ModelicaParser.T__30)
                pass

            elif la_ == 13:
                localctx = ModelicaParser.Primary_endContext(self, localctx)
                self.enterOuterAlt(localctx, 13)
                self.state = 910
                self.match(ModelicaParser.T__13)
                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 accept(self, visitor):
            if hasattr(visitor, "visitName"):
                return visitor.visitName(self)
            else:
                return visitor.visitChildren(self)




    def name(self):

        localctx = ModelicaParser.NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 914
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__27:
                self.state = 913
                self.match(ModelicaParser.T__27)


            self.state = 916
            self.match(ModelicaParser.IDENT)
            self.state = 921
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,114,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 917
                    self.match(ModelicaParser.T__27)
                    self.state = 918
                    self.match(ModelicaParser.IDENT) 
                self.state = 923
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,114,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 accept(self, visitor):
            if hasattr(visitor, "visitComponent_reference"):
                return visitor.visitComponent_reference(self)
            else:
                return visitor.visitChildren(self)




    def component_reference(self):

        localctx = ModelicaParser.Component_referenceContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_component_reference)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 925
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__27:
                self.state = 924
                self.match(ModelicaParser.T__27)


            self.state = 927
            self.match(ModelicaParser.IDENT)
            self.state = 929
            la_ = self._interp.adaptivePredict(self._input,116,self._ctx)
            if la_ == 1:
                self.state = 928
                self.array_subscripts()


            self.state = 938
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,118,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 931
                    self.match(ModelicaParser.T__27)
                    self.state = 932
                    self.match(ModelicaParser.IDENT)
                    self.state = 934
                    la_ = self._interp.adaptivePredict(self._input,117,self._ctx)
                    if la_ == 1:
                        self.state = 933
                        self.array_subscripts()

             
                self.state = 940
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,118,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 accept(self, visitor):
            if hasattr(visitor, "visitFunction_call_args"):
                return visitor.visitFunction_call_args(self)
            else:
                return visitor.visitChildren(self)




    def function_call_args(self):

        localctx = ModelicaParser.Function_call_argsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_function_call_args)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 941
            self.match(ModelicaParser.T__16)
            self.state = 943
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__12) | (1 << ModelicaParser.T__13) | (1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__19) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__29) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__55))) != 0) or ((((_la - 71)) & ~0x3f) == 0 and ((1 << (_la - 71)) & ((1 << (ModelicaParser.T__70 - 71)) | (1 << (ModelicaParser.T__73 - 71)) | (1 << (ModelicaParser.T__74 - 71)) | (1 << (ModelicaParser.T__75 - 71)) | (1 << (ModelicaParser.INITIAL - 71)) | (1 << (ModelicaParser.IDENT - 71)) | (1 << (ModelicaParser.STRING - 71)) | (1 << (ModelicaParser.UNSIGNED_NUMBER - 71)))) != 0):
                self.state = 942
                self.function_arguments()


            self.state = 945
            self.match(ModelicaParser.T__18)
        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 accept(self, visitor):
            if hasattr(visitor, "visitFunction_arguments"):
                return visitor.visitFunction_arguments(self)
            else:
                return visitor.visitChildren(self)




    def function_arguments(self):

        localctx = ModelicaParser.Function_argumentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_function_arguments)
        self._la = 0 # Token type
        try:
            self.state = 958
            la_ = self._interp.adaptivePredict(self._input,122,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 947
                self.function_argument()
                self.state = 954
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__20 or _la==ModelicaParser.T__48:
                    self.state = 952
                    token = self._input.LA(1)
                    if token in [ModelicaParser.T__20]:
                        self.state = 948
                        self.match(ModelicaParser.T__20)
                        self.state = 949
                        self.function_argument()

                    elif token in [ModelicaParser.T__48]:
                        self.state = 950
                        self.match(ModelicaParser.T__48)
                        self.state = 951
                        self.for_indices()

                    else:
                        raise NoViableAltException(self)

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

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 957
                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 accept(self, visitor):
            if hasattr(visitor, "visitNamed_arguments"):
                return visitor.visitNamed_arguments(self)
            else:
                return visitor.visitChildren(self)




    def named_arguments(self):

        localctx = ModelicaParser.Named_argumentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_named_arguments)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 960
            self.named_argument()
            self.state = 965
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__20:
                self.state = 961
                self.match(ModelicaParser.T__20)
                self.state = 962
                self.named_argument()
                self.state = 967
                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 accept(self, visitor):
            if hasattr(visitor, "visitNamed_argument"):
                return visitor.visitNamed_argument(self)
            else:
                return visitor.visitChildren(self)




    def named_argument(self):

        localctx = ModelicaParser.Named_argumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_named_argument)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 968
            self.match(ModelicaParser.IDENT)
            self.state = 969
            self.match(ModelicaParser.T__14)
            self.state = 970
            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)

        def accept(self, visitor):
            if hasattr(visitor, "visitArgument_function"):
                return visitor.visitArgument_function(self)
            else:
                return visitor.visitChildren(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 accept(self, visitor):
            if hasattr(visitor, "visitArgument_expression"):
                return visitor.visitArgument_expression(self)
            else:
                return visitor.visitChildren(self)



    def function_argument(self):

        localctx = ModelicaParser.Function_argumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_function_argument)
        self._la = 0 # Token type
        try:
            self.state = 981
            token = self._input.LA(1)
            if token in [ModelicaParser.T__12]:
                localctx = ModelicaParser.Argument_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 972
                self.match(ModelicaParser.T__12)
                self.state = 973
                self.name()
                self.state = 974
                self.match(ModelicaParser.T__16)
                self.state = 976
                _la = self._input.LA(1)
                if _la==ModelicaParser.IDENT:
                    self.state = 975
                    self.named_arguments()


                self.state = 978
                self.match(ModelicaParser.T__18)

            elif token in [ModelicaParser.T__13, ModelicaParser.T__16, ModelicaParser.T__19, ModelicaParser.T__27, ModelicaParser.T__29, ModelicaParser.T__39, ModelicaParser.T__55, ModelicaParser.T__70, ModelicaParser.T__73, ModelicaParser.T__74, ModelicaParser.T__75, ModelicaParser.INITIAL, ModelicaParser.IDENT, ModelicaParser.STRING, ModelicaParser.UNSIGNED_NUMBER]:
                localctx = ModelicaParser.Argument_expressionContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 980
                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 accept(self, visitor):
            if hasattr(visitor, "visitOutput_expression_list"):
                return visitor.visitOutput_expression_list(self)
            else:
                return visitor.visitChildren(self)




    def output_expression_list(self):

        localctx = ModelicaParser.Output_expression_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_output_expression_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 984
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << ModelicaParser.T__13) | (1 << ModelicaParser.T__16) | (1 << ModelicaParser.T__19) | (1 << ModelicaParser.T__27) | (1 << ModelicaParser.T__29) | (1 << ModelicaParser.T__39) | (1 << ModelicaParser.T__55))) != 0) or ((((_la - 71)) & ~0x3f) == 0 and ((1 << (_la - 71)) & ((1 << (ModelicaParser.T__70 - 71)) | (1 << (ModelicaParser.T__73 - 71)) | (1 << (ModelicaParser.T__74 - 71)) | (1 << (ModelicaParser.T__75 - 71)) | (1 << (ModelicaParser.INITIAL - 71)) | (1 << (ModelicaParser.IDENT - 71)) | (1 << (ModelicaParser.STRING - 71)) | (1 << (ModelicaParser.UNSIGNED_NUMBER - 71)))) != 0):
                self.state = 983
                self.expression()


            self.state = 990
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__20:
                self.state = 986
                self.match(ModelicaParser.T__20)
                self.state = 987
                self.expression()
                self.state = 992
                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 accept(self, visitor):
            if hasattr(visitor, "visitExpression_list"):
                return visitor.visitExpression_list(self)
            else:
                return visitor.visitChildren(self)




    def expression_list(self):

        localctx = ModelicaParser.Expression_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_expression_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 993
            self.expression()
            self.state = 998
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__20:
                self.state = 994
                self.match(ModelicaParser.T__20)
                self.state = 995
                self.expression()
                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 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 accept(self, visitor):
            if hasattr(visitor, "visitArray_subscripts"):
                return visitor.visitArray_subscripts(self)
            else:
                return visitor.visitChildren(self)




    def array_subscripts(self):

        localctx = ModelicaParser.Array_subscriptsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_array_subscripts)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1001
            self.match(ModelicaParser.T__75)
            self.state = 1002
            self.subscript()
            self.state = 1007
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==ModelicaParser.T__20:
                self.state = 1003
                self.match(ModelicaParser.T__20)
                self.state = 1004
                self.subscript()
                self.state = 1009
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 1010
            self.match(ModelicaParser.T__76)
        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 accept(self, visitor):
            if hasattr(visitor, "visitSubscript"):
                return visitor.visitSubscript(self)
            else:
                return visitor.visitChildren(self)




    def subscript(self):

        localctx = ModelicaParser.SubscriptContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_subscript)
        try:
            self.state = 1014
            token = self._input.LA(1)
            if token in [ModelicaParser.T__17]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1012
                self.match(ModelicaParser.T__17)

            elif token in [ModelicaParser.T__13, ModelicaParser.T__16, ModelicaParser.T__19, ModelicaParser.T__27, ModelicaParser.T__29, ModelicaParser.T__39, ModelicaParser.T__55, ModelicaParser.T__70, ModelicaParser.T__73, ModelicaParser.T__74, ModelicaParser.T__75, ModelicaParser.INITIAL, ModelicaParser.IDENT, ModelicaParser.STRING, ModelicaParser.UNSIGNED_NUMBER]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1013
                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 accept(self, visitor):
            if hasattr(visitor, "visitComment"):
                return visitor.visitComment(self)
            else:
                return visitor.visitChildren(self)




    def comment(self):

        localctx = ModelicaParser.CommentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1016
            self.string_comment()
            self.state = 1018
            _la = self._input.LA(1)
            if _la==ModelicaParser.T__77:
                self.state = 1017
                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 accept(self, visitor):
            if hasattr(visitor, "visitString_comment"):
                return visitor.visitString_comment(self)
            else:
                return visitor.visitChildren(self)




    def string_comment(self):

        localctx = ModelicaParser.String_commentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_string_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1028
            _la = self._input.LA(1)
            if _la==ModelicaParser.STRING:
                self.state = 1020
                self.match(ModelicaParser.STRING)
                self.state = 1025
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==ModelicaParser.T__61:
                    self.state = 1021
                    self.match(ModelicaParser.T__61)
                    self.state = 1022
                    self.match(ModelicaParser.STRING)
                    self.state = 1027
                    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 accept(self, visitor):
            if hasattr(visitor, "visitAnnotation"):
                return visitor.visitAnnotation(self)
            else:
                return visitor.visitChildren(self)




    def annotation(self):

        localctx = ModelicaParser.AnnotationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_annotation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1030
            self.match(ModelicaParser.T__77)
            self.state = 1031
            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[56] = 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)
         




