# Generated from Modelica.g4 by ANTLR 4.13.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys

if sys.version_info[1] > 5:
    from typing import TextIO
else:
    from typing.io import TextIO


def serializedATN():
    return [
        4,
        1,
        93,
        959,
        2,
        0,
        7,
        0,
        2,
        1,
        7,
        1,
        2,
        2,
        7,
        2,
        2,
        3,
        7,
        3,
        2,
        4,
        7,
        4,
        2,
        5,
        7,
        5,
        2,
        6,
        7,
        6,
        2,
        7,
        7,
        7,
        2,
        8,
        7,
        8,
        2,
        9,
        7,
        9,
        2,
        10,
        7,
        10,
        2,
        11,
        7,
        11,
        2,
        12,
        7,
        12,
        2,
        13,
        7,
        13,
        2,
        14,
        7,
        14,
        2,
        15,
        7,
        15,
        2,
        16,
        7,
        16,
        2,
        17,
        7,
        17,
        2,
        18,
        7,
        18,
        2,
        19,
        7,
        19,
        2,
        20,
        7,
        20,
        2,
        21,
        7,
        21,
        2,
        22,
        7,
        22,
        2,
        23,
        7,
        23,
        2,
        24,
        7,
        24,
        2,
        25,
        7,
        25,
        2,
        26,
        7,
        26,
        2,
        27,
        7,
        27,
        2,
        28,
        7,
        28,
        2,
        29,
        7,
        29,
        2,
        30,
        7,
        30,
        2,
        31,
        7,
        31,
        2,
        32,
        7,
        32,
        2,
        33,
        7,
        33,
        2,
        34,
        7,
        34,
        2,
        35,
        7,
        35,
        2,
        36,
        7,
        36,
        2,
        37,
        7,
        37,
        2,
        38,
        7,
        38,
        2,
        39,
        7,
        39,
        2,
        40,
        7,
        40,
        2,
        41,
        7,
        41,
        2,
        42,
        7,
        42,
        2,
        43,
        7,
        43,
        2,
        44,
        7,
        44,
        2,
        45,
        7,
        45,
        2,
        46,
        7,
        46,
        2,
        47,
        7,
        47,
        2,
        48,
        7,
        48,
        2,
        49,
        7,
        49,
        2,
        50,
        7,
        50,
        2,
        51,
        7,
        51,
        2,
        52,
        7,
        52,
        2,
        53,
        7,
        53,
        2,
        54,
        7,
        54,
        2,
        55,
        7,
        55,
        2,
        56,
        7,
        56,
        2,
        57,
        7,
        57,
        2,
        58,
        7,
        58,
        2,
        59,
        7,
        59,
        2,
        60,
        7,
        60,
        2,
        61,
        7,
        61,
        2,
        62,
        7,
        62,
        2,
        63,
        7,
        63,
        2,
        64,
        7,
        64,
        2,
        65,
        7,
        65,
        2,
        66,
        7,
        66,
        2,
        67,
        7,
        67,
        2,
        68,
        7,
        68,
        2,
        69,
        7,
        69,
        2,
        70,
        7,
        70,
        2,
        71,
        7,
        71,
        2,
        72,
        7,
        72,
        2,
        73,
        7,
        73,
        2,
        74,
        7,
        74,
        2,
        75,
        7,
        75,
        1,
        0,
        1,
        0,
        3,
        0,
        155,
        8,
        0,
        1,
        0,
        3,
        0,
        158,
        8,
        0,
        1,
        0,
        5,
        0,
        161,
        8,
        0,
        10,
        0,
        12,
        0,
        164,
        9,
        0,
        1,
        1,
        3,
        1,
        167,
        8,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        2,
        3,
        2,
        173,
        8,
        2,
        1,
        2,
        1,
        2,
        1,
        2,
        1,
        3,
        3,
        3,
        179,
        8,
        3,
        1,
        3,
        1,
        3,
        1,
        4,
        1,
        4,
        1,
        4,
        3,
        4,
        186,
        8,
        4,
        1,
        4,
        1,
        4,
        1,
        4,
        3,
        4,
        191,
        8,
        4,
        1,
        4,
        1,
        4,
        1,
        4,
        1,
        4,
        3,
        4,
        197,
        8,
        4,
        1,
        4,
        3,
        4,
        200,
        8,
        4,
        1,
        4,
        1,
        4,
        3,
        4,
        204,
        8,
        4,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        3,
        5,
        217,
        8,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        3,
        5,
        226,
        8,
        5,
        1,
        5,
        3,
        5,
        229,
        8,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        5,
        5,
        242,
        8,
        5,
        10,
        5,
        12,
        5,
        245,
        9,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        3,
        5,
        253,
        8,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        3,
        5,
        260,
        8,
        5,
        1,
        6,
        1,
        6,
        1,
        7,
        1,
        7,
        1,
        7,
        5,
        7,
        267,
        8,
        7,
        10,
        7,
        12,
        7,
        270,
        9,
        7,
        1,
        8,
        1,
        8,
        1,
        8,
        1,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        5,
        9,
        282,
        8,
        9,
        10,
        9,
        12,
        9,
        285,
        9,
        9,
        1,
        9,
        1,
        9,
        3,
        9,
        289,
        8,
        9,
        1,
        9,
        3,
        9,
        292,
        8,
        9,
        1,
        9,
        3,
        9,
        295,
        8,
        9,
        1,
        9,
        3,
        9,
        298,
        8,
        9,
        1,
        9,
        1,
        9,
        1,
        9,
        3,
        9,
        303,
        8,
        9,
        1,
        10,
        1,
        10,
        1,
        11,
        1,
        11,
        1,
        11,
        3,
        11,
        310,
        8,
        11,
        1,
        11,
        1,
        11,
        1,
        11,
        3,
        11,
        315,
        8,
        11,
        1,
        11,
        1,
        11,
        1,
        12,
        1,
        12,
        1,
        12,
        5,
        12,
        322,
        8,
        12,
        10,
        12,
        12,
        12,
        325,
        9,
        12,
        1,
        13,
        1,
        13,
        1,
        13,
        1,
        13,
        3,
        13,
        331,
        8,
        13,
        1,
        14,
        3,
        14,
        334,
        8,
        14,
        1,
        14,
        3,
        14,
        337,
        8,
        14,
        1,
        14,
        3,
        14,
        340,
        8,
        14,
        1,
        14,
        3,
        14,
        343,
        8,
        14,
        1,
        14,
        1,
        14,
        3,
        14,
        347,
        8,
        14,
        1,
        15,
        3,
        15,
        350,
        8,
        15,
        1,
        15,
        3,
        15,
        353,
        8,
        15,
        1,
        15,
        3,
        15,
        356,
        8,
        15,
        1,
        15,
        3,
        15,
        359,
        8,
        15,
        1,
        15,
        1,
        15,
        1,
        15,
        3,
        15,
        364,
        8,
        15,
        1,
        15,
        1,
        15,
        1,
        15,
        3,
        15,
        369,
        8,
        15,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        3,
        16,
        381,
        8,
        16,
        3,
        16,
        383,
        8,
        16,
        1,
        16,
        1,
        16,
        1,
        17,
        1,
        17,
        1,
        17,
        5,
        17,
        390,
        8,
        17,
        10,
        17,
        12,
        17,
        393,
        9,
        17,
        1,
        18,
        1,
        18,
        1,
        18,
        3,
        18,
        398,
        8,
        18,
        1,
        18,
        3,
        18,
        401,
        8,
        18,
        1,
        19,
        1,
        19,
        1,
        19,
        3,
        19,
        406,
        8,
        19,
        1,
        20,
        1,
        20,
        1,
        20,
        3,
        20,
        411,
        8,
        20,
        1,
        20,
        1,
        20,
        1,
        21,
        3,
        21,
        416,
        8,
        21,
        1,
        21,
        3,
        21,
        419,
        8,
        21,
        1,
        21,
        3,
        21,
        422,
        8,
        21,
        1,
        22,
        1,
        22,
        1,
        23,
        1,
        23,
        1,
        23,
        5,
        23,
        429,
        8,
        23,
        10,
        23,
        12,
        23,
        432,
        9,
        23,
        1,
        24,
        1,
        24,
        1,
        24,
        5,
        24,
        437,
        8,
        24,
        10,
        24,
        12,
        24,
        440,
        9,
        24,
        1,
        25,
        1,
        25,
        3,
        25,
        444,
        8,
        25,
        1,
        25,
        1,
        25,
        1,
        26,
        1,
        26,
        1,
        26,
        1,
        27,
        1,
        27,
        3,
        27,
        453,
        8,
        27,
        1,
        27,
        3,
        27,
        456,
        8,
        27,
        1,
        28,
        1,
        28,
        1,
        28,
        3,
        28,
        461,
        8,
        28,
        1,
        28,
        1,
        28,
        1,
        28,
        1,
        28,
        3,
        28,
        467,
        8,
        28,
        1,
        29,
        1,
        29,
        3,
        29,
        471,
        8,
        29,
        1,
        29,
        1,
        29,
        1,
        30,
        1,
        30,
        1,
        30,
        5,
        30,
        478,
        8,
        30,
        10,
        30,
        12,
        30,
        481,
        9,
        30,
        1,
        31,
        1,
        31,
        3,
        31,
        485,
        8,
        31,
        1,
        32,
        3,
        32,
        488,
        8,
        32,
        1,
        32,
        3,
        32,
        491,
        8,
        32,
        1,
        32,
        1,
        32,
        3,
        32,
        495,
        8,
        32,
        1,
        33,
        1,
        33,
        3,
        33,
        499,
        8,
        33,
        1,
        33,
        1,
        33,
        1,
        34,
        1,
        34,
        3,
        34,
        505,
        8,
        34,
        1,
        34,
        3,
        34,
        508,
        8,
        34,
        1,
        34,
        1,
        34,
        3,
        34,
        512,
        8,
        34,
        1,
        34,
        3,
        34,
        515,
        8,
        34,
        1,
        35,
        1,
        35,
        1,
        35,
        3,
        35,
        520,
        8,
        35,
        1,
        35,
        3,
        35,
        523,
        8,
        35,
        1,
        36,
        1,
        36,
        1,
        36,
        1,
        36,
        1,
        37,
        1,
        37,
        1,
        37,
        1,
        38,
        1,
        38,
        1,
        38,
        1,
        38,
        1,
        38,
        1,
        38,
        3,
        38,
        538,
        8,
        38,
        1,
        38,
        3,
        38,
        541,
        8,
        38,
        1,
        38,
        1,
        38,
        1,
        38,
        1,
        38,
        1,
        38,
        3,
        38,
        548,
        8,
        38,
        1,
        38,
        3,
        38,
        551,
        8,
        38,
        1,
        38,
        1,
        38,
        3,
        38,
        555,
        8,
        38,
        1,
        39,
        1,
        39,
        1,
        39,
        5,
        39,
        560,
        8,
        39,
        10,
        39,
        12,
        39,
        563,
        9,
        39,
        1,
        40,
        3,
        40,
        566,
        8,
        40,
        1,
        40,
        1,
        40,
        1,
        40,
        1,
        41,
        1,
        41,
        1,
        41,
        5,
        41,
        574,
        8,
        41,
        10,
        41,
        12,
        41,
        577,
        9,
        41,
        1,
        42,
        3,
        42,
        580,
        8,
        42,
        1,
        42,
        1,
        42,
        1,
        42,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        1,
        43,
        3,
        43,
        596,
        8,
        43,
        1,
        44,
        1,
        44,
        1,
        44,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        3,
        45,
        605,
        8,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        5,
        45,
        611,
        8,
        45,
        10,
        45,
        12,
        45,
        614,
        9,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        1,
        45,
        3,
        45,
        627,
        8,
        45,
        1,
        46,
        1,
        46,
        1,
        46,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        5,
        47,
        641,
        8,
        47,
        10,
        47,
        12,
        47,
        644,
        9,
        47,
        1,
        47,
        1,
        47,
        3,
        47,
        648,
        8,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        5,
        48,
        662,
        8,
        48,
        10,
        48,
        12,
        48,
        665,
        9,
        48,
        1,
        48,
        1,
        48,
        3,
        48,
        669,
        8,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        49,
        1,
        49,
        1,
        49,
        1,
        49,
        1,
        49,
        1,
        49,
        1,
        49,
        1,
        50,
        1,
        50,
        1,
        50,
        1,
        50,
        1,
        50,
        1,
        50,
        1,
        50,
        1,
        51,
        1,
        51,
        1,
        51,
        5,
        51,
        691,
        8,
        51,
        10,
        51,
        12,
        51,
        694,
        9,
        51,
        1,
        52,
        1,
        52,
        1,
        52,
        3,
        52,
        699,
        8,
        52,
        1,
        53,
        1,
        53,
        1,
        53,
        1,
        53,
        1,
        53,
        1,
        53,
        1,
        53,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        5,
        54,
        717,
        8,
        54,
        10,
        54,
        12,
        54,
        720,
        9,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        55,
        1,
        55,
        1,
        55,
        1,
        55,
        1,
        55,
        1,
        55,
        1,
        55,
        1,
        55,
        1,
        55,
        5,
        55,
        734,
        8,
        55,
        10,
        55,
        12,
        55,
        737,
        9,
        55,
        1,
        55,
        1,
        55,
        1,
        55,
        1,
        56,
        1,
        56,
        1,
        56,
        1,
        56,
        1,
        56,
        1,
        56,
        1,
        56,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        5,
        57,
        759,
        8,
        57,
        10,
        57,
        12,
        57,
        762,
        9,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        3,
        57,
        767,
        8,
        57,
        1,
        58,
        1,
        58,
        1,
        58,
        1,
        58,
        1,
        58,
        3,
        58,
        774,
        8,
        58,
        3,
        58,
        776,
        8,
        58,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        3,
        59,
        788,
        8,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        5,
        59,
        805,
        8,
        59,
        10,
        59,
        12,
        59,
        808,
        9,
        59,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        5,
        60,
        830,
        8,
        60,
        10,
        60,
        12,
        60,
        833,
        9,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        1,
        60,
        3,
        60,
        842,
        8,
        60,
        1,
        61,
        3,
        61,
        845,
        8,
        61,
        1,
        61,
        1,
        61,
        1,
        61,
        5,
        61,
        850,
        8,
        61,
        10,
        61,
        12,
        61,
        853,
        9,
        61,
        1,
        62,
        1,
        62,
        3,
        62,
        857,
        8,
        62,
        1,
        63,
        1,
        63,
        1,
        63,
        5,
        63,
        862,
        8,
        63,
        10,
        63,
        12,
        63,
        865,
        9,
        63,
        1,
        64,
        1,
        64,
        3,
        64,
        869,
        8,
        64,
        1,
        64,
        1,
        64,
        1,
        65,
        1,
        65,
        1,
        65,
        1,
        65,
        1,
        65,
        5,
        65,
        878,
        8,
        65,
        10,
        65,
        12,
        65,
        881,
        9,
        65,
        1,
        65,
        3,
        65,
        884,
        8,
        65,
        1,
        66,
        1,
        66,
        1,
        66,
        5,
        66,
        889,
        8,
        66,
        10,
        66,
        12,
        66,
        892,
        9,
        66,
        1,
        67,
        1,
        67,
        1,
        67,
        1,
        67,
        1,
        68,
        1,
        68,
        1,
        68,
        1,
        68,
        3,
        68,
        902,
        8,
        68,
        1,
        68,
        1,
        68,
        1,
        68,
        3,
        68,
        907,
        8,
        68,
        1,
        69,
        3,
        69,
        910,
        8,
        69,
        1,
        69,
        1,
        69,
        5,
        69,
        914,
        8,
        69,
        10,
        69,
        12,
        69,
        917,
        9,
        69,
        1,
        70,
        1,
        70,
        1,
        70,
        5,
        70,
        922,
        8,
        70,
        10,
        70,
        12,
        70,
        925,
        9,
        70,
        1,
        71,
        1,
        71,
        1,
        71,
        1,
        71,
        5,
        71,
        931,
        8,
        71,
        10,
        71,
        12,
        71,
        934,
        9,
        71,
        1,
        71,
        1,
        71,
        1,
        72,
        1,
        72,
        3,
        72,
        940,
        8,
        72,
        1,
        73,
        1,
        73,
        3,
        73,
        944,
        8,
        73,
        1,
        74,
        1,
        74,
        1,
        74,
        5,
        74,
        949,
        8,
        74,
        10,
        74,
        12,
        74,
        952,
        9,
        74,
        3,
        74,
        954,
        8,
        74,
        1,
        75,
        1,
        75,
        1,
        75,
        1,
        75,
        0,
        1,
        118,
        76,
        0,
        2,
        4,
        6,
        8,
        10,
        12,
        14,
        16,
        18,
        20,
        22,
        24,
        26,
        28,
        30,
        32,
        34,
        36,
        38,
        40,
        42,
        44,
        46,
        48,
        50,
        52,
        54,
        56,
        58,
        60,
        62,
        64,
        66,
        68,
        70,
        72,
        74,
        76,
        78,
        80,
        82,
        84,
        86,
        88,
        90,
        92,
        94,
        96,
        98,
        100,
        102,
        104,
        106,
        108,
        110,
        112,
        114,
        116,
        118,
        120,
        122,
        124,
        126,
        128,
        130,
        132,
        134,
        136,
        138,
        140,
        142,
        144,
        146,
        148,
        150,
        0,
        9,
        1,
        0,
        11,
        12,
        1,
        0,
        32,
        33,
        1,
        0,
        34,
        36,
        1,
        0,
        37,
        38,
        1,
        0,
        56,
        57,
        1,
        0,
        58,
        59,
        2,
        0,
        28,
        28,
        60,
        62,
        2,
        0,
        56,
        57,
        63,
        64,
        1,
        0,
        65,
        70,
        1042,
        0,
        157,
        1,
        0,
        0,
        0,
        2,
        166,
        1,
        0,
        0,
        0,
        4,
        172,
        1,
        0,
        0,
        0,
        6,
        178,
        1,
        0,
        0,
        0,
        8,
        203,
        1,
        0,
        0,
        0,
        10,
        259,
        1,
        0,
        0,
        0,
        12,
        261,
        1,
        0,
        0,
        0,
        14,
        263,
        1,
        0,
        0,
        0,
        16,
        271,
        1,
        0,
        0,
        0,
        18,
        274,
        1,
        0,
        0,
        0,
        20,
        304,
        1,
        0,
        0,
        0,
        22,
        309,
        1,
        0,
        0,
        0,
        24,
        323,
        1,
        0,
        0,
        0,
        26,
        330,
        1,
        0,
        0,
        0,
        28,
        333,
        1,
        0,
        0,
        0,
        30,
        349,
        1,
        0,
        0,
        0,
        32,
        370,
        1,
        0,
        0,
        0,
        34,
        386,
        1,
        0,
        0,
        0,
        36,
        394,
        1,
        0,
        0,
        0,
        38,
        402,
        1,
        0,
        0,
        0,
        40,
        407,
        1,
        0,
        0,
        0,
        42,
        415,
        1,
        0,
        0,
        0,
        44,
        423,
        1,
        0,
        0,
        0,
        46,
        425,
        1,
        0,
        0,
        0,
        48,
        433,
        1,
        0,
        0,
        0,
        50,
        441,
        1,
        0,
        0,
        0,
        52,
        447,
        1,
        0,
        0,
        0,
        54,
        450,
        1,
        0,
        0,
        0,
        56,
        466,
        1,
        0,
        0,
        0,
        58,
        468,
        1,
        0,
        0,
        0,
        60,
        474,
        1,
        0,
        0,
        0,
        62,
        484,
        1,
        0,
        0,
        0,
        64,
        487,
        1,
        0,
        0,
        0,
        66,
        496,
        1,
        0,
        0,
        0,
        68,
        502,
        1,
        0,
        0,
        0,
        70,
        516,
        1,
        0,
        0,
        0,
        72,
        524,
        1,
        0,
        0,
        0,
        74,
        528,
        1,
        0,
        0,
        0,
        76,
        531,
        1,
        0,
        0,
        0,
        78,
        561,
        1,
        0,
        0,
        0,
        80,
        565,
        1,
        0,
        0,
        0,
        82,
        575,
        1,
        0,
        0,
        0,
        84,
        579,
        1,
        0,
        0,
        0,
        86,
        595,
        1,
        0,
        0,
        0,
        88,
        597,
        1,
        0,
        0,
        0,
        90,
        626,
        1,
        0,
        0,
        0,
        92,
        628,
        1,
        0,
        0,
        0,
        94,
        631,
        1,
        0,
        0,
        0,
        96,
        652,
        1,
        0,
        0,
        0,
        98,
        673,
        1,
        0,
        0,
        0,
        100,
        680,
        1,
        0,
        0,
        0,
        102,
        687,
        1,
        0,
        0,
        0,
        104,
        695,
        1,
        0,
        0,
        0,
        106,
        700,
        1,
        0,
        0,
        0,
        108,
        707,
        1,
        0,
        0,
        0,
        110,
        724,
        1,
        0,
        0,
        0,
        112,
        741,
        1,
        0,
        0,
        0,
        114,
        766,
        1,
        0,
        0,
        0,
        116,
        768,
        1,
        0,
        0,
        0,
        118,
        787,
        1,
        0,
        0,
        0,
        120,
        841,
        1,
        0,
        0,
        0,
        122,
        844,
        1,
        0,
        0,
        0,
        124,
        854,
        1,
        0,
        0,
        0,
        126,
        858,
        1,
        0,
        0,
        0,
        128,
        866,
        1,
        0,
        0,
        0,
        130,
        883,
        1,
        0,
        0,
        0,
        132,
        885,
        1,
        0,
        0,
        0,
        134,
        893,
        1,
        0,
        0,
        0,
        136,
        906,
        1,
        0,
        0,
        0,
        138,
        909,
        1,
        0,
        0,
        0,
        140,
        918,
        1,
        0,
        0,
        0,
        142,
        926,
        1,
        0,
        0,
        0,
        144,
        939,
        1,
        0,
        0,
        0,
        146,
        941,
        1,
        0,
        0,
        0,
        148,
        953,
        1,
        0,
        0,
        0,
        150,
        955,
        1,
        0,
        0,
        0,
        152,
        154,
        5,
        83,
        0,
        0,
        153,
        155,
        3,
        126,
        63,
        0,
        154,
        153,
        1,
        0,
        0,
        0,
        154,
        155,
        1,
        0,
        0,
        0,
        155,
        156,
        1,
        0,
        0,
        0,
        156,
        158,
        5,
        1,
        0,
        0,
        157,
        152,
        1,
        0,
        0,
        0,
        157,
        158,
        1,
        0,
        0,
        0,
        158,
        162,
        1,
        0,
        0,
        0,
        159,
        161,
        3,
        2,
        1,
        0,
        160,
        159,
        1,
        0,
        0,
        0,
        161,
        164,
        1,
        0,
        0,
        0,
        162,
        160,
        1,
        0,
        0,
        0,
        162,
        163,
        1,
        0,
        0,
        0,
        163,
        1,
        1,
        0,
        0,
        0,
        164,
        162,
        1,
        0,
        0,
        0,
        165,
        167,
        5,
        82,
        0,
        0,
        166,
        165,
        1,
        0,
        0,
        0,
        166,
        167,
        1,
        0,
        0,
        0,
        167,
        168,
        1,
        0,
        0,
        0,
        168,
        169,
        3,
        4,
        2,
        0,
        169,
        170,
        5,
        1,
        0,
        0,
        170,
        3,
        1,
        0,
        0,
        0,
        171,
        173,
        5,
        84,
        0,
        0,
        172,
        171,
        1,
        0,
        0,
        0,
        172,
        173,
        1,
        0,
        0,
        0,
        173,
        174,
        1,
        0,
        0,
        0,
        174,
        175,
        3,
        6,
        3,
        0,
        175,
        176,
        3,
        10,
        5,
        0,
        176,
        5,
        1,
        0,
        0,
        0,
        177,
        179,
        5,
        81,
        0,
        0,
        178,
        177,
        1,
        0,
        0,
        0,
        178,
        179,
        1,
        0,
        0,
        0,
        179,
        180,
        1,
        0,
        0,
        0,
        180,
        181,
        3,
        8,
        4,
        0,
        181,
        7,
        1,
        0,
        0,
        0,
        182,
        204,
        5,
        2,
        0,
        0,
        183,
        204,
        5,
        3,
        0,
        0,
        184,
        186,
        5,
        4,
        0,
        0,
        185,
        184,
        1,
        0,
        0,
        0,
        185,
        186,
        1,
        0,
        0,
        0,
        186,
        187,
        1,
        0,
        0,
        0,
        187,
        204,
        5,
        5,
        0,
        0,
        188,
        204,
        5,
        6,
        0,
        0,
        189,
        191,
        5,
        7,
        0,
        0,
        190,
        189,
        1,
        0,
        0,
        0,
        190,
        191,
        1,
        0,
        0,
        0,
        191,
        192,
        1,
        0,
        0,
        0,
        192,
        204,
        5,
        8,
        0,
        0,
        193,
        204,
        5,
        9,
        0,
        0,
        194,
        204,
        5,
        10,
        0,
        0,
        195,
        197,
        7,
        0,
        0,
        0,
        196,
        195,
        1,
        0,
        0,
        0,
        196,
        197,
        1,
        0,
        0,
        0,
        197,
        199,
        1,
        0,
        0,
        0,
        198,
        200,
        5,
        4,
        0,
        0,
        199,
        198,
        1,
        0,
        0,
        0,
        199,
        200,
        1,
        0,
        0,
        0,
        200,
        201,
        1,
        0,
        0,
        0,
        201,
        204,
        5,
        13,
        0,
        0,
        202,
        204,
        5,
        4,
        0,
        0,
        203,
        182,
        1,
        0,
        0,
        0,
        203,
        183,
        1,
        0,
        0,
        0,
        203,
        185,
        1,
        0,
        0,
        0,
        203,
        188,
        1,
        0,
        0,
        0,
        203,
        190,
        1,
        0,
        0,
        0,
        203,
        193,
        1,
        0,
        0,
        0,
        203,
        194,
        1,
        0,
        0,
        0,
        203,
        196,
        1,
        0,
        0,
        0,
        203,
        202,
        1,
        0,
        0,
        0,
        204,
        9,
        1,
        0,
        0,
        0,
        205,
        206,
        5,
        89,
        0,
        0,
        206,
        207,
        3,
        148,
        74,
        0,
        207,
        208,
        3,
        18,
        9,
        0,
        208,
        209,
        5,
        14,
        0,
        0,
        209,
        210,
        5,
        89,
        0,
        0,
        210,
        260,
        1,
        0,
        0,
        0,
        211,
        212,
        5,
        89,
        0,
        0,
        212,
        213,
        5,
        15,
        0,
        0,
        213,
        214,
        3,
        12,
        6,
        0,
        214,
        216,
        3,
        126,
        63,
        0,
        215,
        217,
        3,
        58,
        29,
        0,
        216,
        215,
        1,
        0,
        0,
        0,
        216,
        217,
        1,
        0,
        0,
        0,
        217,
        218,
        1,
        0,
        0,
        0,
        218,
        219,
        3,
        146,
        73,
        0,
        219,
        260,
        1,
        0,
        0,
        0,
        220,
        221,
        5,
        89,
        0,
        0,
        221,
        222,
        5,
        15,
        0,
        0,
        222,
        223,
        5,
        16,
        0,
        0,
        223,
        228,
        5,
        17,
        0,
        0,
        224,
        226,
        3,
        14,
        7,
        0,
        225,
        224,
        1,
        0,
        0,
        0,
        225,
        226,
        1,
        0,
        0,
        0,
        226,
        229,
        1,
        0,
        0,
        0,
        227,
        229,
        5,
        18,
        0,
        0,
        228,
        225,
        1,
        0,
        0,
        0,
        228,
        227,
        1,
        0,
        0,
        0,
        229,
        230,
        1,
        0,
        0,
        0,
        230,
        231,
        5,
        19,
        0,
        0,
        231,
        260,
        3,
        146,
        73,
        0,
        232,
        233,
        5,
        89,
        0,
        0,
        233,
        234,
        5,
        15,
        0,
        0,
        234,
        235,
        5,
        20,
        0,
        0,
        235,
        236,
        5,
        17,
        0,
        0,
        236,
        237,
        3,
        122,
        61,
        0,
        237,
        238,
        5,
        21,
        0,
        0,
        238,
        243,
        5,
        89,
        0,
        0,
        239,
        240,
        5,
        21,
        0,
        0,
        240,
        242,
        5,
        89,
        0,
        0,
        241,
        239,
        1,
        0,
        0,
        0,
        242,
        245,
        1,
        0,
        0,
        0,
        243,
        241,
        1,
        0,
        0,
        0,
        243,
        244,
        1,
        0,
        0,
        0,
        244,
        246,
        1,
        0,
        0,
        0,
        245,
        243,
        1,
        0,
        0,
        0,
        246,
        247,
        5,
        19,
        0,
        0,
        247,
        248,
        3,
        146,
        73,
        0,
        248,
        260,
        1,
        0,
        0,
        0,
        249,
        250,
        5,
        22,
        0,
        0,
        250,
        252,
        5,
        89,
        0,
        0,
        251,
        253,
        3,
        58,
        29,
        0,
        252,
        251,
        1,
        0,
        0,
        0,
        252,
        253,
        1,
        0,
        0,
        0,
        253,
        254,
        1,
        0,
        0,
        0,
        254,
        255,
        3,
        148,
        74,
        0,
        255,
        256,
        3,
        18,
        9,
        0,
        256,
        257,
        5,
        14,
        0,
        0,
        257,
        258,
        5,
        89,
        0,
        0,
        258,
        260,
        1,
        0,
        0,
        0,
        259,
        205,
        1,
        0,
        0,
        0,
        259,
        211,
        1,
        0,
        0,
        0,
        259,
        220,
        1,
        0,
        0,
        0,
        259,
        232,
        1,
        0,
        0,
        0,
        259,
        249,
        1,
        0,
        0,
        0,
        260,
        11,
        1,
        0,
        0,
        0,
        261,
        262,
        3,
        42,
        21,
        0,
        262,
        13,
        1,
        0,
        0,
        0,
        263,
        268,
        3,
        16,
        8,
        0,
        264,
        265,
        5,
        21,
        0,
        0,
        265,
        267,
        3,
        16,
        8,
        0,
        266,
        264,
        1,
        0,
        0,
        0,
        267,
        270,
        1,
        0,
        0,
        0,
        268,
        266,
        1,
        0,
        0,
        0,
        268,
        269,
        1,
        0,
        0,
        0,
        269,
        15,
        1,
        0,
        0,
        0,
        270,
        268,
        1,
        0,
        0,
        0,
        271,
        272,
        5,
        89,
        0,
        0,
        272,
        273,
        3,
        146,
        73,
        0,
        273,
        17,
        1,
        0,
        0,
        0,
        274,
        283,
        3,
        24,
        12,
        0,
        275,
        276,
        5,
        23,
        0,
        0,
        276,
        282,
        3,
        24,
        12,
        0,
        277,
        278,
        5,
        24,
        0,
        0,
        278,
        282,
        3,
        24,
        12,
        0,
        279,
        282,
        3,
        80,
        40,
        0,
        280,
        282,
        3,
        84,
        42,
        0,
        281,
        275,
        1,
        0,
        0,
        0,
        281,
        277,
        1,
        0,
        0,
        0,
        281,
        279,
        1,
        0,
        0,
        0,
        281,
        280,
        1,
        0,
        0,
        0,
        282,
        285,
        1,
        0,
        0,
        0,
        283,
        281,
        1,
        0,
        0,
        0,
        283,
        284,
        1,
        0,
        0,
        0,
        284,
        297,
        1,
        0,
        0,
        0,
        285,
        283,
        1,
        0,
        0,
        0,
        286,
        288,
        5,
        25,
        0,
        0,
        287,
        289,
        3,
        20,
        10,
        0,
        288,
        287,
        1,
        0,
        0,
        0,
        288,
        289,
        1,
        0,
        0,
        0,
        289,
        291,
        1,
        0,
        0,
        0,
        290,
        292,
        3,
        22,
        11,
        0,
        291,
        290,
        1,
        0,
        0,
        0,
        291,
        292,
        1,
        0,
        0,
        0,
        292,
        294,
        1,
        0,
        0,
        0,
        293,
        295,
        3,
        150,
        75,
        0,
        294,
        293,
        1,
        0,
        0,
        0,
        294,
        295,
        1,
        0,
        0,
        0,
        295,
        296,
        1,
        0,
        0,
        0,
        296,
        298,
        5,
        1,
        0,
        0,
        297,
        286,
        1,
        0,
        0,
        0,
        297,
        298,
        1,
        0,
        0,
        0,
        298,
        302,
        1,
        0,
        0,
        0,
        299,
        300,
        3,
        150,
        75,
        0,
        300,
        301,
        5,
        1,
        0,
        0,
        301,
        303,
        1,
        0,
        0,
        0,
        302,
        299,
        1,
        0,
        0,
        0,
        302,
        303,
        1,
        0,
        0,
        0,
        303,
        19,
        1,
        0,
        0,
        0,
        304,
        305,
        5,
        90,
        0,
        0,
        305,
        21,
        1,
        0,
        0,
        0,
        306,
        307,
        3,
        126,
        63,
        0,
        307,
        308,
        5,
        15,
        0,
        0,
        308,
        310,
        1,
        0,
        0,
        0,
        309,
        306,
        1,
        0,
        0,
        0,
        309,
        310,
        1,
        0,
        0,
        0,
        310,
        311,
        1,
        0,
        0,
        0,
        311,
        312,
        5,
        89,
        0,
        0,
        312,
        314,
        5,
        17,
        0,
        0,
        313,
        315,
        3,
        140,
        70,
        0,
        314,
        313,
        1,
        0,
        0,
        0,
        314,
        315,
        1,
        0,
        0,
        0,
        315,
        316,
        1,
        0,
        0,
        0,
        316,
        317,
        5,
        19,
        0,
        0,
        317,
        23,
        1,
        0,
        0,
        0,
        318,
        319,
        3,
        26,
        13,
        0,
        319,
        320,
        5,
        1,
        0,
        0,
        320,
        322,
        1,
        0,
        0,
        0,
        321,
        318,
        1,
        0,
        0,
        0,
        322,
        325,
        1,
        0,
        0,
        0,
        323,
        321,
        1,
        0,
        0,
        0,
        323,
        324,
        1,
        0,
        0,
        0,
        324,
        25,
        1,
        0,
        0,
        0,
        325,
        323,
        1,
        0,
        0,
        0,
        326,
        331,
        3,
        32,
        16,
        0,
        327,
        331,
        3,
        36,
        18,
        0,
        328,
        331,
        3,
        28,
        14,
        0,
        329,
        331,
        3,
        30,
        15,
        0,
        330,
        326,
        1,
        0,
        0,
        0,
        330,
        327,
        1,
        0,
        0,
        0,
        330,
        328,
        1,
        0,
        0,
        0,
        330,
        329,
        1,
        0,
        0,
        0,
        331,
        27,
        1,
        0,
        0,
        0,
        332,
        334,
        5,
        85,
        0,
        0,
        333,
        332,
        1,
        0,
        0,
        0,
        333,
        334,
        1,
        0,
        0,
        0,
        334,
        336,
        1,
        0,
        0,
        0,
        335,
        337,
        5,
        82,
        0,
        0,
        336,
        335,
        1,
        0,
        0,
        0,
        336,
        337,
        1,
        0,
        0,
        0,
        337,
        339,
        1,
        0,
        0,
        0,
        338,
        340,
        5,
        86,
        0,
        0,
        339,
        338,
        1,
        0,
        0,
        0,
        339,
        340,
        1,
        0,
        0,
        0,
        340,
        342,
        1,
        0,
        0,
        0,
        341,
        343,
        5,
        87,
        0,
        0,
        342,
        341,
        1,
        0,
        0,
        0,
        342,
        343,
        1,
        0,
        0,
        0,
        343,
        346,
        1,
        0,
        0,
        0,
        344,
        347,
        3,
        4,
        2,
        0,
        345,
        347,
        3,
        40,
        20,
        0,
        346,
        344,
        1,
        0,
        0,
        0,
        346,
        345,
        1,
        0,
        0,
        0,
        347,
        29,
        1,
        0,
        0,
        0,
        348,
        350,
        5,
        85,
        0,
        0,
        349,
        348,
        1,
        0,
        0,
        0,
        349,
        350,
        1,
        0,
        0,
        0,
        350,
        352,
        1,
        0,
        0,
        0,
        351,
        353,
        5,
        82,
        0,
        0,
        352,
        351,
        1,
        0,
        0,
        0,
        352,
        353,
        1,
        0,
        0,
        0,
        353,
        355,
        1,
        0,
        0,
        0,
        354,
        356,
        5,
        86,
        0,
        0,
        355,
        354,
        1,
        0,
        0,
        0,
        355,
        356,
        1,
        0,
        0,
        0,
        356,
        358,
        1,
        0,
        0,
        0,
        357,
        359,
        5,
        87,
        0,
        0,
        358,
        357,
        1,
        0,
        0,
        0,
        358,
        359,
        1,
        0,
        0,
        0,
        359,
        360,
        1,
        0,
        0,
        0,
        360,
        363,
        5,
        26,
        0,
        0,
        361,
        364,
        3,
        4,
        2,
        0,
        362,
        364,
        3,
        40,
        20,
        0,
        363,
        361,
        1,
        0,
        0,
        0,
        363,
        362,
        1,
        0,
        0,
        0,
        364,
        368,
        1,
        0,
        0,
        0,
        365,
        366,
        3,
        38,
        19,
        0,
        366,
        367,
        3,
        146,
        73,
        0,
        367,
        369,
        1,
        0,
        0,
        0,
        368,
        365,
        1,
        0,
        0,
        0,
        368,
        369,
        1,
        0,
        0,
        0,
        369,
        31,
        1,
        0,
        0,
        0,
        370,
        382,
        5,
        27,
        0,
        0,
        371,
        372,
        5,
        89,
        0,
        0,
        372,
        373,
        5,
        15,
        0,
        0,
        373,
        383,
        3,
        126,
        63,
        0,
        374,
        380,
        3,
        126,
        63,
        0,
        375,
        381,
        5,
        28,
        0,
        0,
        376,
        377,
        5,
        29,
        0,
        0,
        377,
        378,
        3,
        34,
        17,
        0,
        378,
        379,
        5,
        30,
        0,
        0,
        379,
        381,
        1,
        0,
        0,
        0,
        380,
        375,
        1,
        0,
        0,
        0,
        380,
        376,
        1,
        0,
        0,
        0,
        380,
        381,
        1,
        0,
        0,
        0,
        381,
        383,
        1,
        0,
        0,
        0,
        382,
        371,
        1,
        0,
        0,
        0,
        382,
        374,
        1,
        0,
        0,
        0,
        383,
        384,
        1,
        0,
        0,
        0,
        384,
        385,
        3,
        146,
        73,
        0,
        385,
        33,
        1,
        0,
        0,
        0,
        386,
        391,
        5,
        89,
        0,
        0,
        387,
        388,
        5,
        21,
        0,
        0,
        388,
        390,
        3,
        34,
        17,
        0,
        389,
        387,
        1,
        0,
        0,
        0,
        390,
        393,
        1,
        0,
        0,
        0,
        391,
        389,
        1,
        0,
        0,
        0,
        391,
        392,
        1,
        0,
        0,
        0,
        392,
        35,
        1,
        0,
        0,
        0,
        393,
        391,
        1,
        0,
        0,
        0,
        394,
        395,
        5,
        22,
        0,
        0,
        395,
        397,
        3,
        126,
        63,
        0,
        396,
        398,
        3,
        58,
        29,
        0,
        397,
        396,
        1,
        0,
        0,
        0,
        397,
        398,
        1,
        0,
        0,
        0,
        398,
        400,
        1,
        0,
        0,
        0,
        399,
        401,
        3,
        150,
        75,
        0,
        400,
        399,
        1,
        0,
        0,
        0,
        400,
        401,
        1,
        0,
        0,
        0,
        401,
        37,
        1,
        0,
        0,
        0,
        402,
        403,
        5,
        31,
        0,
        0,
        403,
        405,
        3,
        122,
        61,
        0,
        404,
        406,
        3,
        58,
        29,
        0,
        405,
        404,
        1,
        0,
        0,
        0,
        405,
        406,
        1,
        0,
        0,
        0,
        406,
        39,
        1,
        0,
        0,
        0,
        407,
        408,
        3,
        42,
        21,
        0,
        408,
        410,
        3,
        46,
        23,
        0,
        409,
        411,
        3,
        142,
        71,
        0,
        410,
        409,
        1,
        0,
        0,
        0,
        410,
        411,
        1,
        0,
        0,
        0,
        411,
        412,
        1,
        0,
        0,
        0,
        412,
        413,
        3,
        48,
        24,
        0,
        413,
        41,
        1,
        0,
        0,
        0,
        414,
        416,
        7,
        1,
        0,
        0,
        415,
        414,
        1,
        0,
        0,
        0,
        415,
        416,
        1,
        0,
        0,
        0,
        416,
        418,
        1,
        0,
        0,
        0,
        417,
        419,
        7,
        2,
        0,
        0,
        418,
        417,
        1,
        0,
        0,
        0,
        418,
        419,
        1,
        0,
        0,
        0,
        419,
        421,
        1,
        0,
        0,
        0,
        420,
        422,
        7,
        3,
        0,
        0,
        421,
        420,
        1,
        0,
        0,
        0,
        421,
        422,
        1,
        0,
        0,
        0,
        422,
        43,
        1,
        0,
        0,
        0,
        423,
        424,
        5,
        89,
        0,
        0,
        424,
        45,
        1,
        0,
        0,
        0,
        425,
        430,
        3,
        44,
        22,
        0,
        426,
        427,
        5,
        39,
        0,
        0,
        427,
        429,
        3,
        44,
        22,
        0,
        428,
        426,
        1,
        0,
        0,
        0,
        429,
        432,
        1,
        0,
        0,
        0,
        430,
        428,
        1,
        0,
        0,
        0,
        430,
        431,
        1,
        0,
        0,
        0,
        431,
        47,
        1,
        0,
        0,
        0,
        432,
        430,
        1,
        0,
        0,
        0,
        433,
        438,
        3,
        50,
        25,
        0,
        434,
        435,
        5,
        21,
        0,
        0,
        435,
        437,
        3,
        50,
        25,
        0,
        436,
        434,
        1,
        0,
        0,
        0,
        437,
        440,
        1,
        0,
        0,
        0,
        438,
        436,
        1,
        0,
        0,
        0,
        438,
        439,
        1,
        0,
        0,
        0,
        439,
        49,
        1,
        0,
        0,
        0,
        440,
        438,
        1,
        0,
        0,
        0,
        441,
        443,
        3,
        54,
        27,
        0,
        442,
        444,
        3,
        52,
        26,
        0,
        443,
        442,
        1,
        0,
        0,
        0,
        443,
        444,
        1,
        0,
        0,
        0,
        444,
        445,
        1,
        0,
        0,
        0,
        445,
        446,
        3,
        146,
        73,
        0,
        446,
        51,
        1,
        0,
        0,
        0,
        447,
        448,
        5,
        40,
        0,
        0,
        448,
        449,
        3,
        114,
        57,
        0,
        449,
        53,
        1,
        0,
        0,
        0,
        450,
        452,
        5,
        89,
        0,
        0,
        451,
        453,
        3,
        142,
        71,
        0,
        452,
        451,
        1,
        0,
        0,
        0,
        452,
        453,
        1,
        0,
        0,
        0,
        453,
        455,
        1,
        0,
        0,
        0,
        454,
        456,
        3,
        56,
        28,
        0,
        455,
        454,
        1,
        0,
        0,
        0,
        455,
        456,
        1,
        0,
        0,
        0,
        456,
        55,
        1,
        0,
        0,
        0,
        457,
        460,
        3,
        58,
        29,
        0,
        458,
        459,
        5,
        15,
        0,
        0,
        459,
        461,
        3,
        114,
        57,
        0,
        460,
        458,
        1,
        0,
        0,
        0,
        460,
        461,
        1,
        0,
        0,
        0,
        461,
        467,
        1,
        0,
        0,
        0,
        462,
        463,
        5,
        15,
        0,
        0,
        463,
        467,
        3,
        114,
        57,
        0,
        464,
        465,
        5,
        41,
        0,
        0,
        465,
        467,
        3,
        114,
        57,
        0,
        466,
        457,
        1,
        0,
        0,
        0,
        466,
        462,
        1,
        0,
        0,
        0,
        466,
        464,
        1,
        0,
        0,
        0,
        467,
        57,
        1,
        0,
        0,
        0,
        468,
        470,
        5,
        17,
        0,
        0,
        469,
        471,
        3,
        60,
        30,
        0,
        470,
        469,
        1,
        0,
        0,
        0,
        470,
        471,
        1,
        0,
        0,
        0,
        471,
        472,
        1,
        0,
        0,
        0,
        472,
        473,
        5,
        19,
        0,
        0,
        473,
        59,
        1,
        0,
        0,
        0,
        474,
        479,
        3,
        62,
        31,
        0,
        475,
        476,
        5,
        21,
        0,
        0,
        476,
        478,
        3,
        62,
        31,
        0,
        477,
        475,
        1,
        0,
        0,
        0,
        478,
        481,
        1,
        0,
        0,
        0,
        479,
        477,
        1,
        0,
        0,
        0,
        479,
        480,
        1,
        0,
        0,
        0,
        480,
        61,
        1,
        0,
        0,
        0,
        481,
        479,
        1,
        0,
        0,
        0,
        482,
        485,
        3,
        64,
        32,
        0,
        483,
        485,
        3,
        68,
        34,
        0,
        484,
        482,
        1,
        0,
        0,
        0,
        484,
        483,
        1,
        0,
        0,
        0,
        485,
        63,
        1,
        0,
        0,
        0,
        486,
        488,
        5,
        80,
        0,
        0,
        487,
        486,
        1,
        0,
        0,
        0,
        487,
        488,
        1,
        0,
        0,
        0,
        488,
        490,
        1,
        0,
        0,
        0,
        489,
        491,
        5,
        82,
        0,
        0,
        490,
        489,
        1,
        0,
        0,
        0,
        490,
        491,
        1,
        0,
        0,
        0,
        491,
        494,
        1,
        0,
        0,
        0,
        492,
        495,
        3,
        66,
        33,
        0,
        493,
        495,
        3,
        70,
        35,
        0,
        494,
        492,
        1,
        0,
        0,
        0,
        494,
        493,
        1,
        0,
        0,
        0,
        495,
        65,
        1,
        0,
        0,
        0,
        496,
        498,
        3,
        126,
        63,
        0,
        497,
        499,
        3,
        56,
        28,
        0,
        498,
        497,
        1,
        0,
        0,
        0,
        498,
        499,
        1,
        0,
        0,
        0,
        499,
        500,
        1,
        0,
        0,
        0,
        500,
        501,
        3,
        148,
        74,
        0,
        501,
        67,
        1,
        0,
        0,
        0,
        502,
        504,
        5,
        85,
        0,
        0,
        503,
        505,
        5,
        80,
        0,
        0,
        504,
        503,
        1,
        0,
        0,
        0,
        504,
        505,
        1,
        0,
        0,
        0,
        505,
        507,
        1,
        0,
        0,
        0,
        506,
        508,
        5,
        82,
        0,
        0,
        507,
        506,
        1,
        0,
        0,
        0,
        507,
        508,
        1,
        0,
        0,
        0,
        508,
        514,
        1,
        0,
        0,
        0,
        509,
        512,
        3,
        76,
        38,
        0,
        510,
        512,
        3,
        72,
        36,
        0,
        511,
        509,
        1,
        0,
        0,
        0,
        511,
        510,
        1,
        0,
        0,
        0,
        512,
        515,
        1,
        0,
        0,
        0,
        513,
        515,
        3,
        70,
        35,
        0,
        514,
        511,
        1,
        0,
        0,
        0,
        514,
        513,
        1,
        0,
        0,
        0,
        515,
        69,
        1,
        0,
        0,
        0,
        516,
        519,
        5,
        26,
        0,
        0,
        517,
        520,
        3,
        76,
        38,
        0,
        518,
        520,
        3,
        72,
        36,
        0,
        519,
        517,
        1,
        0,
        0,
        0,
        519,
        518,
        1,
        0,
        0,
        0,
        520,
        522,
        1,
        0,
        0,
        0,
        521,
        523,
        3,
        38,
        19,
        0,
        522,
        521,
        1,
        0,
        0,
        0,
        522,
        523,
        1,
        0,
        0,
        0,
        523,
        71,
        1,
        0,
        0,
        0,
        524,
        525,
        3,
        42,
        21,
        0,
        525,
        526,
        3,
        46,
        23,
        0,
        526,
        527,
        3,
        74,
        37,
        0,
        527,
        73,
        1,
        0,
        0,
        0,
        528,
        529,
        3,
        54,
        27,
        0,
        529,
        530,
        3,
        146,
        73,
        0,
        530,
        75,
        1,
        0,
        0,
        0,
        531,
        532,
        3,
        6,
        3,
        0,
        532,
        533,
        5,
        89,
        0,
        0,
        533,
        554,
        5,
        15,
        0,
        0,
        534,
        535,
        3,
        12,
        6,
        0,
        535,
        537,
        3,
        126,
        63,
        0,
        536,
        538,
        3,
        142,
        71,
        0,
        537,
        536,
        1,
        0,
        0,
        0,
        537,
        538,
        1,
        0,
        0,
        0,
        538,
        540,
        1,
        0,
        0,
        0,
        539,
        541,
        3,
        58,
        29,
        0,
        540,
        539,
        1,
        0,
        0,
        0,
        540,
        541,
        1,
        0,
        0,
        0,
        541,
        542,
        1,
        0,
        0,
        0,
        542,
        543,
        3,
        146,
        73,
        0,
        543,
        555,
        1,
        0,
        0,
        0,
        544,
        545,
        5,
        16,
        0,
        0,
        545,
        550,
        5,
        17,
        0,
        0,
        546,
        548,
        3,
        14,
        7,
        0,
        547,
        546,
        1,
        0,
        0,
        0,
        547,
        548,
        1,
        0,
        0,
        0,
        548,
        551,
        1,
        0,
        0,
        0,
        549,
        551,
        5,
        18,
        0,
        0,
        550,
        547,
        1,
        0,
        0,
        0,
        550,
        549,
        1,
        0,
        0,
        0,
        551,
        552,
        1,
        0,
        0,
        0,
        552,
        553,
        5,
        19,
        0,
        0,
        553,
        555,
        3,
        146,
        73,
        0,
        554,
        534,
        1,
        0,
        0,
        0,
        554,
        544,
        1,
        0,
        0,
        0,
        555,
        77,
        1,
        0,
        0,
        0,
        556,
        557,
        3,
        88,
        44,
        0,
        557,
        558,
        5,
        1,
        0,
        0,
        558,
        560,
        1,
        0,
        0,
        0,
        559,
        556,
        1,
        0,
        0,
        0,
        560,
        563,
        1,
        0,
        0,
        0,
        561,
        559,
        1,
        0,
        0,
        0,
        561,
        562,
        1,
        0,
        0,
        0,
        562,
        79,
        1,
        0,
        0,
        0,
        563,
        561,
        1,
        0,
        0,
        0,
        564,
        566,
        5,
        88,
        0,
        0,
        565,
        564,
        1,
        0,
        0,
        0,
        565,
        566,
        1,
        0,
        0,
        0,
        566,
        567,
        1,
        0,
        0,
        0,
        567,
        568,
        5,
        42,
        0,
        0,
        568,
        569,
        3,
        78,
        39,
        0,
        569,
        81,
        1,
        0,
        0,
        0,
        570,
        571,
        3,
        92,
        46,
        0,
        571,
        572,
        5,
        1,
        0,
        0,
        572,
        574,
        1,
        0,
        0,
        0,
        573,
        570,
        1,
        0,
        0,
        0,
        574,
        577,
        1,
        0,
        0,
        0,
        575,
        573,
        1,
        0,
        0,
        0,
        575,
        576,
        1,
        0,
        0,
        0,
        576,
        83,
        1,
        0,
        0,
        0,
        577,
        575,
        1,
        0,
        0,
        0,
        578,
        580,
        5,
        88,
        0,
        0,
        579,
        578,
        1,
        0,
        0,
        0,
        579,
        580,
        1,
        0,
        0,
        0,
        580,
        581,
        1,
        0,
        0,
        0,
        581,
        582,
        5,
        43,
        0,
        0,
        582,
        583,
        3,
        82,
        41,
        0,
        583,
        85,
        1,
        0,
        0,
        0,
        584,
        585,
        3,
        116,
        58,
        0,
        585,
        586,
        5,
        15,
        0,
        0,
        586,
        587,
        3,
        114,
        57,
        0,
        587,
        596,
        1,
        0,
        0,
        0,
        588,
        596,
        3,
        94,
        47,
        0,
        589,
        596,
        3,
        98,
        49,
        0,
        590,
        596,
        3,
        112,
        56,
        0,
        591,
        596,
        3,
        108,
        54,
        0,
        592,
        593,
        3,
        122,
        61,
        0,
        593,
        594,
        3,
        128,
        64,
        0,
        594,
        596,
        1,
        0,
        0,
        0,
        595,
        584,
        1,
        0,
        0,
        0,
        595,
        588,
        1,
        0,
        0,
        0,
        595,
        589,
        1,
        0,
        0,
        0,
        595,
        590,
        1,
        0,
        0,
        0,
        595,
        591,
        1,
        0,
        0,
        0,
        595,
        592,
        1,
        0,
        0,
        0,
        596,
        87,
        1,
        0,
        0,
        0,
        597,
        598,
        3,
        86,
        43,
        0,
        598,
        599,
        3,
        146,
        73,
        0,
        599,
        89,
        1,
        0,
        0,
        0,
        600,
        604,
        3,
        126,
        63,
        0,
        601,
        602,
        5,
        41,
        0,
        0,
        602,
        605,
        3,
        114,
        57,
        0,
        603,
        605,
        3,
        128,
        64,
        0,
        604,
        601,
        1,
        0,
        0,
        0,
        604,
        603,
        1,
        0,
        0,
        0,
        605,
        627,
        1,
        0,
        0,
        0,
        606,
        607,
        5,
        17,
        0,
        0,
        607,
        612,
        3,
        126,
        63,
        0,
        608,
        609,
        5,
        21,
        0,
        0,
        609,
        611,
        3,
        126,
        63,
        0,
        610,
        608,
        1,
        0,
        0,
        0,
        611,
        614,
        1,
        0,
        0,
        0,
        612,
        610,
        1,
        0,
        0,
        0,
        612,
        613,
        1,
        0,
        0,
        0,
        613,
        615,
        1,
        0,
        0,
        0,
        614,
        612,
        1,
        0,
        0,
        0,
        615,
        616,
        5,
        19,
        0,
        0,
        616,
        617,
        5,
        41,
        0,
        0,
        617,
        618,
        3,
        126,
        63,
        0,
        618,
        619,
        3,
        128,
        64,
        0,
        619,
        627,
        1,
        0,
        0,
        0,
        620,
        627,
        5,
        44,
        0,
        0,
        621,
        627,
        5,
        45,
        0,
        0,
        622,
        627,
        3,
        96,
        48,
        0,
        623,
        627,
        3,
        100,
        50,
        0,
        624,
        627,
        3,
        106,
        53,
        0,
        625,
        627,
        3,
        110,
        55,
        0,
        626,
        600,
        1,
        0,
        0,
        0,
        626,
        606,
        1,
        0,
        0,
        0,
        626,
        620,
        1,
        0,
        0,
        0,
        626,
        621,
        1,
        0,
        0,
        0,
        626,
        622,
        1,
        0,
        0,
        0,
        626,
        623,
        1,
        0,
        0,
        0,
        626,
        624,
        1,
        0,
        0,
        0,
        626,
        625,
        1,
        0,
        0,
        0,
        627,
        91,
        1,
        0,
        0,
        0,
        628,
        629,
        3,
        90,
        45,
        0,
        629,
        630,
        3,
        146,
        73,
        0,
        630,
        93,
        1,
        0,
        0,
        0,
        631,
        632,
        5,
        40,
        0,
        0,
        632,
        633,
        3,
        114,
        57,
        0,
        633,
        634,
        5,
        46,
        0,
        0,
        634,
        642,
        3,
        78,
        39,
        0,
        635,
        636,
        5,
        47,
        0,
        0,
        636,
        637,
        3,
        114,
        57,
        0,
        637,
        638,
        5,
        46,
        0,
        0,
        638,
        639,
        3,
        78,
        39,
        0,
        639,
        641,
        1,
        0,
        0,
        0,
        640,
        635,
        1,
        0,
        0,
        0,
        641,
        644,
        1,
        0,
        0,
        0,
        642,
        640,
        1,
        0,
        0,
        0,
        642,
        643,
        1,
        0,
        0,
        0,
        643,
        647,
        1,
        0,
        0,
        0,
        644,
        642,
        1,
        0,
        0,
        0,
        645,
        646,
        5,
        48,
        0,
        0,
        646,
        648,
        3,
        78,
        39,
        0,
        647,
        645,
        1,
        0,
        0,
        0,
        647,
        648,
        1,
        0,
        0,
        0,
        648,
        649,
        1,
        0,
        0,
        0,
        649,
        650,
        5,
        14,
        0,
        0,
        650,
        651,
        5,
        40,
        0,
        0,
        651,
        95,
        1,
        0,
        0,
        0,
        652,
        653,
        5,
        40,
        0,
        0,
        653,
        654,
        3,
        114,
        57,
        0,
        654,
        655,
        5,
        46,
        0,
        0,
        655,
        663,
        3,
        82,
        41,
        0,
        656,
        657,
        5,
        47,
        0,
        0,
        657,
        658,
        3,
        114,
        57,
        0,
        658,
        659,
        5,
        46,
        0,
        0,
        659,
        660,
        3,
        82,
        41,
        0,
        660,
        662,
        1,
        0,
        0,
        0,
        661,
        656,
        1,
        0,
        0,
        0,
        662,
        665,
        1,
        0,
        0,
        0,
        663,
        661,
        1,
        0,
        0,
        0,
        663,
        664,
        1,
        0,
        0,
        0,
        664,
        668,
        1,
        0,
        0,
        0,
        665,
        663,
        1,
        0,
        0,
        0,
        666,
        667,
        5,
        48,
        0,
        0,
        667,
        669,
        3,
        82,
        41,
        0,
        668,
        666,
        1,
        0,
        0,
        0,
        668,
        669,
        1,
        0,
        0,
        0,
        669,
        670,
        1,
        0,
        0,
        0,
        670,
        671,
        5,
        14,
        0,
        0,
        671,
        672,
        5,
        40,
        0,
        0,
        672,
        97,
        1,
        0,
        0,
        0,
        673,
        674,
        5,
        49,
        0,
        0,
        674,
        675,
        3,
        102,
        51,
        0,
        675,
        676,
        5,
        50,
        0,
        0,
        676,
        677,
        3,
        78,
        39,
        0,
        677,
        678,
        5,
        14,
        0,
        0,
        678,
        679,
        5,
        49,
        0,
        0,
        679,
        99,
        1,
        0,
        0,
        0,
        680,
        681,
        5,
        49,
        0,
        0,
        681,
        682,
        3,
        102,
        51,
        0,
        682,
        683,
        5,
        50,
        0,
        0,
        683,
        684,
        3,
        82,
        41,
        0,
        684,
        685,
        5,
        14,
        0,
        0,
        685,
        686,
        5,
        49,
        0,
        0,
        686,
        101,
        1,
        0,
        0,
        0,
        687,
        692,
        3,
        104,
        52,
        0,
        688,
        689,
        5,
        21,
        0,
        0,
        689,
        691,
        3,
        104,
        52,
        0,
        690,
        688,
        1,
        0,
        0,
        0,
        691,
        694,
        1,
        0,
        0,
        0,
        692,
        690,
        1,
        0,
        0,
        0,
        692,
        693,
        1,
        0,
        0,
        0,
        693,
        103,
        1,
        0,
        0,
        0,
        694,
        692,
        1,
        0,
        0,
        0,
        695,
        698,
        5,
        89,
        0,
        0,
        696,
        697,
        5,
        51,
        0,
        0,
        697,
        699,
        3,
        114,
        57,
        0,
        698,
        696,
        1,
        0,
        0,
        0,
        698,
        699,
        1,
        0,
        0,
        0,
        699,
        105,
        1,
        0,
        0,
        0,
        700,
        701,
        5,
        52,
        0,
        0,
        701,
        702,
        3,
        114,
        57,
        0,
        702,
        703,
        5,
        50,
        0,
        0,
        703,
        704,
        3,
        82,
        41,
        0,
        704,
        705,
        5,
        14,
        0,
        0,
        705,
        706,
        5,
        52,
        0,
        0,
        706,
        107,
        1,
        0,
        0,
        0,
        707,
        708,
        5,
        53,
        0,
        0,
        708,
        709,
        3,
        114,
        57,
        0,
        709,
        710,
        5,
        46,
        0,
        0,
        710,
        718,
        3,
        78,
        39,
        0,
        711,
        712,
        5,
        54,
        0,
        0,
        712,
        713,
        3,
        114,
        57,
        0,
        713,
        714,
        5,
        46,
        0,
        0,
        714,
        715,
        3,
        78,
        39,
        0,
        715,
        717,
        1,
        0,
        0,
        0,
        716,
        711,
        1,
        0,
        0,
        0,
        717,
        720,
        1,
        0,
        0,
        0,
        718,
        716,
        1,
        0,
        0,
        0,
        718,
        719,
        1,
        0,
        0,
        0,
        719,
        721,
        1,
        0,
        0,
        0,
        720,
        718,
        1,
        0,
        0,
        0,
        721,
        722,
        5,
        14,
        0,
        0,
        722,
        723,
        5,
        53,
        0,
        0,
        723,
        109,
        1,
        0,
        0,
        0,
        724,
        725,
        5,
        53,
        0,
        0,
        725,
        726,
        3,
        114,
        57,
        0,
        726,
        727,
        5,
        46,
        0,
        0,
        727,
        735,
        3,
        82,
        41,
        0,
        728,
        729,
        5,
        54,
        0,
        0,
        729,
        730,
        3,
        114,
        57,
        0,
        730,
        731,
        5,
        46,
        0,
        0,
        731,
        732,
        3,
        82,
        41,
        0,
        732,
        734,
        1,
        0,
        0,
        0,
        733,
        728,
        1,
        0,
        0,
        0,
        734,
        737,
        1,
        0,
        0,
        0,
        735,
        733,
        1,
        0,
        0,
        0,
        735,
        736,
        1,
        0,
        0,
        0,
        736,
        738,
        1,
        0,
        0,
        0,
        737,
        735,
        1,
        0,
        0,
        0,
        738,
        739,
        5,
        14,
        0,
        0,
        739,
        740,
        5,
        53,
        0,
        0,
        740,
        111,
        1,
        0,
        0,
        0,
        741,
        742,
        5,
        55,
        0,
        0,
        742,
        743,
        5,
        17,
        0,
        0,
        743,
        744,
        3,
        126,
        63,
        0,
        744,
        745,
        5,
        21,
        0,
        0,
        745,
        746,
        3,
        126,
        63,
        0,
        746,
        747,
        5,
        19,
        0,
        0,
        747,
        113,
        1,
        0,
        0,
        0,
        748,
        767,
        3,
        116,
        58,
        0,
        749,
        750,
        5,
        40,
        0,
        0,
        750,
        751,
        3,
        114,
        57,
        0,
        751,
        752,
        5,
        46,
        0,
        0,
        752,
        760,
        3,
        114,
        57,
        0,
        753,
        754,
        5,
        47,
        0,
        0,
        754,
        755,
        3,
        114,
        57,
        0,
        755,
        756,
        5,
        46,
        0,
        0,
        756,
        757,
        3,
        114,
        57,
        0,
        757,
        759,
        1,
        0,
        0,
        0,
        758,
        753,
        1,
        0,
        0,
        0,
        759,
        762,
        1,
        0,
        0,
        0,
        760,
        758,
        1,
        0,
        0,
        0,
        760,
        761,
        1,
        0,
        0,
        0,
        761,
        763,
        1,
        0,
        0,
        0,
        762,
        760,
        1,
        0,
        0,
        0,
        763,
        764,
        5,
        48,
        0,
        0,
        764,
        765,
        3,
        114,
        57,
        0,
        765,
        767,
        1,
        0,
        0,
        0,
        766,
        748,
        1,
        0,
        0,
        0,
        766,
        749,
        1,
        0,
        0,
        0,
        767,
        115,
        1,
        0,
        0,
        0,
        768,
        775,
        3,
        118,
        59,
        0,
        769,
        770,
        5,
        18,
        0,
        0,
        770,
        773,
        3,
        118,
        59,
        0,
        771,
        772,
        5,
        18,
        0,
        0,
        772,
        774,
        3,
        118,
        59,
        0,
        773,
        771,
        1,
        0,
        0,
        0,
        773,
        774,
        1,
        0,
        0,
        0,
        774,
        776,
        1,
        0,
        0,
        0,
        775,
        769,
        1,
        0,
        0,
        0,
        775,
        776,
        1,
        0,
        0,
        0,
        776,
        117,
        1,
        0,
        0,
        0,
        777,
        778,
        6,
        59,
        -1,
        0,
        778,
        779,
        7,
        4,
        0,
        0,
        779,
        788,
        3,
        118,
        59,
        9,
        780,
        781,
        3,
        120,
        60,
        0,
        781,
        782,
        7,
        5,
        0,
        0,
        782,
        783,
        3,
        120,
        60,
        0,
        783,
        788,
        1,
        0,
        0,
        0,
        784,
        785,
        5,
        71,
        0,
        0,
        785,
        788,
        3,
        118,
        59,
        4,
        786,
        788,
        3,
        120,
        60,
        0,
        787,
        777,
        1,
        0,
        0,
        0,
        787,
        780,
        1,
        0,
        0,
        0,
        787,
        784,
        1,
        0,
        0,
        0,
        787,
        786,
        1,
        0,
        0,
        0,
        788,
        806,
        1,
        0,
        0,
        0,
        789,
        790,
        10,
        7,
        0,
        0,
        790,
        791,
        7,
        6,
        0,
        0,
        791,
        805,
        3,
        118,
        59,
        8,
        792,
        793,
        10,
        6,
        0,
        0,
        793,
        794,
        7,
        7,
        0,
        0,
        794,
        805,
        3,
        118,
        59,
        7,
        795,
        796,
        10,
        5,
        0,
        0,
        796,
        797,
        7,
        8,
        0,
        0,
        797,
        805,
        3,
        118,
        59,
        6,
        798,
        799,
        10,
        3,
        0,
        0,
        799,
        800,
        5,
        72,
        0,
        0,
        800,
        805,
        3,
        118,
        59,
        4,
        801,
        802,
        10,
        2,
        0,
        0,
        802,
        803,
        5,
        73,
        0,
        0,
        803,
        805,
        3,
        118,
        59,
        3,
        804,
        789,
        1,
        0,
        0,
        0,
        804,
        792,
        1,
        0,
        0,
        0,
        804,
        795,
        1,
        0,
        0,
        0,
        804,
        798,
        1,
        0,
        0,
        0,
        804,
        801,
        1,
        0,
        0,
        0,
        805,
        808,
        1,
        0,
        0,
        0,
        806,
        804,
        1,
        0,
        0,
        0,
        806,
        807,
        1,
        0,
        0,
        0,
        807,
        119,
        1,
        0,
        0,
        0,
        808,
        806,
        1,
        0,
        0,
        0,
        809,
        842,
        5,
        91,
        0,
        0,
        810,
        842,
        5,
        90,
        0,
        0,
        811,
        842,
        5,
        74,
        0,
        0,
        812,
        842,
        5,
        75,
        0,
        0,
        813,
        814,
        3,
        126,
        63,
        0,
        814,
        815,
        3,
        128,
        64,
        0,
        815,
        842,
        1,
        0,
        0,
        0,
        816,
        817,
        5,
        20,
        0,
        0,
        817,
        842,
        3,
        128,
        64,
        0,
        818,
        819,
        5,
        88,
        0,
        0,
        819,
        842,
        3,
        128,
        64,
        0,
        820,
        842,
        3,
        126,
        63,
        0,
        821,
        822,
        5,
        17,
        0,
        0,
        822,
        823,
        3,
        138,
        69,
        0,
        823,
        824,
        5,
        19,
        0,
        0,
        824,
        842,
        1,
        0,
        0,
        0,
        825,
        826,
        5,
        76,
        0,
        0,
        826,
        831,
        3,
        140,
        70,
        0,
        827,
        828,
        5,
        1,
        0,
        0,
        828,
        830,
        3,
        140,
        70,
        0,
        829,
        827,
        1,
        0,
        0,
        0,
        830,
        833,
        1,
        0,
        0,
        0,
        831,
        829,
        1,
        0,
        0,
        0,
        831,
        832,
        1,
        0,
        0,
        0,
        832,
        834,
        1,
        0,
        0,
        0,
        833,
        831,
        1,
        0,
        0,
        0,
        834,
        835,
        5,
        77,
        0,
        0,
        835,
        842,
        1,
        0,
        0,
        0,
        836,
        837,
        5,
        78,
        0,
        0,
        837,
        838,
        3,
        130,
        65,
        0,
        838,
        839,
        5,
        30,
        0,
        0,
        839,
        842,
        1,
        0,
        0,
        0,
        840,
        842,
        5,
        14,
        0,
        0,
        841,
        809,
        1,
        0,
        0,
        0,
        841,
        810,
        1,
        0,
        0,
        0,
        841,
        811,
        1,
        0,
        0,
        0,
        841,
        812,
        1,
        0,
        0,
        0,
        841,
        813,
        1,
        0,
        0,
        0,
        841,
        816,
        1,
        0,
        0,
        0,
        841,
        818,
        1,
        0,
        0,
        0,
        841,
        820,
        1,
        0,
        0,
        0,
        841,
        821,
        1,
        0,
        0,
        0,
        841,
        825,
        1,
        0,
        0,
        0,
        841,
        836,
        1,
        0,
        0,
        0,
        841,
        840,
        1,
        0,
        0,
        0,
        842,
        121,
        1,
        0,
        0,
        0,
        843,
        845,
        5,
        39,
        0,
        0,
        844,
        843,
        1,
        0,
        0,
        0,
        844,
        845,
        1,
        0,
        0,
        0,
        845,
        846,
        1,
        0,
        0,
        0,
        846,
        851,
        5,
        89,
        0,
        0,
        847,
        848,
        5,
        39,
        0,
        0,
        848,
        850,
        5,
        89,
        0,
        0,
        849,
        847,
        1,
        0,
        0,
        0,
        850,
        853,
        1,
        0,
        0,
        0,
        851,
        849,
        1,
        0,
        0,
        0,
        851,
        852,
        1,
        0,
        0,
        0,
        852,
        123,
        1,
        0,
        0,
        0,
        853,
        851,
        1,
        0,
        0,
        0,
        854,
        856,
        5,
        89,
        0,
        0,
        855,
        857,
        3,
        142,
        71,
        0,
        856,
        855,
        1,
        0,
        0,
        0,
        856,
        857,
        1,
        0,
        0,
        0,
        857,
        125,
        1,
        0,
        0,
        0,
        858,
        863,
        3,
        124,
        62,
        0,
        859,
        860,
        5,
        39,
        0,
        0,
        860,
        862,
        3,
        124,
        62,
        0,
        861,
        859,
        1,
        0,
        0,
        0,
        862,
        865,
        1,
        0,
        0,
        0,
        863,
        861,
        1,
        0,
        0,
        0,
        863,
        864,
        1,
        0,
        0,
        0,
        864,
        127,
        1,
        0,
        0,
        0,
        865,
        863,
        1,
        0,
        0,
        0,
        866,
        868,
        5,
        17,
        0,
        0,
        867,
        869,
        3,
        130,
        65,
        0,
        868,
        867,
        1,
        0,
        0,
        0,
        868,
        869,
        1,
        0,
        0,
        0,
        869,
        870,
        1,
        0,
        0,
        0,
        870,
        871,
        5,
        19,
        0,
        0,
        871,
        129,
        1,
        0,
        0,
        0,
        872,
        879,
        3,
        136,
        68,
        0,
        873,
        874,
        5,
        21,
        0,
        0,
        874,
        878,
        3,
        136,
        68,
        0,
        875,
        876,
        5,
        49,
        0,
        0,
        876,
        878,
        3,
        102,
        51,
        0,
        877,
        873,
        1,
        0,
        0,
        0,
        877,
        875,
        1,
        0,
        0,
        0,
        878,
        881,
        1,
        0,
        0,
        0,
        879,
        877,
        1,
        0,
        0,
        0,
        879,
        880,
        1,
        0,
        0,
        0,
        880,
        884,
        1,
        0,
        0,
        0,
        881,
        879,
        1,
        0,
        0,
        0,
        882,
        884,
        3,
        132,
        66,
        0,
        883,
        872,
        1,
        0,
        0,
        0,
        883,
        882,
        1,
        0,
        0,
        0,
        884,
        131,
        1,
        0,
        0,
        0,
        885,
        890,
        3,
        134,
        67,
        0,
        886,
        887,
        5,
        21,
        0,
        0,
        887,
        889,
        3,
        134,
        67,
        0,
        888,
        886,
        1,
        0,
        0,
        0,
        889,
        892,
        1,
        0,
        0,
        0,
        890,
        888,
        1,
        0,
        0,
        0,
        890,
        891,
        1,
        0,
        0,
        0,
        891,
        133,
        1,
        0,
        0,
        0,
        892,
        890,
        1,
        0,
        0,
        0,
        893,
        894,
        5,
        89,
        0,
        0,
        894,
        895,
        5,
        15,
        0,
        0,
        895,
        896,
        3,
        136,
        68,
        0,
        896,
        135,
        1,
        0,
        0,
        0,
        897,
        898,
        5,
        13,
        0,
        0,
        898,
        899,
        3,
        122,
        61,
        0,
        899,
        901,
        5,
        17,
        0,
        0,
        900,
        902,
        3,
        132,
        66,
        0,
        901,
        900,
        1,
        0,
        0,
        0,
        901,
        902,
        1,
        0,
        0,
        0,
        902,
        903,
        1,
        0,
        0,
        0,
        903,
        904,
        5,
        19,
        0,
        0,
        904,
        907,
        1,
        0,
        0,
        0,
        905,
        907,
        3,
        114,
        57,
        0,
        906,
        897,
        1,
        0,
        0,
        0,
        906,
        905,
        1,
        0,
        0,
        0,
        907,
        137,
        1,
        0,
        0,
        0,
        908,
        910,
        3,
        114,
        57,
        0,
        909,
        908,
        1,
        0,
        0,
        0,
        909,
        910,
        1,
        0,
        0,
        0,
        910,
        915,
        1,
        0,
        0,
        0,
        911,
        912,
        5,
        21,
        0,
        0,
        912,
        914,
        3,
        114,
        57,
        0,
        913,
        911,
        1,
        0,
        0,
        0,
        914,
        917,
        1,
        0,
        0,
        0,
        915,
        913,
        1,
        0,
        0,
        0,
        915,
        916,
        1,
        0,
        0,
        0,
        916,
        139,
        1,
        0,
        0,
        0,
        917,
        915,
        1,
        0,
        0,
        0,
        918,
        923,
        3,
        114,
        57,
        0,
        919,
        920,
        5,
        21,
        0,
        0,
        920,
        922,
        3,
        114,
        57,
        0,
        921,
        919,
        1,
        0,
        0,
        0,
        922,
        925,
        1,
        0,
        0,
        0,
        923,
        921,
        1,
        0,
        0,
        0,
        923,
        924,
        1,
        0,
        0,
        0,
        924,
        141,
        1,
        0,
        0,
        0,
        925,
        923,
        1,
        0,
        0,
        0,
        926,
        927,
        5,
        76,
        0,
        0,
        927,
        932,
        3,
        144,
        72,
        0,
        928,
        929,
        5,
        21,
        0,
        0,
        929,
        931,
        3,
        144,
        72,
        0,
        930,
        928,
        1,
        0,
        0,
        0,
        931,
        934,
        1,
        0,
        0,
        0,
        932,
        930,
        1,
        0,
        0,
        0,
        932,
        933,
        1,
        0,
        0,
        0,
        933,
        935,
        1,
        0,
        0,
        0,
        934,
        932,
        1,
        0,
        0,
        0,
        935,
        936,
        5,
        77,
        0,
        0,
        936,
        143,
        1,
        0,
        0,
        0,
        937,
        940,
        5,
        18,
        0,
        0,
        938,
        940,
        3,
        114,
        57,
        0,
        939,
        937,
        1,
        0,
        0,
        0,
        939,
        938,
        1,
        0,
        0,
        0,
        940,
        145,
        1,
        0,
        0,
        0,
        941,
        943,
        3,
        148,
        74,
        0,
        942,
        944,
        3,
        150,
        75,
        0,
        943,
        942,
        1,
        0,
        0,
        0,
        943,
        944,
        1,
        0,
        0,
        0,
        944,
        147,
        1,
        0,
        0,
        0,
        945,
        950,
        5,
        90,
        0,
        0,
        946,
        947,
        5,
        56,
        0,
        0,
        947,
        949,
        5,
        90,
        0,
        0,
        948,
        946,
        1,
        0,
        0,
        0,
        949,
        952,
        1,
        0,
        0,
        0,
        950,
        948,
        1,
        0,
        0,
        0,
        950,
        951,
        1,
        0,
        0,
        0,
        951,
        954,
        1,
        0,
        0,
        0,
        952,
        950,
        1,
        0,
        0,
        0,
        953,
        945,
        1,
        0,
        0,
        0,
        953,
        954,
        1,
        0,
        0,
        0,
        954,
        149,
        1,
        0,
        0,
        0,
        955,
        956,
        5,
        79,
        0,
        0,
        956,
        957,
        3,
        58,
        29,
        0,
        957,
        151,
        1,
        0,
        0,
        0,
        119,
        154,
        157,
        162,
        166,
        172,
        178,
        185,
        190,
        196,
        199,
        203,
        216,
        225,
        228,
        243,
        252,
        259,
        268,
        281,
        283,
        288,
        291,
        294,
        297,
        302,
        309,
        314,
        323,
        330,
        333,
        336,
        339,
        342,
        346,
        349,
        352,
        355,
        358,
        363,
        368,
        380,
        382,
        391,
        397,
        400,
        405,
        410,
        415,
        418,
        421,
        430,
        438,
        443,
        452,
        455,
        460,
        466,
        470,
        479,
        484,
        487,
        490,
        494,
        498,
        504,
        507,
        511,
        514,
        519,
        522,
        537,
        540,
        547,
        550,
        554,
        561,
        565,
        575,
        579,
        595,
        604,
        612,
        626,
        642,
        647,
        663,
        668,
        692,
        698,
        718,
        735,
        760,
        766,
        773,
        775,
        787,
        804,
        806,
        831,
        841,
        844,
        851,
        856,
        863,
        868,
        877,
        879,
        883,
        890,
        901,
        906,
        909,
        915,
        923,
        932,
        939,
        943,
        950,
        953,
    ]


class ModelicaParser(Parser):
    grammarFileName = "Modelica.g4"

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

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

    sharedContextCache = PredictionContextCache()

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

    symbolicNames = [
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "EACH",
        "PARTIAL",
        "FINAL",
        "WITHIN",
        "ENCAPSULATED",
        "REDECLARE",
        "INNER",
        "OUTER",
        "INITIAL",
        "IDENT",
        "STRING",
        "UNSIGNED_NUMBER",
        "COMMENT",
        "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_element = 22
    RULE_type_specifier = 23
    RULE_component_list = 24
    RULE_component_declaration = 25
    RULE_condition_attribute = 26
    RULE_declaration = 27
    RULE_modification = 28
    RULE_class_modification = 29
    RULE_argument_list = 30
    RULE_argument = 31
    RULE_element_modification_or_replaceable = 32
    RULE_element_modification = 33
    RULE_element_redeclaration = 34
    RULE_element_replaceable = 35
    RULE_component_clause1 = 36
    RULE_component_declaration1 = 37
    RULE_short_class_definition = 38
    RULE_equation_block = 39
    RULE_equation_section = 40
    RULE_statement_block = 41
    RULE_algorithm_section = 42
    RULE_equation_options = 43
    RULE_equation = 44
    RULE_statement_options = 45
    RULE_statement = 46
    RULE_if_equation = 47
    RULE_if_statement = 48
    RULE_for_equation = 49
    RULE_for_statement = 50
    RULE_for_indices = 51
    RULE_for_index = 52
    RULE_while_statement = 53
    RULE_when_equation = 54
    RULE_when_statement = 55
    RULE_connect_clause = 56
    RULE_expression = 57
    RULE_simple_expression = 58
    RULE_expr = 59
    RULE_primary = 60
    RULE_name = 61
    RULE_component_reference_element = 62
    RULE_component_reference = 63
    RULE_function_call_args = 64
    RULE_function_arguments = 65
    RULE_named_arguments = 66
    RULE_named_argument = 67
    RULE_function_argument = 68
    RULE_output_expression_list = 69
    RULE_expression_list = 70
    RULE_array_subscripts = 71
    RULE_subscript = 72
    RULE_comment = 73
    RULE_string_comment = 74
    RULE_annotation = 75

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

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

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

    class Stored_definitionContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def stored_definition_class(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Stored_definition_classContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Stored_definition_classContext, i)

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_stored_definition

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 157
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 83:
                self.state = 152
                self.match(ModelicaParser.WITHIN)
                self.state = 154
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 89:
                    self.state = 153
                    self.component_reference()

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

            self.state = 162
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3F) == 0 and ((1 << _la) & 16380) != 0) or (
                (((_la - 81)) & ~0x3F) == 0 and ((1 << (_la - 81)) & 11) != 0
            ):
                self.state = 159
                self.stored_definition_class()
                self.state = 164
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterStored_definition_class"):
                listener.enterStored_definition_class(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 166
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 82:
                self.state = 165
                self.match(ModelicaParser.FINAL)

            self.state = 168
            self.class_definition()
            self.state = 169
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterClass_definition"):
                listener.enterClass_definition(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 172
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 84:
                self.state = 171
                self.match(ModelicaParser.ENCAPSULATED)

            self.state = 174
            self.class_prefixes()
            self.state = 175
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterClass_prefixes"):
                listener.enterClass_prefixes(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 178
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 81:
                self.state = 177
                self.match(ModelicaParser.PARTIAL)

            self.state = 180
            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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_class_type

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 203
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 10, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 182
                self.match(ModelicaParser.T__1)
                pass

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

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 185
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 4:
                    self.state = 184
                    self.match(ModelicaParser.T__3)

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

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

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 190
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 7:
                    self.state = 189
                    self.match(ModelicaParser.T__6)

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

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

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

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 196
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 11 or _la == 12:
                    self.state = 195
                    _la = self._input.LA(1)
                    if not (_la == 11 or _la == 12):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()

                self.state = 199
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 4:
                    self.state = 198
                    self.match(ModelicaParser.T__3)

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

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 202
                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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_class_specifier

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

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

        def IDENT(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterClass_spec_der"):
                listener.enterClass_spec_der(self)

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

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

    class Class_spec_enumContext(Class_specifierContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.Class_specifierContext
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterClass_spec_enum"):
                listener.enterClass_spec_enum(self)

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

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

    class Class_spec_baseContext(Class_specifierContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.Class_specifierContext
            super().__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 component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext, 0)

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

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

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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: ParserRuleContext
        ):  # actually a ModelicaParser.Class_specifierContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def IDENT(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterClass_spec_comp"):
                listener.enterClass_spec_comp(self)

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

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

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

        def IDENT(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterClass_spec_extends"):
                listener.enterClass_spec_extends(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitClass_spec_extends"):
                return visitor.visitClass_spec_extends(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 = 259
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 16, self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Class_spec_compContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 205
                self.match(ModelicaParser.IDENT)
                self.state = 206
                self.string_comment()
                self.state = 207
                self.composition()
                self.state = 208
                self.match(ModelicaParser.T__13)
                self.state = 209
                self.match(ModelicaParser.IDENT)
                pass

            elif la_ == 2:
                localctx = ModelicaParser.Class_spec_baseContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 211
                self.match(ModelicaParser.IDENT)
                self.state = 212
                self.match(ModelicaParser.T__14)
                self.state = 213
                self.base_prefix()
                self.state = 214
                self.component_reference()
                self.state = 216
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 17:
                    self.state = 215
                    self.class_modification()

                self.state = 218
                self.comment()
                pass

            elif la_ == 3:
                localctx = ModelicaParser.Class_spec_enumContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 220
                self.match(ModelicaParser.IDENT)
                self.state = 221
                self.match(ModelicaParser.T__14)
                self.state = 222
                self.match(ModelicaParser.T__15)
                self.state = 223
                self.match(ModelicaParser.T__16)
                self.state = 228
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [19, 89]:
                    self.state = 225
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la == 89:
                        self.state = 224
                        self.enum_list()

                    pass
                elif token in [18]:
                    self.state = 227
                    self.match(ModelicaParser.T__17)
                    pass
                else:
                    raise NoViableAltException(self)

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

            elif la_ == 4:
                localctx = ModelicaParser.Class_spec_derContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 232
                self.match(ModelicaParser.IDENT)
                self.state = 233
                self.match(ModelicaParser.T__14)
                self.state = 234
                self.match(ModelicaParser.T__19)
                self.state = 235
                self.match(ModelicaParser.T__16)
                self.state = 236
                self.name()
                self.state = 237
                self.match(ModelicaParser.T__20)
                self.state = 238
                self.match(ModelicaParser.IDENT)
                self.state = 243
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 21:
                    self.state = 239
                    self.match(ModelicaParser.T__20)
                    self.state = 240
                    self.match(ModelicaParser.IDENT)
                    self.state = 245
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 246
                self.match(ModelicaParser.T__18)
                self.state = 247
                self.comment()
                pass

            elif la_ == 5:
                localctx = ModelicaParser.Class_spec_extendsContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 249
                self.match(ModelicaParser.T__21)
                self.state = 250
                self.match(ModelicaParser.IDENT)
                self.state = 252
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 17:
                    self.state = 251
                    self.class_modification()

                self.state = 254
                self.string_comment()
                self.state = 255
                self.composition()
                self.state = 256
                self.match(ModelicaParser.T__13)
                self.state = 257
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterBase_prefix"):
                listener.enterBase_prefix(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 261
            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):
        __slots__ = "parser"

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

        def enumeration_literal(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterEnum_list"):
                listener.enterEnum_list(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 263
            self.enumeration_literal()
            self.state = 268
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 21:
                self.state = 264
                self.match(ModelicaParser.T__20)
                self.state = 265
                self.enumeration_literal()
                self.state = 270
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterEnumeration_literal"):
                listener.enterEnumeration_literal(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 271
            self.match(ModelicaParser.IDENT)
            self.state = 272
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Element_listContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Element_listContext, i)

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

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

        def annotation(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterComposition"):
                listener.enterComposition(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 274
            localctx.epriv = self.element_list()
            self.state = 283
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3F) == 0 and ((1 << _la) & 13194164699136) != 0) or _la == 88:
                self.state = 281
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input, 18, self._ctx)
                if la_ == 1:
                    self.state = 275
                    self.match(ModelicaParser.T__22)
                    self.state = 276
                    localctx.epub = self.element_list()
                    pass

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

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

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

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

            self.state = 297
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 25:
                self.state = 286
                self.match(ModelicaParser.T__24)
                self.state = 288
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 90:
                    self.state = 287
                    self.language_specification()

                self.state = 291
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 89:
                    self.state = 290
                    self.external_function_call()

                self.state = 294
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 79:
                    self.state = 293
                    localctx.ext_annotation = self.annotation()

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

            self.state = 302
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 79:
                self.state = 299
                localctx.comp_annotation = self.annotation()
                self.state = 300
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterLanguage_specification"):
                listener.enterLanguage_specification(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 304
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterExternal_function_call"):
                listener.enterExternal_function_call(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 309
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 25, self._ctx)
            if la_ == 1:
                self.state = 306
                self.component_reference()
                self.state = 307
                self.match(ModelicaParser.T__14)

            self.state = 311
            self.match(ModelicaParser.IDENT)
            self.state = 312
            self.match(ModelicaParser.T__16)
            self.state = 314
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3F) == 0 and ((1 << _la) & 216173881626607616) != 0) or (
                (((_la - 71)) & ~0x3F) == 0 and ((1 << (_la - 71)) & 1966265) != 0
            ):
                self.state = 313
                self.expression_list()

            self.state = 316
            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):
        __slots__ = "parser"

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

        def element(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterElement_list"):
                listener.enterElement_list(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 323
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3F) == 0 and ((1 << _la) & 545666383868) != 0) or (
                (((_la - 81)) & ~0x3F) == 0 and ((1 << (_la - 81)) & 379) != 0
            ):
                self.state = 318
                self.element()
                self.state = 319
                self.match(ModelicaParser.T__0)
                self.state = 325
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterElement"):
                listener.enterElement(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 330
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 28, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 326
                self.import_clause()
                pass

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

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

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 329
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterRegular_element"):
                listener.enterRegular_element(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 333
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 85:
                self.state = 332
                self.match(ModelicaParser.REDECLARE)

            self.state = 336
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 82:
                self.state = 335
                self.match(ModelicaParser.FINAL)

            self.state = 339
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 86:
                self.state = 338
                self.match(ModelicaParser.INNER)

            self.state = 342
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 87:
                self.state = 341
                self.match(ModelicaParser.OUTER)

            self.state = 346
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 81, 84]:
                self.state = 344
                localctx.class_elem = self.class_definition()
                pass
            elif token in [32, 33, 34, 35, 36, 37, 38, 89]:
                self.state = 345
                localctx.comp_elem = self.component_clause()
                pass
            else:
                raise NoViableAltException(self)

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

    class Replaceable_elementContext(ParserRuleContext):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterReplaceable_element"):
                listener.enterReplaceable_element(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 349
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 85:
                self.state = 348
                self.match(ModelicaParser.REDECLARE)

            self.state = 352
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 82:
                self.state = 351
                self.match(ModelicaParser.FINAL)

            self.state = 355
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 86:
                self.state = 354
                self.match(ModelicaParser.INNER)

            self.state = 358
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 87:
                self.state = 357
                self.match(ModelicaParser.OUTER)

            self.state = 360
            self.match(ModelicaParser.T__25)
            self.state = 363
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 81, 84]:
                self.state = 361
                localctx.class_elem = self.class_definition()
                pass
            elif token in [32, 33, 34, 35, 36, 37, 38, 89]:
                self.state = 362
                localctx.comp_elem = self.component_clause()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 368
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 31:
                self.state = 365
                self.constraining_clause()
                self.state = 366
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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 component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext, 0)

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_import_clause

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 370
            self.match(ModelicaParser.T__26)
            self.state = 382
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 41, self._ctx)
            if la_ == 1:
                self.state = 371
                self.match(ModelicaParser.IDENT)
                self.state = 372
                self.match(ModelicaParser.T__14)
                self.state = 373
                self.component_reference()
                pass

            elif la_ == 2:
                self.state = 374
                self.component_reference()
                self.state = 380
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [28]:
                    self.state = 375
                    self.match(ModelicaParser.T__27)
                    pass
                elif token in [29]:
                    self.state = 376
                    self.match(ModelicaParser.T__28)
                    self.state = 377
                    self.import_list()
                    self.state = 378
                    self.match(ModelicaParser.T__29)
                    pass
                elif token in [1, 79, 90]:
                    pass
                else:
                    pass
                pass

            self.state = 384
            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):
        __slots__ = "parser"

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

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

        def import_list(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterImport_list"):
                listener.enterImport_list(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 386
            self.match(ModelicaParser.IDENT)
            self.state = 391
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 42, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 387
                    self.match(ModelicaParser.T__20)
                    self.state = 388
                    self.import_list()
                self.state = 393
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 42, self._ctx)

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

    class Extends_clauseContext(ParserRuleContext):
        __slots__ = "parser"

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

        def component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext, 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: ParseTreeListener):
            if hasattr(listener, "enterExtends_clause"):
                listener.enterExtends_clause(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 394
            self.match(ModelicaParser.T__21)
            self.state = 395
            self.component_reference()
            self.state = 397
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 17:
                self.state = 396
                self.class_modification()

            self.state = 400
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 79:
                self.state = 399
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterConstraining_clause"):
                listener.enterConstraining_clause(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 402
            self.match(ModelicaParser.T__30)
            self.state = 403
            self.name()
            self.state = 405
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 17:
                self.state = 404
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterComponent_clause"):
                listener.enterComponent_clause(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 407
            self.type_prefix()
            self.state = 408
            self.type_specifier()
            self.state = 410
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 76:
                self.state = 409
                self.array_subscripts()

            self.state = 412
            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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_type_prefix

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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 = 415
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 32 or _la == 33:
                self.state = 414
                _la = self._input.LA(1)
                if not (_la == 32 or _la == 33):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()

            self.state = 418
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3F) == 0 and ((1 << _la) & 120259084288) != 0:
                self.state = 417
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 120259084288) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()

            self.state = 421
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 37 or _la == 38:
                self.state = 420
                _la = self._input.LA(1)
                if not (_la == 37 or _la == 38):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()

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

    class Type_specifier_elementContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_type_specifier_element

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

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

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

    def type_specifier_element(self):
        localctx = ModelicaParser.Type_specifier_elementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_type_specifier_element)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 423
            self.match(ModelicaParser.IDENT)
        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):
        __slots__ = "parser"

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

        def type_specifier_element(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Type_specifier_elementContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Type_specifier_elementContext, i)

        def getRuleIndex(self):
            return ModelicaParser.RULE_type_specifier

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 46, self.RULE_type_specifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 425
            self.type_specifier_element()
            self.state = 430
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 39:
                self.state = 426
                self.match(ModelicaParser.T__38)
                self.state = 427
                self.type_specifier_element()
                self.state = 432
                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_listContext(ParserRuleContext):
        __slots__ = "parser"

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

        def component_declaration(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterComponent_list"):
                listener.enterComponent_list(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 48, self.RULE_component_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 433
            self.component_declaration()
            self.state = 438
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 21:
                self.state = 434
                self.match(ModelicaParser.T__20)
                self.state = 435
                self.component_declaration()
                self.state = 440
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterComponent_declaration"):
                listener.enterComponent_declaration(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 50, self.RULE_component_declaration)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 441
            self.declaration()
            self.state = 443
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 40:
                self.state = 442
                self.condition_attribute()

            self.state = 445
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterCondition_attribute"):
                listener.enterCondition_attribute(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 52, self.RULE_condition_attribute)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 447
            self.match(ModelicaParser.T__39)
            self.state = 448
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterDeclaration"):
                listener.enterDeclaration(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 54, self.RULE_declaration)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 450
            self.match(ModelicaParser.IDENT)
            self.state = 452
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 76:
                self.state = 451
                self.array_subscripts()

            self.state = 455
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3F) == 0 and ((1 << _la) & 2199023419392) != 0:
                self.state = 454
                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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_modification

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Modification_classContext(ModificationContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.ModificationContext
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterModification_class"):
                listener.enterModification_class(self)

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

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

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

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

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

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

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

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

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

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

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

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

    def modification(self):
        localctx = ModelicaParser.ModificationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_modification)
        self._la = 0  # Token type
        try:
            self.state = 466
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [17]:
                localctx = ModelicaParser.Modification_classContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 457
                self.class_modification()
                self.state = 460
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 15:
                    self.state = 458
                    self.match(ModelicaParser.T__14)
                    self.state = 459
                    self.expression()

                pass
            elif token in [15]:
                localctx = ModelicaParser.Modification_assignmentContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 462
                self.match(ModelicaParser.T__14)
                self.state = 463
                self.expression()
                pass
            elif token in [41]:
                localctx = ModelicaParser.Modification_assignment2Context(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 464
                self.match(ModelicaParser.T__40)
                self.state = 465
                self.expression()
                pass
            else:
                raise NoViableAltException(self)

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

    class Class_modificationContext(ParserRuleContext):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterClass_modification"):
                listener.enterClass_modification(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 58, self.RULE_class_modification)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 468
            self.match(ModelicaParser.T__16)
            self.state = 470
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la - 26)) & ~0x3F) == 0 and ((1 << (_la - 26)) & -8556839292003942399) != 0:
                self.state = 469
                self.argument_list()

            self.state = 472
            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):
        __slots__ = "parser"

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

        def argument(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterArgument_list"):
                listener.enterArgument_list(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 60, self.RULE_argument_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 474
            self.argument()
            self.state = 479
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 21:
                self.state = 475
                self.match(ModelicaParser.T__20)
                self.state = 476
                self.argument()
                self.state = 481
                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):
        __slots__ = "parser"

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

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_argument

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 62, self.RULE_argument)
        try:
            self.state = 484
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [26, 80, 82, 89]:
                self.enterOuterAlt(localctx, 1)
                self.state = 482
                self.element_modification_or_replaceable()
                pass
            elif token in [85]:
                self.enterOuterAlt(localctx, 2)
                self.state = 483
                self.element_redeclaration()
                pass
            else:
                raise NoViableAltException(self)

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

    class Element_modification_or_replaceableContext(ParserRuleContext):
        __slots__ = "parser"

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

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

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

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_element_modification_or_replaceable

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 64, self.RULE_element_modification_or_replaceable)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 487
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 80:
                self.state = 486
                self.match(ModelicaParser.EACH)

            self.state = 490
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 82:
                self.state = 489
                self.match(ModelicaParser.FINAL)

            self.state = 494
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [89]:
                self.state = 492
                self.element_modification()
                pass
            elif token in [26]:
                self.state = 493
                self.element_replaceable()
                pass
            else:
                raise NoViableAltException(self)

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

    class Element_modificationContext(ParserRuleContext):
        __slots__ = "parser"

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

        def component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext, 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: ParseTreeListener):
            if hasattr(listener, "enterElement_modification"):
                listener.enterElement_modification(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 66, self.RULE_element_modification)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 496
            self.component_reference()
            self.state = 498
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3F) == 0 and ((1 << _la) & 2199023419392) != 0:
                self.state = 497
                self.modification()

            self.state = 500
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterElement_redeclaration"):
                listener.enterElement_redeclaration(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 68, self.RULE_element_redeclaration)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 502
            self.match(ModelicaParser.REDECLARE)
            self.state = 504
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 80:
                self.state = 503
                self.match(ModelicaParser.EACH)

            self.state = 507
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 82:
                self.state = 506
                self.match(ModelicaParser.FINAL)

            self.state = 514
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                10,
                11,
                12,
                13,
                32,
                33,
                34,
                35,
                36,
                37,
                38,
                81,
                89,
            ]:
                self.state = 511
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 81]:
                    self.state = 509
                    self.short_class_definition()
                    pass
                elif token in [32, 33, 34, 35, 36, 37, 38, 89]:
                    self.state = 510
                    self.component_clause1()
                    pass
                else:
                    raise NoViableAltException(self)

                pass
            elif token in [26]:
                self.state = 513
                self.element_replaceable()
                pass
            else:
                raise NoViableAltException(self)

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

    class Element_replaceableContext(ParserRuleContext):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterElement_replaceable"):
                listener.enterElement_replaceable(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 70, self.RULE_element_replaceable)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 516
            self.match(ModelicaParser.T__25)
            self.state = 519
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 81]:
                self.state = 517
                self.short_class_definition()
                pass
            elif token in [32, 33, 34, 35, 36, 37, 38, 89]:
                self.state = 518
                self.component_clause1()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 522
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 31:
                self.state = 521
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterComponent_clause1"):
                listener.enterComponent_clause1(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 72, self.RULE_component_clause1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 524
            self.type_prefix()
            self.state = 525
            self.type_specifier()
            self.state = 526
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterComponent_declaration1"):
                listener.enterComponent_declaration1(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 74, self.RULE_component_declaration1)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 528
            self.declaration()
            self.state = 529
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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 component_reference(self):
            return self.getTypedRuleContext(ModelicaParser.Component_referenceContext, 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: ParseTreeListener):
            if hasattr(listener, "enterShort_class_definition"):
                listener.enterShort_class_definition(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 76, self.RULE_short_class_definition)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 531
            self.class_prefixes()
            self.state = 532
            self.match(ModelicaParser.IDENT)
            self.state = 533
            self.match(ModelicaParser.T__14)
            self.state = 554
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [32, 33, 34, 35, 36, 37, 38, 89]:
                self.state = 534
                self.base_prefix()
                self.state = 535
                self.component_reference()
                self.state = 537
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 76:
                    self.state = 536
                    self.array_subscripts()

                self.state = 540
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 17:
                    self.state = 539
                    self.class_modification()

                self.state = 542
                self.comment()
                pass
            elif token in [16]:
                self.state = 544
                self.match(ModelicaParser.T__15)
                self.state = 545
                self.match(ModelicaParser.T__16)
                self.state = 550
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [19, 89]:
                    self.state = 547
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la == 89:
                        self.state = 546
                        self.enum_list()

                    pass
                elif token in [18]:
                    self.state = 549
                    self.match(ModelicaParser.T__17)
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 552
                self.match(ModelicaParser.T__18)
                self.state = 553
                self.comment()
                pass
            else:
                raise NoViableAltException(self)

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

    class Equation_blockContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_equation_block

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

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

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

    def equation_block(self):
        localctx = ModelicaParser.Equation_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_equation_block)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 561
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 75, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 556
                    self.equation()
                    self.state = 557
                    self.match(ModelicaParser.T__0)
                self.state = 563
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 75, 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 Equation_sectionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def equation_block(self):
            return self.getTypedRuleContext(ModelicaParser.Equation_blockContext, 0)

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_equation_section

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 80, self.RULE_equation_section)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 565
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 88:
                self.state = 564
                self.match(ModelicaParser.INITIAL)

            self.state = 567
            self.match(ModelicaParser.T__41)
            self.state = 568
            self.equation_block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Statement_blockContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_statement_block

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

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

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

    def statement_block(self):
        localctx = ModelicaParser.Statement_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_statement_block)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 575
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3F) == 0 and ((1 << _la) & 14127624905424896) != 0) or _la == 89:
                self.state = 570
                self.statement()
                self.state = 571
                self.match(ModelicaParser.T__0)
                self.state = 577
                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 Algorithm_sectionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def statement_block(self):
            return self.getTypedRuleContext(ModelicaParser.Statement_blockContext, 0)

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_algorithm_section

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 84, self.RULE_algorithm_section)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 579
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 88:
                self.state = 578
                self.match(ModelicaParser.INITIAL)

            self.state = 581
            self.match(ModelicaParser.T__42)
            self.state = 582
            self.statement_block()
        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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_equation_options

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

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

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

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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: ParserRuleContext
        ):  # actually a ModelicaParser.Equation_optionsContext
            super().__init__(parser)
            self.copyFrom(ctx)

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

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

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

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

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

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

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

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

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

    class Equation_functionContext(Equation_optionsContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.Equation_optionsContext
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterEquation_function"):
                listener.enterEquation_function(self)

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

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

    class Equation_simpleContext(Equation_optionsContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.Equation_optionsContext
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterEquation_simple"):
                listener.enterEquation_simple(self)

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

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

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

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

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 86, self.RULE_equation_options)
        try:
            self.state = 595
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 79, self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Equation_simpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 584
                self.simple_expression()
                self.state = 585
                self.match(ModelicaParser.T__14)
                self.state = 586
                self.expression()
                pass

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

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

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

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

            elif la_ == 6:
                localctx = ModelicaParser.Equation_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 592
                self.name()
                self.state = 593
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterEquation"):
                listener.enterEquation(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 88, self.RULE_equation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 597
            self.equation_options()
            self.state = 598
            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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_statement_options

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    class Statement_component_referenceContext(Statement_optionsContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.Statement_optionsContext
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterStatement_component_reference"):
                listener.enterStatement_component_reference(self)

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

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

    def statement_options(self):
        localctx = ModelicaParser.Statement_optionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_statement_options)
        self._la = 0  # Token type
        try:
            self.state = 626
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [89]:
                localctx = ModelicaParser.Statement_component_referenceContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 600
                self.component_reference()
                self.state = 604
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [41]:
                    self.state = 601
                    self.match(ModelicaParser.T__40)
                    self.state = 602
                    self.expression()
                    pass
                elif token in [17]:
                    self.state = 603
                    self.function_call_args()
                    pass
                else:
                    raise NoViableAltException(self)

                pass
            elif token in [17]:
                localctx = ModelicaParser.Statement_component_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 606
                self.match(ModelicaParser.T__16)
                self.state = 607
                self.component_reference()
                self.state = 612
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 21:
                    self.state = 608
                    self.match(ModelicaParser.T__20)
                    self.state = 609
                    self.component_reference()
                    self.state = 614
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 615
                self.match(ModelicaParser.T__18)
                self.state = 616
                self.match(ModelicaParser.T__40)
                self.state = 617
                self.component_reference()
                self.state = 618
                self.function_call_args()
                pass
            elif token in [44]:
                localctx = ModelicaParser.Statement_breakContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 620
                self.match(ModelicaParser.T__43)
                pass
            elif token in [45]:
                localctx = ModelicaParser.Statement_returnContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 621
                self.match(ModelicaParser.T__44)
                pass
            elif token in [40]:
                localctx = ModelicaParser.Statement_ifContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 622
                self.if_statement()
                pass
            elif token in [49]:
                localctx = ModelicaParser.Statement_forContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 623
                self.for_statement()
                pass
            elif token in [52]:
                localctx = ModelicaParser.Statement_whileContext(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 624
                self.while_statement()
                pass
            elif token in [53]:
                localctx = ModelicaParser.Statement_whenContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 625
                self.when_statement()
                pass
            else:
                raise NoViableAltException(self)

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

    class StatementContext(ParserRuleContext):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterStatement"):
                listener.enterStatement(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 92, self.RULE_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 628
            self.statement_options()
            self.state = 629
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self._expression = None  # ExpressionContext
            self.conditions = list()  # of ExpressionContexts
            self._equation_block = None  # Equation_blockContext
            self.blocks = list()  # of Equation_blockContexts

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

        def equation_block(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Equation_blockContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Equation_blockContext, i)

        def getRuleIndex(self):
            return ModelicaParser.RULE_if_equation

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 94, self.RULE_if_equation)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 631
            self.match(ModelicaParser.T__39)
            self.state = 632
            localctx._expression = self.expression()
            localctx.conditions.append(localctx._expression)
            self.state = 633
            self.match(ModelicaParser.T__45)
            self.state = 634
            localctx._equation_block = self.equation_block()
            localctx.blocks.append(localctx._equation_block)
            self.state = 642
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 47:
                self.state = 635
                self.match(ModelicaParser.T__46)
                self.state = 636
                localctx._expression = self.expression()
                localctx.conditions.append(localctx._expression)
                self.state = 637
                self.match(ModelicaParser.T__45)
                self.state = 638
                localctx._equation_block = self.equation_block()
                localctx.blocks.append(localctx._equation_block)
                self.state = 644
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 647
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 48:
                self.state = 645
                self.match(ModelicaParser.T__47)
                self.state = 646
                localctx._equation_block = self.equation_block()
                localctx.blocks.append(localctx._equation_block)

            self.state = 649
            self.match(ModelicaParser.T__13)
            self.state = 650
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self._expression = None  # ExpressionContext
            self.conditions = list()  # of ExpressionContexts
            self._statement_block = None  # Statement_blockContext
            self.blocks = list()  # of Statement_blockContexts

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

        def statement_block(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Statement_blockContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Statement_blockContext, i)

        def getRuleIndex(self):
            return ModelicaParser.RULE_if_statement

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 96, self.RULE_if_statement)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 652
            self.match(ModelicaParser.T__39)
            self.state = 653
            localctx._expression = self.expression()
            localctx.conditions.append(localctx._expression)
            self.state = 654
            self.match(ModelicaParser.T__45)
            self.state = 655
            localctx._statement_block = self.statement_block()
            localctx.blocks.append(localctx._statement_block)
            self.state = 663
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 47:
                self.state = 656
                self.match(ModelicaParser.T__46)
                self.state = 657
                localctx._expression = self.expression()
                localctx.conditions.append(localctx._expression)
                self.state = 658
                self.match(ModelicaParser.T__45)
                self.state = 659
                localctx._statement_block = self.statement_block()
                localctx.blocks.append(localctx._statement_block)
                self.state = 665
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 668
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 48:
                self.state = 666
                self.match(ModelicaParser.T__47)
                self.state = 667
                localctx._statement_block = self.statement_block()
                localctx.blocks.append(localctx._statement_block)

            self.state = 670
            self.match(ModelicaParser.T__13)
            self.state = 671
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.indices = None  # For_indicesContext
            self.block = None  # Equation_blockContext

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

        def equation_block(self):
            return self.getTypedRuleContext(ModelicaParser.Equation_blockContext, 0)

        def getRuleIndex(self):
            return ModelicaParser.RULE_for_equation

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 98, self.RULE_for_equation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 673
            self.match(ModelicaParser.T__48)
            self.state = 674
            localctx.indices = self.for_indices()
            self.state = 675
            self.match(ModelicaParser.T__49)
            self.state = 676
            localctx.block = self.equation_block()
            self.state = 677
            self.match(ModelicaParser.T__13)
            self.state = 678
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.indices = None  # For_indicesContext
            self.block = None  # Statement_blockContext

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

        def statement_block(self):
            return self.getTypedRuleContext(ModelicaParser.Statement_blockContext, 0)

        def getRuleIndex(self):
            return ModelicaParser.RULE_for_statement

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 100, self.RULE_for_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 680
            self.match(ModelicaParser.T__48)
            self.state = 681
            localctx.indices = self.for_indices()
            self.state = 682
            self.match(ModelicaParser.T__49)
            self.state = 683
            localctx.block = self.statement_block()
            self.state = 684
            self.match(ModelicaParser.T__13)
            self.state = 685
            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):
        __slots__ = "parser"

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

        def for_index(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterFor_indices"):
                listener.enterFor_indices(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 102, self.RULE_for_indices)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 687
            self.for_index()
            self.state = 692
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 87, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 688
                    self.match(ModelicaParser.T__20)
                    self.state = 689
                    self.for_index()
                self.state = 694
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 87, 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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterFor_index"):
                listener.enterFor_index(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 104, self.RULE_for_index)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 695
            self.match(ModelicaParser.IDENT)
            self.state = 698
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 51:
                self.state = 696
                self.match(ModelicaParser.T__50)
                self.state = 697
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.condition = None  # ExpressionContext
            self.block = None  # Statement_blockContext

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

        def statement_block(self):
            return self.getTypedRuleContext(ModelicaParser.Statement_blockContext, 0)

        def getRuleIndex(self):
            return ModelicaParser.RULE_while_statement

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 106, self.RULE_while_statement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 700
            self.match(ModelicaParser.T__51)
            self.state = 701
            localctx.condition = self.expression()
            self.state = 702
            self.match(ModelicaParser.T__49)
            self.state = 703
            localctx.block = self.statement_block()
            self.state = 704
            self.match(ModelicaParser.T__13)
            self.state = 705
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self._expression = None  # ExpressionContext
            self.conditions = list()  # of ExpressionContexts
            self._equation_block = None  # Equation_blockContext
            self.blocks = list()  # of Equation_blockContexts

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

        def equation_block(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Equation_blockContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Equation_blockContext, i)

        def getRuleIndex(self):
            return ModelicaParser.RULE_when_equation

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 108, self.RULE_when_equation)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 707
            self.match(ModelicaParser.T__52)
            self.state = 708
            localctx._expression = self.expression()
            localctx.conditions.append(localctx._expression)
            self.state = 709
            self.match(ModelicaParser.T__45)
            self.state = 710
            localctx._equation_block = self.equation_block()
            localctx.blocks.append(localctx._equation_block)
            self.state = 718
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 54:
                self.state = 711
                self.match(ModelicaParser.T__53)
                self.state = 712
                localctx._expression = self.expression()
                localctx.conditions.append(localctx._expression)
                self.state = 713
                self.match(ModelicaParser.T__45)
                self.state = 714
                localctx._equation_block = self.equation_block()
                localctx.blocks.append(localctx._equation_block)
                self.state = 720
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 721
            self.match(ModelicaParser.T__13)
            self.state = 722
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self._expression = None  # ExpressionContext
            self.conditions = list()  # of ExpressionContexts
            self._statement_block = None  # Statement_blockContext
            self.blocks = list()  # of Statement_blockContexts

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

        def statement_block(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Statement_blockContext)
            else:
                return self.getTypedRuleContext(ModelicaParser.Statement_blockContext, i)

        def getRuleIndex(self):
            return ModelicaParser.RULE_when_statement

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 110, self.RULE_when_statement)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 724
            self.match(ModelicaParser.T__52)
            self.state = 725
            localctx._expression = self.expression()
            localctx.conditions.append(localctx._expression)
            self.state = 726
            self.match(ModelicaParser.T__45)
            self.state = 727
            localctx._statement_block = self.statement_block()
            localctx.blocks.append(localctx._statement_block)
            self.state = 735
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 54:
                self.state = 728
                self.match(ModelicaParser.T__53)
                self.state = 729
                localctx._expression = self.expression()
                localctx.conditions.append(localctx._expression)
                self.state = 730
                self.match(ModelicaParser.T__45)
                self.state = 731
                localctx._statement_block = self.statement_block()
                localctx.blocks.append(localctx._statement_block)
                self.state = 737
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 738
            self.match(ModelicaParser.T__13)
            self.state = 739
            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):
        __slots__ = "parser"

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

        def component_reference(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterConnect_clause"):
                listener.enterConnect_clause(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 112, self.RULE_connect_clause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 741
            self.match(ModelicaParser.T__54)
            self.state = 742
            self.match(ModelicaParser.T__16)
            self.state = 743
            self.component_reference()
            self.state = 744
            self.match(ModelicaParser.T__20)
            self.state = 745
            self.component_reference()
            self.state = 746
            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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_expression

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

    class Expression_ifContext(ExpressionContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.ExpressionContext
            super().__init__(parser)
            self._expression = None  # ExpressionContext
            self.conditions = list()  # of ExpressionContexts
            self.blocks = list()  # of ExpressionContexts
            self.copyFrom(ctx)

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

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

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

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

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

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

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

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

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

    def expression(self):
        localctx = ModelicaParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_expression)
        self._la = 0  # Token type
        try:
            self.state = 766
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [14, 17, 20, 56, 57, 71, 74, 75, 76, 78, 88, 89, 90, 91]:
                localctx = ModelicaParser.Expression_simpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 748
                self.simple_expression()
                pass
            elif token in [40]:
                localctx = ModelicaParser.Expression_ifContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 749
                self.match(ModelicaParser.T__39)
                self.state = 750
                localctx._expression = self.expression()
                localctx.conditions.append(localctx._expression)
                self.state = 751
                self.match(ModelicaParser.T__45)
                self.state = 752
                localctx._expression = self.expression()
                localctx.blocks.append(localctx._expression)
                self.state = 760
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 47:
                    self.state = 753
                    self.match(ModelicaParser.T__46)
                    self.state = 754
                    localctx._expression = self.expression()
                    localctx.conditions.append(localctx._expression)
                    self.state = 755
                    self.match(ModelicaParser.T__45)
                    self.state = 756
                    localctx._expression = self.expression()
                    localctx.blocks.append(localctx._expression)
                    self.state = 762
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 763
                self.match(ModelicaParser.T__47)
                self.state = 764
                localctx._expression = self.expression()
                localctx.blocks.append(localctx._expression)
                pass
            else:
                raise NoViableAltException(self)

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

    class Simple_expressionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def expr(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterSimple_expression"):
                listener.enterSimple_expression(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 116, self.RULE_simple_expression)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 768
            self.expr(0)
            self.state = 775
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 18:
                self.state = 769
                self.match(ModelicaParser.T__17)
                self.state = 770
                self.expr(0)
                self.state = 773
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 18:
                    self.state = 771
                    self.match(ModelicaParser.T__17)
                    self.state = 772
                    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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_expr

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    def expr(self, _p: int = 0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = ModelicaParser.ExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 118
        self.enterRecursionRule(localctx, 118, self.RULE_expr, _p)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 787
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 95, self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Expr_signedContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 778
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not (_la == 56 or _la == 57):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 779
                self.expr(9)
                pass

            elif la_ == 2:
                localctx = ModelicaParser.Expr_expContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 780
                self.primary()
                self.state = 781
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not (_la == 58 or _la == 59):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 782
                self.primary()
                pass

            elif la_ == 3:
                localctx = ModelicaParser.Expr_notContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 784
                self.match(ModelicaParser.T__70)
                self.state = 785
                self.expr(4)
                pass

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

            self._ctx.stop = self._input.LT(-1)
            self.state = 806
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 97, 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 = 804
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input, 96, self._ctx)
                    if la_ == 1:
                        localctx = ModelicaParser.Expr_mulContext(
                            self, ModelicaParser.ExprContext(self, _parentctx, _parentState)
                        )
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                        self.state = 789
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException

                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 790
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 8070450532516364288) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 791
                        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 = 792
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException

                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 793
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not (((((_la - 56)) & ~0x3F) == 0 and ((1 << (_la - 56)) & 387) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 794
                        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 = 795
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException

                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 796
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not (((((_la - 65)) & ~0x3F) == 0 and ((1 << (_la - 65)) & 63) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 797
                        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 = 798
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException

                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 799
                        self.match(ModelicaParser.T__71)
                        self.state = 800
                        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 = 801
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException

                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 802
                        self.match(ModelicaParser.T__72)
                        self.state = 803
                        self.expr(3)
                        pass

                self.state = 808
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 97, 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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_primary

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    def primary(self):
        localctx = ModelicaParser.PrimaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_primary)
        self._la = 0  # Token type
        try:
            self.state = 841
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 99, self._ctx)
            if la_ == 1:
                localctx = ModelicaParser.Primary_unsigned_numberContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 809
                self.match(ModelicaParser.UNSIGNED_NUMBER)
                pass

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

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

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

            elif la_ == 5:
                localctx = ModelicaParser.Primary_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 813
                self.component_reference()
                self.state = 814
                self.function_call_args()
                pass

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

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

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

            elif la_ == 9:
                localctx = ModelicaParser.Primary_output_expression_listContext(self, localctx)
                self.enterOuterAlt(localctx, 9)
                self.state = 821
                self.match(ModelicaParser.T__16)
                self.state = 822
                self.output_expression_list()
                self.state = 823
                self.match(ModelicaParser.T__18)
                pass

            elif la_ == 10:
                localctx = ModelicaParser.Primary_expression_listContext(self, localctx)
                self.enterOuterAlt(localctx, 10)
                self.state = 825
                self.match(ModelicaParser.T__75)
                self.state = 826
                self.expression_list()
                self.state = 831
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 1:
                    self.state = 827
                    self.match(ModelicaParser.T__0)
                    self.state = 828
                    self.expression_list()
                    self.state = 833
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

            elif la_ == 11:
                localctx = ModelicaParser.Primary_function_argumentsContext(self, localctx)
                self.enterOuterAlt(localctx, 11)
                self.state = 836
                self.match(ModelicaParser.T__77)
                self.state = 837
                self.function_arguments()
                self.state = 838
                self.match(ModelicaParser.T__29)
                pass

            elif la_ == 12:
                localctx = ModelicaParser.Primary_endContext(self, localctx)
                self.enterOuterAlt(localctx, 12)
                self.state = 840
                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):
        __slots__ = "parser"

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

        def IDENT(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterName"):
                listener.enterName(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 122, self.RULE_name)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 844
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 39:
                self.state = 843
                self.match(ModelicaParser.T__38)

            self.state = 846
            self.match(ModelicaParser.IDENT)
            self.state = 851
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 39:
                self.state = 847
                self.match(ModelicaParser.T__38)
                self.state = 848
                self.match(ModelicaParser.IDENT)
                self.state = 853
                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_reference_elementContext(ParserRuleContext):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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 getRuleIndex(self):
            return ModelicaParser.RULE_component_reference_element

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

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

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

    def component_reference_element(self):
        localctx = ModelicaParser.Component_reference_elementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_component_reference_element)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 854
            self.match(ModelicaParser.IDENT)
            self.state = 856
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 102, self._ctx)
            if la_ == 1:
                self.state = 855
                self.array_subscripts()

        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):
        __slots__ = "parser"

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

        def component_reference_element(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ModelicaParser.Component_reference_elementContext)
            else:
                return self.getTypedRuleContext(
                    ModelicaParser.Component_reference_elementContext, i
                )

        def getRuleIndex(self):
            return ModelicaParser.RULE_component_reference

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

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 126, self.RULE_component_reference)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 858
            self.component_reference_element()
            self.state = 863
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 103, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 859
                    self.match(ModelicaParser.T__38)
                    self.state = 860
                    self.component_reference_element()
                self.state = 865
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 103, 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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterFunction_call_args"):
                listener.enterFunction_call_args(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 128, self.RULE_function_call_args)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 866
            self.match(ModelicaParser.T__16)
            self.state = 868
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3F) == 0 and ((1 << _la) & 216173881626615808) != 0) or (
                (((_la - 71)) & ~0x3F) == 0 and ((1 << (_la - 71)) & 1966265) != 0
            ):
                self.state = 867
                self.function_arguments()

            self.state = 870
            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):
        __slots__ = "parser"

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

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

        def for_indices(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterFunction_arguments"):
                listener.enterFunction_arguments(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 130, self.RULE_function_arguments)
        self._la = 0  # Token type
        try:
            self.state = 883
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 107, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 872
                self.function_argument()
                self.state = 879
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 21 or _la == 49:
                    self.state = 877
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [21]:
                        self.state = 873
                        self.match(ModelicaParser.T__20)
                        self.state = 874
                        self.function_argument()
                        pass
                    elif token in [49]:
                        self.state = 875
                        self.match(ModelicaParser.T__48)
                        self.state = 876
                        self.for_indices()
                        pass
                    else:
                        raise NoViableAltException(self)

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

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 882
                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):
        __slots__ = "parser"

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

        def named_argument(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterNamed_arguments"):
                listener.enterNamed_arguments(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 132, self.RULE_named_arguments)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 885
            self.named_argument()
            self.state = 890
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 21:
                self.state = 886
                self.match(ModelicaParser.T__20)
                self.state = 887
                self.named_argument()
                self.state = 892
                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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterNamed_argument"):
                listener.enterNamed_argument(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 134, self.RULE_named_argument)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 893
            self.match(ModelicaParser.IDENT)
            self.state = 894
            self.match(ModelicaParser.T__14)
            self.state = 895
            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):
        __slots__ = "parser"

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

        def getRuleIndex(self):
            return ModelicaParser.RULE_function_argument

        def copyFrom(self, ctx: ParserRuleContext):
            super().copyFrom(ctx)

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

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

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

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

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

    class Argument_functionContext(Function_argumentContext):
        def __init__(
            self, parser, ctx: ParserRuleContext
        ):  # actually a ModelicaParser.Function_argumentContext
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterArgument_function"):
                listener.enterArgument_function(self)

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

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

    def function_argument(self):
        localctx = ModelicaParser.Function_argumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_function_argument)
        self._la = 0  # Token type
        try:
            self.state = 906
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [13]:
                localctx = ModelicaParser.Argument_functionContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 897
                self.match(ModelicaParser.T__12)
                self.state = 898
                self.name()
                self.state = 899
                self.match(ModelicaParser.T__16)
                self.state = 901
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 89:
                    self.state = 900
                    self.named_arguments()

                self.state = 903
                self.match(ModelicaParser.T__18)
                pass
            elif token in [14, 17, 20, 40, 56, 57, 71, 74, 75, 76, 78, 88, 89, 90, 91]:
                localctx = ModelicaParser.Argument_expressionContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 905
                self.expression()
                pass
            else:
                raise NoViableAltException(self)

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

    class Output_expression_listContext(ParserRuleContext):
        __slots__ = "parser"

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

        def expression(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterOutput_expression_list"):
                listener.enterOutput_expression_list(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 138, self.RULE_output_expression_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 909
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3F) == 0 and ((1 << _la) & 216173881626607616) != 0) or (
                (((_la - 71)) & ~0x3F) == 0 and ((1 << (_la - 71)) & 1966265) != 0
            ):
                self.state = 908
                self.expression()

            self.state = 915
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 21:
                self.state = 911
                self.match(ModelicaParser.T__20)
                self.state = 912
                self.expression()
                self.state = 917
                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):
        __slots__ = "parser"

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

        def expression(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterExpression_list"):
                listener.enterExpression_list(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 140, self.RULE_expression_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 918
            self.expression()
            self.state = 923
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 21:
                self.state = 919
                self.match(ModelicaParser.T__20)
                self.state = 920
                self.expression()
                self.state = 925
                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):
        __slots__ = "parser"

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

        def subscript(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterArray_subscripts"):
                listener.enterArray_subscripts(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 142, self.RULE_array_subscripts)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 926
            self.match(ModelicaParser.T__75)
            self.state = 927
            self.subscript()
            self.state = 932
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 21:
                self.state = 928
                self.match(ModelicaParser.T__20)
                self.state = 929
                self.subscript()
                self.state = 934
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 935
            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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterSubscript"):
                listener.enterSubscript(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 144, self.RULE_subscript)
        try:
            self.state = 939
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [18]:
                self.enterOuterAlt(localctx, 1)
                self.state = 937
                self.match(ModelicaParser.T__17)
                pass
            elif token in [14, 17, 20, 40, 56, 57, 71, 74, 75, 76, 78, 88, 89, 90, 91]:
                self.enterOuterAlt(localctx, 2)
                self.state = 938
                self.expression()
                pass
            else:
                raise NoViableAltException(self)

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

    class CommentContext(ParserRuleContext):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterComment"):
                listener.enterComment(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 146, self.RULE_comment)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 941
            self.string_comment()
            self.state = 943
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 79:
                self.state = 942
                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):
        __slots__ = "parser"

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

        def STRING(self, i: int = 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: ParseTreeListener):
            if hasattr(listener, "enterString_comment"):
                listener.enterString_comment(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 148, self.RULE_string_comment)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 953
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 90:
                self.state = 945
                self.match(ModelicaParser.STRING)
                self.state = 950
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 56:
                    self.state = 946
                    self.match(ModelicaParser.T__55)
                    self.state = 947
                    self.match(ModelicaParser.STRING)
                    self.state = 952
                    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):
        __slots__ = "parser"

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__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: ParseTreeListener):
            if hasattr(listener, "enterAnnotation"):
                listener.enterAnnotation(self)

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

        def accept(self, visitor: ParseTreeVisitor):
            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, 150, self.RULE_annotation)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 955
            self.match(ModelicaParser.T__78)
            self.state = 956
            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: RuleContext, ruleIndex: int, predIndex: int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[59] = 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: ExprContext, predIndex: int):
        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)
