# Generated from ANTLRv4Parser.g4 by ANTLR 4.13.2
# encoding: utf-8
import sys

from antlr4 import *

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


def serializedATN():
    return [
        4,
        1,
        79,
        649,
        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,
        1,
        0,
        1,
        0,
        5,
        0,
        137,
        8,
        0,
        10,
        0,
        12,
        0,
        140,
        9,
        0,
        1,
        0,
        1,
        0,
        5,
        0,
        144,
        8,
        0,
        10,
        0,
        12,
        0,
        147,
        9,
        0,
        1,
        0,
        1,
        0,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        2,
        1,
        2,
        1,
        2,
        1,
        2,
        1,
        2,
        3,
        2,
        160,
        8,
        2,
        1,
        3,
        1,
        3,
        1,
        3,
        1,
        3,
        1,
        3,
        3,
        3,
        167,
        8,
        3,
        1,
        4,
        1,
        4,
        1,
        4,
        1,
        4,
        5,
        4,
        173,
        8,
        4,
        10,
        4,
        12,
        4,
        176,
        9,
        4,
        1,
        4,
        1,
        4,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        5,
        1,
        6,
        1,
        6,
        1,
        6,
        5,
        6,
        187,
        8,
        6,
        10,
        6,
        12,
        6,
        190,
        9,
        6,
        1,
        6,
        1,
        6,
        1,
        6,
        3,
        6,
        195,
        8,
        6,
        1,
        7,
        1,
        7,
        1,
        7,
        1,
        7,
        5,
        7,
        201,
        8,
        7,
        10,
        7,
        12,
        7,
        204,
        9,
        7,
        1,
        7,
        1,
        7,
        1,
        8,
        1,
        8,
        1,
        8,
        1,
        8,
        1,
        8,
        3,
        8,
        213,
        8,
        8,
        1,
        9,
        1,
        9,
        3,
        9,
        217,
        8,
        9,
        1,
        9,
        1,
        9,
        1,
        10,
        1,
        10,
        3,
        10,
        223,
        8,
        10,
        1,
        10,
        1,
        10,
        1,
        11,
        1,
        11,
        1,
        11,
        5,
        11,
        230,
        8,
        11,
        10,
        11,
        12,
        11,
        233,
        9,
        11,
        1,
        11,
        3,
        11,
        236,
        8,
        11,
        1,
        12,
        1,
        12,
        1,
        12,
        1,
        12,
        3,
        12,
        242,
        8,
        12,
        1,
        12,
        1,
        12,
        1,
        12,
        1,
        13,
        1,
        13,
        1,
        13,
        3,
        13,
        250,
        8,
        13,
        1,
        14,
        1,
        14,
        1,
        15,
        1,
        15,
        5,
        15,
        256,
        8,
        15,
        10,
        15,
        12,
        15,
        259,
        9,
        15,
        1,
        15,
        1,
        15,
        1,
        16,
        1,
        16,
        1,
        16,
        1,
        16,
        5,
        16,
        267,
        8,
        16,
        10,
        16,
        12,
        16,
        270,
        9,
        16,
        1,
        17,
        5,
        17,
        273,
        8,
        17,
        10,
        17,
        12,
        17,
        276,
        9,
        17,
        1,
        18,
        1,
        18,
        3,
        18,
        280,
        8,
        18,
        1,
        19,
        3,
        19,
        283,
        8,
        19,
        1,
        19,
        1,
        19,
        3,
        19,
        287,
        8,
        19,
        1,
        19,
        3,
        19,
        290,
        8,
        19,
        1,
        19,
        3,
        19,
        293,
        8,
        19,
        1,
        19,
        3,
        19,
        296,
        8,
        19,
        1,
        19,
        5,
        19,
        299,
        8,
        19,
        10,
        19,
        12,
        19,
        302,
        9,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        19,
        1,
        20,
        5,
        20,
        310,
        8,
        20,
        10,
        20,
        12,
        20,
        313,
        9,
        20,
        1,
        20,
        3,
        20,
        316,
        8,
        20,
        1,
        21,
        1,
        21,
        1,
        21,
        1,
        21,
        1,
        22,
        1,
        22,
        1,
        22,
        1,
        23,
        1,
        23,
        3,
        23,
        327,
        8,
        23,
        1,
        24,
        1,
        24,
        1,
        24,
        1,
        25,
        1,
        25,
        1,
        25,
        1,
        25,
        5,
        25,
        336,
        8,
        25,
        10,
        25,
        12,
        25,
        339,
        9,
        25,
        1,
        26,
        1,
        26,
        1,
        26,
        1,
        27,
        1,
        27,
        1,
        27,
        1,
        27,
        1,
        28,
        4,
        28,
        349,
        8,
        28,
        11,
        28,
        12,
        28,
        350,
        1,
        29,
        1,
        29,
        1,
        30,
        1,
        30,
        1,
        31,
        1,
        31,
        1,
        31,
        5,
        31,
        360,
        8,
        31,
        10,
        31,
        12,
        31,
        363,
        9,
        31,
        1,
        32,
        1,
        32,
        1,
        32,
        3,
        32,
        368,
        8,
        32,
        1,
        33,
        3,
        33,
        371,
        8,
        33,
        1,
        33,
        1,
        33,
        3,
        33,
        375,
        8,
        33,
        1,
        33,
        1,
        33,
        1,
        33,
        1,
        33,
        1,
        34,
        1,
        34,
        1,
        35,
        1,
        35,
        1,
        35,
        5,
        35,
        386,
        8,
        35,
        10,
        35,
        12,
        35,
        389,
        9,
        35,
        1,
        36,
        1,
        36,
        3,
        36,
        393,
        8,
        36,
        1,
        36,
        3,
        36,
        396,
        8,
        36,
        1,
        37,
        4,
        37,
        399,
        8,
        37,
        11,
        37,
        12,
        37,
        400,
        1,
        37,
        3,
        37,
        404,
        8,
        37,
        1,
        38,
        1,
        38,
        3,
        38,
        408,
        8,
        38,
        1,
        38,
        1,
        38,
        3,
        38,
        412,
        8,
        38,
        1,
        38,
        1,
        38,
        3,
        38,
        416,
        8,
        38,
        3,
        38,
        418,
        8,
        38,
        1,
        39,
        1,
        39,
        1,
        39,
        1,
        39,
        1,
        40,
        1,
        40,
        1,
        40,
        1,
        40,
        5,
        40,
        428,
        8,
        40,
        10,
        40,
        12,
        40,
        431,
        9,
        40,
        1,
        41,
        1,
        41,
        1,
        41,
        1,
        41,
        1,
        41,
        1,
        41,
        3,
        41,
        439,
        8,
        41,
        1,
        42,
        1,
        42,
        3,
        42,
        443,
        8,
        42,
        1,
        43,
        1,
        43,
        3,
        43,
        447,
        8,
        43,
        1,
        44,
        1,
        44,
        1,
        44,
        5,
        44,
        452,
        8,
        44,
        10,
        44,
        12,
        44,
        455,
        9,
        44,
        1,
        45,
        3,
        45,
        458,
        8,
        45,
        1,
        45,
        4,
        45,
        461,
        8,
        45,
        11,
        45,
        12,
        45,
        462,
        1,
        45,
        3,
        45,
        466,
        8,
        45,
        1,
        46,
        1,
        46,
        1,
        46,
        3,
        46,
        471,
        8,
        46,
        1,
        46,
        1,
        46,
        1,
        46,
        3,
        46,
        476,
        8,
        46,
        1,
        46,
        1,
        46,
        1,
        46,
        3,
        46,
        481,
        8,
        46,
        1,
        46,
        3,
        46,
        484,
        8,
        46,
        3,
        46,
        486,
        8,
        46,
        1,
        47,
        1,
        47,
        1,
        47,
        1,
        47,
        5,
        47,
        492,
        8,
        47,
        10,
        47,
        12,
        47,
        495,
        9,
        47,
        1,
        47,
        1,
        47,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        1,
        48,
        3,
        48,
        505,
        8,
        48,
        3,
        48,
        507,
        8,
        48,
        1,
        49,
        1,
        49,
        1,
        49,
        1,
        49,
        3,
        49,
        513,
        8,
        49,
        1,
        50,
        1,
        50,
        3,
        50,
        517,
        8,
        50,
        1,
        51,
        1,
        51,
        1,
        52,
        1,
        52,
        3,
        52,
        523,
        8,
        52,
        1,
        52,
        1,
        52,
        3,
        52,
        527,
        8,
        52,
        1,
        52,
        1,
        52,
        3,
        52,
        531,
        8,
        52,
        3,
        52,
        533,
        8,
        52,
        1,
        53,
        1,
        53,
        1,
        53,
        1,
        53,
        1,
        53,
        3,
        53,
        540,
        8,
        53,
        1,
        54,
        1,
        54,
        1,
        54,
        1,
        54,
        3,
        54,
        546,
        8,
        54,
        1,
        55,
        1,
        55,
        3,
        55,
        550,
        8,
        55,
        1,
        56,
        1,
        56,
        1,
        56,
        1,
        56,
        3,
        56,
        556,
        8,
        56,
        1,
        57,
        1,
        57,
        1,
        57,
        1,
        57,
        5,
        57,
        562,
        8,
        57,
        10,
        57,
        12,
        57,
        565,
        9,
        57,
        1,
        57,
        1,
        57,
        1,
        58,
        1,
        58,
        3,
        58,
        571,
        8,
        58,
        1,
        58,
        1,
        58,
        3,
        58,
        575,
        8,
        58,
        1,
        58,
        1,
        58,
        3,
        58,
        579,
        8,
        58,
        1,
        59,
        1,
        59,
        3,
        59,
        583,
        8,
        59,
        1,
        59,
        5,
        59,
        586,
        8,
        59,
        10,
        59,
        12,
        59,
        589,
        9,
        59,
        1,
        59,
        3,
        59,
        592,
        8,
        59,
        1,
        59,
        1,
        59,
        1,
        59,
        1,
        60,
        1,
        60,
        3,
        60,
        599,
        8,
        60,
        1,
        60,
        3,
        60,
        602,
        8,
        60,
        1,
        61,
        1,
        61,
        1,
        61,
        1,
        61,
        1,
        62,
        1,
        62,
        3,
        62,
        610,
        8,
        62,
        1,
        62,
        1,
        62,
        3,
        62,
        614,
        8,
        62,
        3,
        62,
        616,
        8,
        62,
        1,
        63,
        1,
        63,
        1,
        63,
        1,
        63,
        5,
        63,
        622,
        8,
        63,
        10,
        63,
        12,
        63,
        625,
        9,
        63,
        1,
        63,
        1,
        63,
        1,
        64,
        1,
        64,
        1,
        64,
        1,
        64,
        1,
        64,
        1,
        64,
        3,
        64,
        635,
        8,
        64,
        3,
        64,
        637,
        8,
        64,
        1,
        65,
        1,
        65,
        1,
        66,
        1,
        66,
        1,
        66,
        5,
        66,
        644,
        8,
        66,
        10,
        66,
        12,
        66,
        647,
        9,
        66,
        1,
        66,
        1,
        257,
        0,
        67,
        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,
        0,
        3,
        2,
        0,
        41,
        41,
        45,
        47,
        2,
        0,
        7,
        7,
        66,
        66,
        2,
        0,
        9,
        9,
        13,
        13,
        686,
        0,
        134,
        1,
        0,
        0,
        0,
        2,
        150,
        1,
        0,
        0,
        0,
        4,
        159,
        1,
        0,
        0,
        0,
        6,
        166,
        1,
        0,
        0,
        0,
        8,
        168,
        1,
        0,
        0,
        0,
        10,
        179,
        1,
        0,
        0,
        0,
        12,
        194,
        1,
        0,
        0,
        0,
        14,
        196,
        1,
        0,
        0,
        0,
        16,
        212,
        1,
        0,
        0,
        0,
        18,
        214,
        1,
        0,
        0,
        0,
        20,
        220,
        1,
        0,
        0,
        0,
        22,
        226,
        1,
        0,
        0,
        0,
        24,
        237,
        1,
        0,
        0,
        0,
        26,
        249,
        1,
        0,
        0,
        0,
        28,
        251,
        1,
        0,
        0,
        0,
        30,
        253,
        1,
        0,
        0,
        0,
        32,
        262,
        1,
        0,
        0,
        0,
        34,
        274,
        1,
        0,
        0,
        0,
        36,
        279,
        1,
        0,
        0,
        0,
        38,
        282,
        1,
        0,
        0,
        0,
        40,
        311,
        1,
        0,
        0,
        0,
        42,
        317,
        1,
        0,
        0,
        0,
        44,
        321,
        1,
        0,
        0,
        0,
        46,
        326,
        1,
        0,
        0,
        0,
        48,
        328,
        1,
        0,
        0,
        0,
        50,
        331,
        1,
        0,
        0,
        0,
        52,
        340,
        1,
        0,
        0,
        0,
        54,
        343,
        1,
        0,
        0,
        0,
        56,
        348,
        1,
        0,
        0,
        0,
        58,
        352,
        1,
        0,
        0,
        0,
        60,
        354,
        1,
        0,
        0,
        0,
        62,
        356,
        1,
        0,
        0,
        0,
        64,
        364,
        1,
        0,
        0,
        0,
        66,
        370,
        1,
        0,
        0,
        0,
        68,
        380,
        1,
        0,
        0,
        0,
        70,
        382,
        1,
        0,
        0,
        0,
        72,
        395,
        1,
        0,
        0,
        0,
        74,
        403,
        1,
        0,
        0,
        0,
        76,
        417,
        1,
        0,
        0,
        0,
        78,
        419,
        1,
        0,
        0,
        0,
        80,
        423,
        1,
        0,
        0,
        0,
        82,
        438,
        1,
        0,
        0,
        0,
        84,
        442,
        1,
        0,
        0,
        0,
        86,
        446,
        1,
        0,
        0,
        0,
        88,
        448,
        1,
        0,
        0,
        0,
        90,
        465,
        1,
        0,
        0,
        0,
        92,
        485,
        1,
        0,
        0,
        0,
        94,
        487,
        1,
        0,
        0,
        0,
        96,
        506,
        1,
        0,
        0,
        0,
        98,
        508,
        1,
        0,
        0,
        0,
        100,
        514,
        1,
        0,
        0,
        0,
        102,
        518,
        1,
        0,
        0,
        0,
        104,
        532,
        1,
        0,
        0,
        0,
        106,
        539,
        1,
        0,
        0,
        0,
        108,
        545,
        1,
        0,
        0,
        0,
        110,
        547,
        1,
        0,
        0,
        0,
        112,
        555,
        1,
        0,
        0,
        0,
        114,
        557,
        1,
        0,
        0,
        0,
        116,
        578,
        1,
        0,
        0,
        0,
        118,
        580,
        1,
        0,
        0,
        0,
        120,
        596,
        1,
        0,
        0,
        0,
        122,
        603,
        1,
        0,
        0,
        0,
        124,
        615,
        1,
        0,
        0,
        0,
        126,
        617,
        1,
        0,
        0,
        0,
        128,
        636,
        1,
        0,
        0,
        0,
        130,
        638,
        1,
        0,
        0,
        0,
        132,
        640,
        1,
        0,
        0,
        0,
        134,
        138,
        3,
        2,
        1,
        0,
        135,
        137,
        3,
        6,
        3,
        0,
        136,
        135,
        1,
        0,
        0,
        0,
        137,
        140,
        1,
        0,
        0,
        0,
        138,
        136,
        1,
        0,
        0,
        0,
        138,
        139,
        1,
        0,
        0,
        0,
        139,
        141,
        1,
        0,
        0,
        0,
        140,
        138,
        1,
        0,
        0,
        0,
        141,
        145,
        3,
        34,
        17,
        0,
        142,
        144,
        3,
        32,
        16,
        0,
        143,
        142,
        1,
        0,
        0,
        0,
        144,
        147,
        1,
        0,
        0,
        0,
        145,
        143,
        1,
        0,
        0,
        0,
        145,
        146,
        1,
        0,
        0,
        0,
        146,
        148,
        1,
        0,
        0,
        0,
        147,
        145,
        1,
        0,
        0,
        0,
        148,
        149,
        5,
        0,
        0,
        1,
        149,
        1,
        1,
        0,
        0,
        0,
        150,
        151,
        3,
        4,
        2,
        0,
        151,
        152,
        3,
        130,
        65,
        0,
        152,
        153,
        5,
        57,
        0,
        0,
        153,
        3,
        1,
        0,
        0,
        0,
        154,
        155,
        5,
        42,
        0,
        0,
        155,
        160,
        5,
        44,
        0,
        0,
        156,
        157,
        5,
        43,
        0,
        0,
        157,
        160,
        5,
        44,
        0,
        0,
        158,
        160,
        5,
        44,
        0,
        0,
        159,
        154,
        1,
        0,
        0,
        0,
        159,
        156,
        1,
        0,
        0,
        0,
        159,
        158,
        1,
        0,
        0,
        0,
        160,
        5,
        1,
        0,
        0,
        0,
        161,
        167,
        3,
        8,
        4,
        0,
        162,
        167,
        3,
        14,
        7,
        0,
        163,
        167,
        3,
        18,
        9,
        0,
        164,
        167,
        3,
        20,
        10,
        0,
        165,
        167,
        3,
        24,
        12,
        0,
        166,
        161,
        1,
        0,
        0,
        0,
        166,
        162,
        1,
        0,
        0,
        0,
        166,
        163,
        1,
        0,
        0,
        0,
        166,
        164,
        1,
        0,
        0,
        0,
        166,
        165,
        1,
        0,
        0,
        0,
        167,
        7,
        1,
        0,
        0,
        0,
        168,
        174,
        5,
        37,
        0,
        0,
        169,
        170,
        3,
        10,
        5,
        0,
        170,
        171,
        5,
        57,
        0,
        0,
        171,
        173,
        1,
        0,
        0,
        0,
        172,
        169,
        1,
        0,
        0,
        0,
        173,
        176,
        1,
        0,
        0,
        0,
        174,
        172,
        1,
        0,
        0,
        0,
        174,
        175,
        1,
        0,
        0,
        0,
        175,
        177,
        1,
        0,
        0,
        0,
        176,
        174,
        1,
        0,
        0,
        0,
        177,
        178,
        5,
        60,
        0,
        0,
        178,
        9,
        1,
        0,
        0,
        0,
        179,
        180,
        3,
        130,
        65,
        0,
        180,
        181,
        5,
        7,
        0,
        0,
        181,
        182,
        3,
        12,
        6,
        0,
        182,
        11,
        1,
        0,
        0,
        0,
        183,
        188,
        3,
        130,
        65,
        0,
        184,
        185,
        5,
        71,
        0,
        0,
        185,
        187,
        3,
        130,
        65,
        0,
        186,
        184,
        1,
        0,
        0,
        0,
        187,
        190,
        1,
        0,
        0,
        0,
        188,
        186,
        1,
        0,
        0,
        0,
        188,
        189,
        1,
        0,
        0,
        0,
        189,
        195,
        1,
        0,
        0,
        0,
        190,
        188,
        1,
        0,
        0,
        0,
        191,
        195,
        5,
        11,
        0,
        0,
        192,
        195,
        3,
        28,
        14,
        0,
        193,
        195,
        5,
        34,
        0,
        0,
        194,
        183,
        1,
        0,
        0,
        0,
        194,
        191,
        1,
        0,
        0,
        0,
        194,
        192,
        1,
        0,
        0,
        0,
        194,
        193,
        1,
        0,
        0,
        0,
        195,
        13,
        1,
        0,
        0,
        0,
        196,
        197,
        5,
        40,
        0,
        0,
        197,
        202,
        3,
        16,
        8,
        0,
        198,
        199,
        5,
        56,
        0,
        0,
        199,
        201,
        3,
        16,
        8,
        0,
        200,
        198,
        1,
        0,
        0,
        0,
        201,
        204,
        1,
        0,
        0,
        0,
        202,
        200,
        1,
        0,
        0,
        0,
        202,
        203,
        1,
        0,
        0,
        0,
        203,
        205,
        1,
        0,
        0,
        0,
        204,
        202,
        1,
        0,
        0,
        0,
        205,
        206,
        5,
        57,
        0,
        0,
        206,
        15,
        1,
        0,
        0,
        0,
        207,
        208,
        3,
        130,
        65,
        0,
        208,
        209,
        5,
        7,
        0,
        0,
        209,
        210,
        3,
        130,
        65,
        0,
        210,
        213,
        1,
        0,
        0,
        0,
        211,
        213,
        3,
        130,
        65,
        0,
        212,
        207,
        1,
        0,
        0,
        0,
        212,
        211,
        1,
        0,
        0,
        0,
        213,
        17,
        1,
        0,
        0,
        0,
        214,
        216,
        5,
        38,
        0,
        0,
        215,
        217,
        3,
        22,
        11,
        0,
        216,
        215,
        1,
        0,
        0,
        0,
        216,
        217,
        1,
        0,
        0,
        0,
        217,
        218,
        1,
        0,
        0,
        0,
        218,
        219,
        5,
        60,
        0,
        0,
        219,
        19,
        1,
        0,
        0,
        0,
        220,
        222,
        5,
        39,
        0,
        0,
        221,
        223,
        3,
        22,
        11,
        0,
        222,
        221,
        1,
        0,
        0,
        0,
        222,
        223,
        1,
        0,
        0,
        0,
        223,
        224,
        1,
        0,
        0,
        0,
        224,
        225,
        5,
        60,
        0,
        0,
        225,
        21,
        1,
        0,
        0,
        0,
        226,
        231,
        3,
        130,
        65,
        0,
        227,
        228,
        5,
        56,
        0,
        0,
        228,
        230,
        3,
        130,
        65,
        0,
        229,
        227,
        1,
        0,
        0,
        0,
        230,
        233,
        1,
        0,
        0,
        0,
        231,
        229,
        1,
        0,
        0,
        0,
        231,
        232,
        1,
        0,
        0,
        0,
        232,
        235,
        1,
        0,
        0,
        0,
        233,
        231,
        1,
        0,
        0,
        0,
        234,
        236,
        5,
        56,
        0,
        0,
        235,
        234,
        1,
        0,
        0,
        0,
        235,
        236,
        1,
        0,
        0,
        0,
        236,
        23,
        1,
        0,
        0,
        0,
        237,
        241,
        5,
        72,
        0,
        0,
        238,
        239,
        3,
        26,
        13,
        0,
        239,
        240,
        5,
        55,
        0,
        0,
        240,
        242,
        1,
        0,
        0,
        0,
        241,
        238,
        1,
        0,
        0,
        0,
        241,
        242,
        1,
        0,
        0,
        0,
        242,
        243,
        1,
        0,
        0,
        0,
        243,
        244,
        3,
        130,
        65,
        0,
        244,
        245,
        3,
        28,
        14,
        0,
        245,
        25,
        1,
        0,
        0,
        0,
        246,
        250,
        3,
        130,
        65,
        0,
        247,
        250,
        5,
        42,
        0,
        0,
        248,
        250,
        5,
        43,
        0,
        0,
        249,
        246,
        1,
        0,
        0,
        0,
        249,
        247,
        1,
        0,
        0,
        0,
        249,
        248,
        1,
        0,
        0,
        0,
        250,
        27,
        1,
        0,
        0,
        0,
        251,
        252,
        5,
        4,
        0,
        0,
        252,
        29,
        1,
        0,
        0,
        0,
        253,
        257,
        5,
        36,
        0,
        0,
        254,
        256,
        5,
        78,
        0,
        0,
        255,
        254,
        1,
        0,
        0,
        0,
        256,
        259,
        1,
        0,
        0,
        0,
        257,
        258,
        1,
        0,
        0,
        0,
        257,
        255,
        1,
        0,
        0,
        0,
        258,
        260,
        1,
        0,
        0,
        0,
        259,
        257,
        1,
        0,
        0,
        0,
        260,
        261,
        5,
        76,
        0,
        0,
        261,
        31,
        1,
        0,
        0,
        0,
        262,
        263,
        5,
        53,
        0,
        0,
        263,
        264,
        3,
        130,
        65,
        0,
        264,
        268,
        5,
        57,
        0,
        0,
        265,
        267,
        3,
        66,
        33,
        0,
        266,
        265,
        1,
        0,
        0,
        0,
        267,
        270,
        1,
        0,
        0,
        0,
        268,
        266,
        1,
        0,
        0,
        0,
        268,
        269,
        1,
        0,
        0,
        0,
        269,
        33,
        1,
        0,
        0,
        0,
        270,
        268,
        1,
        0,
        0,
        0,
        271,
        273,
        3,
        36,
        18,
        0,
        272,
        271,
        1,
        0,
        0,
        0,
        273,
        276,
        1,
        0,
        0,
        0,
        274,
        272,
        1,
        0,
        0,
        0,
        274,
        275,
        1,
        0,
        0,
        0,
        275,
        35,
        1,
        0,
        0,
        0,
        276,
        274,
        1,
        0,
        0,
        0,
        277,
        280,
        3,
        38,
        19,
        0,
        278,
        280,
        3,
        66,
        33,
        0,
        279,
        277,
        1,
        0,
        0,
        0,
        279,
        278,
        1,
        0,
        0,
        0,
        280,
        37,
        1,
        0,
        0,
        0,
        281,
        283,
        3,
        56,
        28,
        0,
        282,
        281,
        1,
        0,
        0,
        0,
        282,
        283,
        1,
        0,
        0,
        0,
        283,
        284,
        1,
        0,
        0,
        0,
        284,
        286,
        5,
        9,
        0,
        0,
        285,
        287,
        3,
        30,
        15,
        0,
        286,
        285,
        1,
        0,
        0,
        0,
        286,
        287,
        1,
        0,
        0,
        0,
        287,
        289,
        1,
        0,
        0,
        0,
        288,
        290,
        3,
        48,
        24,
        0,
        289,
        288,
        1,
        0,
        0,
        0,
        289,
        290,
        1,
        0,
        0,
        0,
        290,
        292,
        1,
        0,
        0,
        0,
        291,
        293,
        3,
        50,
        25,
        0,
        292,
        291,
        1,
        0,
        0,
        0,
        292,
        293,
        1,
        0,
        0,
        0,
        293,
        295,
        1,
        0,
        0,
        0,
        294,
        296,
        3,
        52,
        26,
        0,
        295,
        294,
        1,
        0,
        0,
        0,
        295,
        296,
        1,
        0,
        0,
        0,
        296,
        300,
        1,
        0,
        0,
        0,
        297,
        299,
        3,
        46,
        23,
        0,
        298,
        297,
        1,
        0,
        0,
        0,
        299,
        302,
        1,
        0,
        0,
        0,
        300,
        298,
        1,
        0,
        0,
        0,
        300,
        301,
        1,
        0,
        0,
        0,
        301,
        303,
        1,
        0,
        0,
        0,
        302,
        300,
        1,
        0,
        0,
        0,
        303,
        304,
        5,
        54,
        0,
        0,
        304,
        305,
        3,
        60,
        30,
        0,
        305,
        306,
        5,
        57,
        0,
        0,
        306,
        307,
        3,
        40,
        20,
        0,
        307,
        39,
        1,
        0,
        0,
        0,
        308,
        310,
        3,
        42,
        21,
        0,
        309,
        308,
        1,
        0,
        0,
        0,
        310,
        313,
        1,
        0,
        0,
        0,
        311,
        309,
        1,
        0,
        0,
        0,
        311,
        312,
        1,
        0,
        0,
        0,
        312,
        315,
        1,
        0,
        0,
        0,
        313,
        311,
        1,
        0,
        0,
        0,
        314,
        316,
        3,
        44,
        22,
        0,
        315,
        314,
        1,
        0,
        0,
        0,
        315,
        316,
        1,
        0,
        0,
        0,
        316,
        41,
        1,
        0,
        0,
        0,
        317,
        318,
        5,
        51,
        0,
        0,
        318,
        319,
        3,
        30,
        15,
        0,
        319,
        320,
        3,
        28,
        14,
        0,
        320,
        43,
        1,
        0,
        0,
        0,
        321,
        322,
        5,
        52,
        0,
        0,
        322,
        323,
        3,
        28,
        14,
        0,
        323,
        45,
        1,
        0,
        0,
        0,
        324,
        327,
        3,
        8,
        4,
        0,
        325,
        327,
        3,
        54,
        27,
        0,
        326,
        324,
        1,
        0,
        0,
        0,
        326,
        325,
        1,
        0,
        0,
        0,
        327,
        47,
        1,
        0,
        0,
        0,
        328,
        329,
        5,
        48,
        0,
        0,
        329,
        330,
        3,
        30,
        15,
        0,
        330,
        49,
        1,
        0,
        0,
        0,
        331,
        332,
        5,
        50,
        0,
        0,
        332,
        337,
        3,
        132,
        66,
        0,
        333,
        334,
        5,
        56,
        0,
        0,
        334,
        336,
        3,
        132,
        66,
        0,
        335,
        333,
        1,
        0,
        0,
        0,
        336,
        339,
        1,
        0,
        0,
        0,
        337,
        335,
        1,
        0,
        0,
        0,
        337,
        338,
        1,
        0,
        0,
        0,
        338,
        51,
        1,
        0,
        0,
        0,
        339,
        337,
        1,
        0,
        0,
        0,
        340,
        341,
        5,
        49,
        0,
        0,
        341,
        342,
        3,
        30,
        15,
        0,
        342,
        53,
        1,
        0,
        0,
        0,
        343,
        344,
        5,
        72,
        0,
        0,
        344,
        345,
        3,
        130,
        65,
        0,
        345,
        346,
        3,
        28,
        14,
        0,
        346,
        55,
        1,
        0,
        0,
        0,
        347,
        349,
        3,
        58,
        29,
        0,
        348,
        347,
        1,
        0,
        0,
        0,
        349,
        350,
        1,
        0,
        0,
        0,
        350,
        348,
        1,
        0,
        0,
        0,
        350,
        351,
        1,
        0,
        0,
        0,
        351,
        57,
        1,
        0,
        0,
        0,
        352,
        353,
        7,
        0,
        0,
        0,
        353,
        59,
        1,
        0,
        0,
        0,
        354,
        355,
        3,
        62,
        31,
        0,
        355,
        61,
        1,
        0,
        0,
        0,
        356,
        361,
        3,
        64,
        32,
        0,
        357,
        358,
        5,
        68,
        0,
        0,
        358,
        360,
        3,
        64,
        32,
        0,
        359,
        357,
        1,
        0,
        0,
        0,
        360,
        363,
        1,
        0,
        0,
        0,
        361,
        359,
        1,
        0,
        0,
        0,
        361,
        362,
        1,
        0,
        0,
        0,
        362,
        63,
        1,
        0,
        0,
        0,
        363,
        361,
        1,
        0,
        0,
        0,
        364,
        367,
        3,
        90,
        45,
        0,
        365,
        366,
        5,
        73,
        0,
        0,
        366,
        368,
        3,
        130,
        65,
        0,
        367,
        365,
        1,
        0,
        0,
        0,
        367,
        368,
        1,
        0,
        0,
        0,
        368,
        65,
        1,
        0,
        0,
        0,
        369,
        371,
        5,
        41,
        0,
        0,
        370,
        369,
        1,
        0,
        0,
        0,
        370,
        371,
        1,
        0,
        0,
        0,
        371,
        372,
        1,
        0,
        0,
        0,
        372,
        374,
        5,
        13,
        0,
        0,
        373,
        375,
        3,
        8,
        4,
        0,
        374,
        373,
        1,
        0,
        0,
        0,
        374,
        375,
        1,
        0,
        0,
        0,
        375,
        376,
        1,
        0,
        0,
        0,
        376,
        377,
        5,
        54,
        0,
        0,
        377,
        378,
        3,
        68,
        34,
        0,
        378,
        379,
        5,
        57,
        0,
        0,
        379,
        67,
        1,
        0,
        0,
        0,
        380,
        381,
        3,
        70,
        35,
        0,
        381,
        69,
        1,
        0,
        0,
        0,
        382,
        387,
        3,
        72,
        36,
        0,
        383,
        384,
        5,
        68,
        0,
        0,
        384,
        386,
        3,
        72,
        36,
        0,
        385,
        383,
        1,
        0,
        0,
        0,
        386,
        389,
        1,
        0,
        0,
        0,
        387,
        385,
        1,
        0,
        0,
        0,
        387,
        388,
        1,
        0,
        0,
        0,
        388,
        71,
        1,
        0,
        0,
        0,
        389,
        387,
        1,
        0,
        0,
        0,
        390,
        392,
        3,
        74,
        37,
        0,
        391,
        393,
        3,
        80,
        40,
        0,
        392,
        391,
        1,
        0,
        0,
        0,
        392,
        393,
        1,
        0,
        0,
        0,
        393,
        396,
        1,
        0,
        0,
        0,
        394,
        396,
        1,
        0,
        0,
        0,
        395,
        390,
        1,
        0,
        0,
        0,
        395,
        394,
        1,
        0,
        0,
        0,
        396,
        73,
        1,
        0,
        0,
        0,
        397,
        399,
        3,
        76,
        38,
        0,
        398,
        397,
        1,
        0,
        0,
        0,
        399,
        400,
        1,
        0,
        0,
        0,
        400,
        398,
        1,
        0,
        0,
        0,
        400,
        401,
        1,
        0,
        0,
        0,
        401,
        404,
        1,
        0,
        0,
        0,
        402,
        404,
        1,
        0,
        0,
        0,
        403,
        398,
        1,
        0,
        0,
        0,
        403,
        402,
        1,
        0,
        0,
        0,
        404,
        75,
        1,
        0,
        0,
        0,
        405,
        407,
        3,
        106,
        53,
        0,
        406,
        408,
        3,
        104,
        52,
        0,
        407,
        406,
        1,
        0,
        0,
        0,
        407,
        408,
        1,
        0,
        0,
        0,
        408,
        418,
        1,
        0,
        0,
        0,
        409,
        411,
        3,
        78,
        39,
        0,
        410,
        412,
        3,
        104,
        52,
        0,
        411,
        410,
        1,
        0,
        0,
        0,
        411,
        412,
        1,
        0,
        0,
        0,
        412,
        418,
        1,
        0,
        0,
        0,
        413,
        415,
        3,
        28,
        14,
        0,
        414,
        416,
        5,
        64,
        0,
        0,
        415,
        414,
        1,
        0,
        0,
        0,
        415,
        416,
        1,
        0,
        0,
        0,
        416,
        418,
        1,
        0,
        0,
        0,
        417,
        405,
        1,
        0,
        0,
        0,
        417,
        409,
        1,
        0,
        0,
        0,
        417,
        413,
        1,
        0,
        0,
        0,
        418,
        77,
        1,
        0,
        0,
        0,
        419,
        420,
        5,
        58,
        0,
        0,
        420,
        421,
        3,
        70,
        35,
        0,
        421,
        422,
        5,
        59,
        0,
        0,
        422,
        79,
        1,
        0,
        0,
        0,
        423,
        424,
        5,
        61,
        0,
        0,
        424,
        429,
        3,
        82,
        41,
        0,
        425,
        426,
        5,
        56,
        0,
        0,
        426,
        428,
        3,
        82,
        41,
        0,
        427,
        425,
        1,
        0,
        0,
        0,
        428,
        431,
        1,
        0,
        0,
        0,
        429,
        427,
        1,
        0,
        0,
        0,
        429,
        430,
        1,
        0,
        0,
        0,
        430,
        81,
        1,
        0,
        0,
        0,
        431,
        429,
        1,
        0,
        0,
        0,
        432,
        433,
        3,
        84,
        42,
        0,
        433,
        434,
        5,
        58,
        0,
        0,
        434,
        435,
        3,
        86,
        43,
        0,
        435,
        436,
        5,
        59,
        0,
        0,
        436,
        439,
        1,
        0,
        0,
        0,
        437,
        439,
        3,
        84,
        42,
        0,
        438,
        432,
        1,
        0,
        0,
        0,
        438,
        437,
        1,
        0,
        0,
        0,
        439,
        83,
        1,
        0,
        0,
        0,
        440,
        443,
        3,
        130,
        65,
        0,
        441,
        443,
        5,
        53,
        0,
        0,
        442,
        440,
        1,
        0,
        0,
        0,
        442,
        441,
        1,
        0,
        0,
        0,
        443,
        85,
        1,
        0,
        0,
        0,
        444,
        447,
        3,
        130,
        65,
        0,
        445,
        447,
        5,
        34,
        0,
        0,
        446,
        444,
        1,
        0,
        0,
        0,
        446,
        445,
        1,
        0,
        0,
        0,
        447,
        87,
        1,
        0,
        0,
        0,
        448,
        453,
        3,
        90,
        45,
        0,
        449,
        450,
        5,
        68,
        0,
        0,
        450,
        452,
        3,
        90,
        45,
        0,
        451,
        449,
        1,
        0,
        0,
        0,
        452,
        455,
        1,
        0,
        0,
        0,
        453,
        451,
        1,
        0,
        0,
        0,
        453,
        454,
        1,
        0,
        0,
        0,
        454,
        89,
        1,
        0,
        0,
        0,
        455,
        453,
        1,
        0,
        0,
        0,
        456,
        458,
        3,
        126,
        63,
        0,
        457,
        456,
        1,
        0,
        0,
        0,
        457,
        458,
        1,
        0,
        0,
        0,
        458,
        460,
        1,
        0,
        0,
        0,
        459,
        461,
        3,
        92,
        46,
        0,
        460,
        459,
        1,
        0,
        0,
        0,
        461,
        462,
        1,
        0,
        0,
        0,
        462,
        460,
        1,
        0,
        0,
        0,
        462,
        463,
        1,
        0,
        0,
        0,
        463,
        466,
        1,
        0,
        0,
        0,
        464,
        466,
        1,
        0,
        0,
        0,
        465,
        457,
        1,
        0,
        0,
        0,
        465,
        464,
        1,
        0,
        0,
        0,
        466,
        91,
        1,
        0,
        0,
        0,
        467,
        470,
        3,
        98,
        49,
        0,
        468,
        471,
        3,
        104,
        52,
        0,
        469,
        471,
        1,
        0,
        0,
        0,
        470,
        468,
        1,
        0,
        0,
        0,
        470,
        469,
        1,
        0,
        0,
        0,
        471,
        486,
        1,
        0,
        0,
        0,
        472,
        475,
        3,
        108,
        54,
        0,
        473,
        476,
        3,
        104,
        52,
        0,
        474,
        476,
        1,
        0,
        0,
        0,
        475,
        473,
        1,
        0,
        0,
        0,
        475,
        474,
        1,
        0,
        0,
        0,
        476,
        486,
        1,
        0,
        0,
        0,
        477,
        486,
        3,
        100,
        50,
        0,
        478,
        480,
        3,
        28,
        14,
        0,
        479,
        481,
        5,
        64,
        0,
        0,
        480,
        479,
        1,
        0,
        0,
        0,
        480,
        481,
        1,
        0,
        0,
        0,
        481,
        483,
        1,
        0,
        0,
        0,
        482,
        484,
        3,
        94,
        47,
        0,
        483,
        482,
        1,
        0,
        0,
        0,
        483,
        484,
        1,
        0,
        0,
        0,
        484,
        486,
        1,
        0,
        0,
        0,
        485,
        467,
        1,
        0,
        0,
        0,
        485,
        472,
        1,
        0,
        0,
        0,
        485,
        477,
        1,
        0,
        0,
        0,
        485,
        478,
        1,
        0,
        0,
        0,
        486,
        93,
        1,
        0,
        0,
        0,
        487,
        488,
        5,
        62,
        0,
        0,
        488,
        493,
        3,
        96,
        48,
        0,
        489,
        490,
        5,
        56,
        0,
        0,
        490,
        492,
        3,
        96,
        48,
        0,
        491,
        489,
        1,
        0,
        0,
        0,
        492,
        495,
        1,
        0,
        0,
        0,
        493,
        491,
        1,
        0,
        0,
        0,
        493,
        494,
        1,
        0,
        0,
        0,
        494,
        496,
        1,
        0,
        0,
        0,
        495,
        493,
        1,
        0,
        0,
        0,
        496,
        497,
        5,
        63,
        0,
        0,
        497,
        95,
        1,
        0,
        0,
        0,
        498,
        507,
        3,
        128,
        64,
        0,
        499,
        500,
        3,
        130,
        65,
        0,
        500,
        504,
        5,
        7,
        0,
        0,
        501,
        505,
        3,
        28,
        14,
        0,
        502,
        505,
        5,
        34,
        0,
        0,
        503,
        505,
        5,
        11,
        0,
        0,
        504,
        501,
        1,
        0,
        0,
        0,
        504,
        502,
        1,
        0,
        0,
        0,
        504,
        503,
        1,
        0,
        0,
        0,
        505,
        507,
        1,
        0,
        0,
        0,
        506,
        498,
        1,
        0,
        0,
        0,
        506,
        499,
        1,
        0,
        0,
        0,
        507,
        97,
        1,
        0,
        0,
        0,
        508,
        509,
        3,
        130,
        65,
        0,
        509,
        512,
        7,
        1,
        0,
        0,
        510,
        513,
        3,
        108,
        54,
        0,
        511,
        513,
        3,
        118,
        59,
        0,
        512,
        510,
        1,
        0,
        0,
        0,
        512,
        511,
        1,
        0,
        0,
        0,
        513,
        99,
        1,
        0,
        0,
        0,
        514,
        516,
        3,
        118,
        59,
        0,
        515,
        517,
        3,
        102,
        51,
        0,
        516,
        515,
        1,
        0,
        0,
        0,
        516,
        517,
        1,
        0,
        0,
        0,
        517,
        101,
        1,
        0,
        0,
        0,
        518,
        519,
        3,
        104,
        52,
        0,
        519,
        103,
        1,
        0,
        0,
        0,
        520,
        522,
        5,
        64,
        0,
        0,
        521,
        523,
        5,
        64,
        0,
        0,
        522,
        521,
        1,
        0,
        0,
        0,
        522,
        523,
        1,
        0,
        0,
        0,
        523,
        533,
        1,
        0,
        0,
        0,
        524,
        526,
        5,
        65,
        0,
        0,
        525,
        527,
        5,
        64,
        0,
        0,
        526,
        525,
        1,
        0,
        0,
        0,
        526,
        527,
        1,
        0,
        0,
        0,
        527,
        533,
        1,
        0,
        0,
        0,
        528,
        530,
        5,
        67,
        0,
        0,
        529,
        531,
        5,
        64,
        0,
        0,
        530,
        529,
        1,
        0,
        0,
        0,
        530,
        531,
        1,
        0,
        0,
        0,
        531,
        533,
        1,
        0,
        0,
        0,
        532,
        520,
        1,
        0,
        0,
        0,
        532,
        524,
        1,
        0,
        0,
        0,
        532,
        528,
        1,
        0,
        0,
        0,
        533,
        105,
        1,
        0,
        0,
        0,
        534,
        540,
        3,
        122,
        61,
        0,
        535,
        540,
        3,
        124,
        62,
        0,
        536,
        540,
        3,
        112,
        56,
        0,
        537,
        540,
        5,
        8,
        0,
        0,
        538,
        540,
        3,
        110,
        55,
        0,
        539,
        534,
        1,
        0,
        0,
        0,
        539,
        535,
        1,
        0,
        0,
        0,
        539,
        536,
        1,
        0,
        0,
        0,
        539,
        537,
        1,
        0,
        0,
        0,
        539,
        538,
        1,
        0,
        0,
        0,
        540,
        107,
        1,
        0,
        0,
        0,
        541,
        546,
        3,
        124,
        62,
        0,
        542,
        546,
        3,
        120,
        60,
        0,
        543,
        546,
        3,
        112,
        56,
        0,
        544,
        546,
        3,
        110,
        55,
        0,
        545,
        541,
        1,
        0,
        0,
        0,
        545,
        542,
        1,
        0,
        0,
        0,
        545,
        543,
        1,
        0,
        0,
        0,
        545,
        544,
        1,
        0,
        0,
        0,
        546,
        109,
        1,
        0,
        0,
        0,
        547,
        549,
        5,
        71,
        0,
        0,
        548,
        550,
        3,
        126,
        63,
        0,
        549,
        548,
        1,
        0,
        0,
        0,
        549,
        550,
        1,
        0,
        0,
        0,
        550,
        111,
        1,
        0,
        0,
        0,
        551,
        552,
        5,
        74,
        0,
        0,
        552,
        556,
        3,
        116,
        58,
        0,
        553,
        554,
        5,
        74,
        0,
        0,
        554,
        556,
        3,
        114,
        57,
        0,
        555,
        551,
        1,
        0,
        0,
        0,
        555,
        553,
        1,
        0,
        0,
        0,
        556,
        113,
        1,
        0,
        0,
        0,
        557,
        558,
        5,
        58,
        0,
        0,
        558,
        563,
        3,
        116,
        58,
        0,
        559,
        560,
        5,
        68,
        0,
        0,
        560,
        562,
        3,
        116,
        58,
        0,
        561,
        559,
        1,
        0,
        0,
        0,
        562,
        565,
        1,
        0,
        0,
        0,
        563,
        561,
        1,
        0,
        0,
        0,
        563,
        564,
        1,
        0,
        0,
        0,
        564,
        566,
        1,
        0,
        0,
        0,
        565,
        563,
        1,
        0,
        0,
        0,
        566,
        567,
        5,
        59,
        0,
        0,
        567,
        115,
        1,
        0,
        0,
        0,
        568,
        570,
        5,
        13,
        0,
        0,
        569,
        571,
        3,
        126,
        63,
        0,
        570,
        569,
        1,
        0,
        0,
        0,
        570,
        571,
        1,
        0,
        0,
        0,
        571,
        579,
        1,
        0,
        0,
        0,
        572,
        574,
        5,
        11,
        0,
        0,
        573,
        575,
        3,
        126,
        63,
        0,
        574,
        573,
        1,
        0,
        0,
        0,
        574,
        575,
        1,
        0,
        0,
        0,
        575,
        579,
        1,
        0,
        0,
        0,
        576,
        579,
        3,
        122,
        61,
        0,
        577,
        579,
        5,
        8,
        0,
        0,
        578,
        568,
        1,
        0,
        0,
        0,
        578,
        572,
        1,
        0,
        0,
        0,
        578,
        576,
        1,
        0,
        0,
        0,
        578,
        577,
        1,
        0,
        0,
        0,
        579,
        117,
        1,
        0,
        0,
        0,
        580,
        591,
        5,
        58,
        0,
        0,
        581,
        583,
        3,
        8,
        4,
        0,
        582,
        581,
        1,
        0,
        0,
        0,
        582,
        583,
        1,
        0,
        0,
        0,
        583,
        587,
        1,
        0,
        0,
        0,
        584,
        586,
        3,
        54,
        27,
        0,
        585,
        584,
        1,
        0,
        0,
        0,
        586,
        589,
        1,
        0,
        0,
        0,
        587,
        585,
        1,
        0,
        0,
        0,
        587,
        588,
        1,
        0,
        0,
        0,
        588,
        590,
        1,
        0,
        0,
        0,
        589,
        587,
        1,
        0,
        0,
        0,
        590,
        592,
        5,
        54,
        0,
        0,
        591,
        582,
        1,
        0,
        0,
        0,
        591,
        592,
        1,
        0,
        0,
        0,
        592,
        593,
        1,
        0,
        0,
        0,
        593,
        594,
        3,
        88,
        44,
        0,
        594,
        595,
        5,
        59,
        0,
        0,
        595,
        119,
        1,
        0,
        0,
        0,
        596,
        598,
        5,
        9,
        0,
        0,
        597,
        599,
        3,
        30,
        15,
        0,
        598,
        597,
        1,
        0,
        0,
        0,
        598,
        599,
        1,
        0,
        0,
        0,
        599,
        601,
        1,
        0,
        0,
        0,
        600,
        602,
        3,
        126,
        63,
        0,
        601,
        600,
        1,
        0,
        0,
        0,
        601,
        602,
        1,
        0,
        0,
        0,
        602,
        121,
        1,
        0,
        0,
        0,
        603,
        604,
        5,
        11,
        0,
        0,
        604,
        605,
        5,
        70,
        0,
        0,
        605,
        606,
        5,
        11,
        0,
        0,
        606,
        123,
        1,
        0,
        0,
        0,
        607,
        609,
        5,
        13,
        0,
        0,
        608,
        610,
        3,
        126,
        63,
        0,
        609,
        608,
        1,
        0,
        0,
        0,
        609,
        610,
        1,
        0,
        0,
        0,
        610,
        616,
        1,
        0,
        0,
        0,
        611,
        613,
        5,
        11,
        0,
        0,
        612,
        614,
        3,
        126,
        63,
        0,
        613,
        612,
        1,
        0,
        0,
        0,
        613,
        614,
        1,
        0,
        0,
        0,
        614,
        616,
        1,
        0,
        0,
        0,
        615,
        607,
        1,
        0,
        0,
        0,
        615,
        611,
        1,
        0,
        0,
        0,
        616,
        125,
        1,
        0,
        0,
        0,
        617,
        618,
        5,
        62,
        0,
        0,
        618,
        623,
        3,
        128,
        64,
        0,
        619,
        620,
        5,
        56,
        0,
        0,
        620,
        622,
        3,
        128,
        64,
        0,
        621,
        619,
        1,
        0,
        0,
        0,
        622,
        625,
        1,
        0,
        0,
        0,
        623,
        621,
        1,
        0,
        0,
        0,
        623,
        624,
        1,
        0,
        0,
        0,
        624,
        626,
        1,
        0,
        0,
        0,
        625,
        623,
        1,
        0,
        0,
        0,
        626,
        627,
        5,
        63,
        0,
        0,
        627,
        127,
        1,
        0,
        0,
        0,
        628,
        637,
        3,
        132,
        66,
        0,
        629,
        630,
        3,
        130,
        65,
        0,
        630,
        634,
        5,
        7,
        0,
        0,
        631,
        635,
        3,
        132,
        66,
        0,
        632,
        635,
        5,
        11,
        0,
        0,
        633,
        635,
        5,
        34,
        0,
        0,
        634,
        631,
        1,
        0,
        0,
        0,
        634,
        632,
        1,
        0,
        0,
        0,
        634,
        633,
        1,
        0,
        0,
        0,
        635,
        637,
        1,
        0,
        0,
        0,
        636,
        628,
        1,
        0,
        0,
        0,
        636,
        629,
        1,
        0,
        0,
        0,
        637,
        129,
        1,
        0,
        0,
        0,
        638,
        639,
        7,
        2,
        0,
        0,
        639,
        131,
        1,
        0,
        0,
        0,
        640,
        645,
        3,
        130,
        65,
        0,
        641,
        642,
        5,
        71,
        0,
        0,
        642,
        644,
        3,
        130,
        65,
        0,
        643,
        641,
        1,
        0,
        0,
        0,
        644,
        647,
        1,
        0,
        0,
        0,
        645,
        643,
        1,
        0,
        0,
        0,
        645,
        646,
        1,
        0,
        0,
        0,
        646,
        133,
        1,
        0,
        0,
        0,
        647,
        645,
        1,
        0,
        0,
        0,
        85,
        138,
        145,
        159,
        166,
        174,
        188,
        194,
        202,
        212,
        216,
        222,
        231,
        235,
        241,
        249,
        257,
        268,
        274,
        279,
        282,
        286,
        289,
        292,
        295,
        300,
        311,
        315,
        326,
        337,
        350,
        361,
        367,
        370,
        374,
        387,
        392,
        395,
        400,
        403,
        407,
        411,
        415,
        417,
        429,
        438,
        442,
        446,
        453,
        457,
        462,
        465,
        470,
        475,
        480,
        483,
        485,
        493,
        504,
        506,
        512,
        516,
        522,
        526,
        530,
        532,
        539,
        545,
        549,
        555,
        563,
        570,
        574,
        578,
        582,
        587,
        591,
        598,
        601,
        609,
        613,
        615,
        623,
        634,
        636,
        645,
    ]


class ANTLRv4Parser(Parser):

    grammarFileName = "ANTLRv4Parser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [
        "<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>",
        "'import'",
        "'fragment'",
        "'lexer'",
        "'parser'",
        "'grammar'",
        "'protected'",
        "'public'",
        "'private'",
        "'returns'",
        "'locals'",
        "'throws'",
        "'catch'",
        "'finally'",
        "'mode'",
        "':'",
        "'::'",
        "','",
        "';'",
        "'('",
        "')'",
        "'}'",
        "'->'",
        "'<'",
        "'>'",
        "'?'",
        "'*'",
        "'+='",
        "'+'",
        "'|'",
        "'$'",
        "'..'",
        "'.'",
        "'@'",
        "'#'",
        "'~'",
    ]

    symbolicNames = [
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "ACTION",
        "ARG_ACTION",
        "ARG_OR_CHARSET",
        "ASSIGN",
        "LEXER_CHAR_SET",
        "RULE_REF",
        "SEMPRED",
        "STRING_LITERAL",
        "<INVALID>",
        "TOKEN_REF",
        "UNICODE_ESC",
        "UNICODE_EXTENDED_ESC",
        "WS",
        "ALT",
        "BLOCK",
        "CLOSURE",
        "ELEMENT_OPTIONS",
        "EPSILON",
        "LEXER_ACTION_CALL",
        "LEXER_ALT_ACTION",
        "OPTIONAL",
        "POSITIVE_CLOSURE",
        "RULE",
        "RULEMODIFIERS",
        "RULES",
        "SET",
        "WILDCARD",
        "DOC_COMMENT",
        "BLOCK_COMMENT",
        "LINE_COMMENT",
        "INT",
        "UNTERMINATED_STRING_LITERAL",
        "BEGIN_ARGUMENT",
        "OPTIONS",
        "TOKENS",
        "CHANNELS",
        "IMPORT",
        "FRAGMENT",
        "LEXER",
        "PARSER",
        "GRAMMAR",
        "PROTECTED",
        "PUBLIC",
        "PRIVATE",
        "RETURNS",
        "LOCALS",
        "THROWS",
        "CATCH",
        "FINALLY",
        "MODE",
        "COLON",
        "COLONCOLON",
        "COMMA",
        "SEMI",
        "LPAREN",
        "RPAREN",
        "RBRACE",
        "RARROW",
        "LT",
        "GT",
        "QUESTION",
        "STAR",
        "PLUS_ASSIGN",
        "PLUS",
        "OR",
        "DOLLAR",
        "RANGE",
        "DOT",
        "AT",
        "POUND",
        "NOT",
        "ID",
        "END_ARGUMENT",
        "UNTERMINATED_ARGUMENT",
        "ARGUMENT_CONTENT",
        "UNTERMINATED_CHAR_SET",
    ]

    RULE_grammarSpec = 0
    RULE_grammarDecl = 1
    RULE_grammarType = 2
    RULE_prequelConstruct = 3
    RULE_optionsSpec = 4
    RULE_option = 5
    RULE_optionValue = 6
    RULE_delegateGrammars = 7
    RULE_delegateGrammar = 8
    RULE_tokensSpec = 9
    RULE_channelsSpec = 10
    RULE_idList = 11
    RULE_action_ = 12
    RULE_actionScopeName = 13
    RULE_actionBlock = 14
    RULE_argActionBlock = 15
    RULE_modeSpec = 16
    RULE_rules = 17
    RULE_ruleSpec = 18
    RULE_parserRuleSpec = 19
    RULE_exceptionGroup = 20
    RULE_exceptionHandler = 21
    RULE_finallyClause = 22
    RULE_rulePrequel = 23
    RULE_ruleReturns = 24
    RULE_throwsSpec = 25
    RULE_localsSpec = 26
    RULE_ruleAction = 27
    RULE_ruleModifiers = 28
    RULE_ruleModifier = 29
    RULE_ruleBlock = 30
    RULE_ruleAltList = 31
    RULE_labeledAlt = 32
    RULE_lexerRuleSpec = 33
    RULE_lexerRuleBlock = 34
    RULE_lexerAltList = 35
    RULE_lexerAlt = 36
    RULE_lexerElements = 37
    RULE_lexerElement = 38
    RULE_lexerBlock = 39
    RULE_lexerCommands = 40
    RULE_lexerCommand = 41
    RULE_lexerCommandName = 42
    RULE_lexerCommandExpr = 43
    RULE_altList = 44
    RULE_alternative = 45
    RULE_element = 46
    RULE_predicateOptions = 47
    RULE_predicateOption = 48
    RULE_labeledElement = 49
    RULE_ebnf = 50
    RULE_blockSuffix = 51
    RULE_ebnfSuffix = 52
    RULE_lexerAtom = 53
    RULE_atom = 54
    RULE_wildcard = 55
    RULE_notSet = 56
    RULE_blockSet = 57
    RULE_setElement = 58
    RULE_block = 59
    RULE_ruleref = 60
    RULE_characterRange = 61
    RULE_terminalDef = 62
    RULE_elementOptions = 63
    RULE_elementOption = 64
    RULE_identifier = 65
    RULE_qualifiedIdentifier = 66

    ruleNames = [
        "grammarSpec",
        "grammarDecl",
        "grammarType",
        "prequelConstruct",
        "optionsSpec",
        "option",
        "optionValue",
        "delegateGrammars",
        "delegateGrammar",
        "tokensSpec",
        "channelsSpec",
        "idList",
        "action_",
        "actionScopeName",
        "actionBlock",
        "argActionBlock",
        "modeSpec",
        "rules",
        "ruleSpec",
        "parserRuleSpec",
        "exceptionGroup",
        "exceptionHandler",
        "finallyClause",
        "rulePrequel",
        "ruleReturns",
        "throwsSpec",
        "localsSpec",
        "ruleAction",
        "ruleModifiers",
        "ruleModifier",
        "ruleBlock",
        "ruleAltList",
        "labeledAlt",
        "lexerRuleSpec",
        "lexerRuleBlock",
        "lexerAltList",
        "lexerAlt",
        "lexerElements",
        "lexerElement",
        "lexerBlock",
        "lexerCommands",
        "lexerCommand",
        "lexerCommandName",
        "lexerCommandExpr",
        "altList",
        "alternative",
        "element",
        "predicateOptions",
        "predicateOption",
        "labeledElement",
        "ebnf",
        "blockSuffix",
        "ebnfSuffix",
        "lexerAtom",
        "atom",
        "wildcard",
        "notSet",
        "blockSet",
        "setElement",
        "block",
        "ruleref",
        "characterRange",
        "terminalDef",
        "elementOptions",
        "elementOption",
        "identifier",
        "qualifiedIdentifier",
    ]

    EOF = Token.EOF
    ACTION = 4
    ARG_ACTION = 5
    ARG_OR_CHARSET = 6
    ASSIGN = 7
    LEXER_CHAR_SET = 8
    RULE_REF = 9
    SEMPRED = 10
    STRING_LITERAL = 11
    TOKEN_REF = 13
    UNICODE_ESC = 14
    UNICODE_EXTENDED_ESC = 15
    WS = 16
    ALT = 17
    BLOCK = 18
    CLOSURE = 19
    ELEMENT_OPTIONS = 20
    EPSILON = 21
    LEXER_ACTION_CALL = 22
    LEXER_ALT_ACTION = 23
    OPTIONAL = 24
    POSITIVE_CLOSURE = 25
    RULE = 26
    RULEMODIFIERS = 27
    RULES = 28
    SET = 29
    WILDCARD = 30
    DOC_COMMENT = 31
    BLOCK_COMMENT = 32
    LINE_COMMENT = 33
    INT = 34
    UNTERMINATED_STRING_LITERAL = 35
    BEGIN_ARGUMENT = 36
    OPTIONS = 37
    TOKENS = 38
    CHANNELS = 39
    IMPORT = 40
    FRAGMENT = 41
    LEXER = 42
    PARSER = 43
    GRAMMAR = 44
    PROTECTED = 45
    PUBLIC = 46
    PRIVATE = 47
    RETURNS = 48
    LOCALS = 49
    THROWS = 50
    CATCH = 51
    FINALLY = 52
    MODE = 53
    COLON = 54
    COLONCOLON = 55
    COMMA = 56
    SEMI = 57
    LPAREN = 58
    RPAREN = 59
    RBRACE = 60
    RARROW = 61
    LT = 62
    GT = 63
    QUESTION = 64
    STAR = 65
    PLUS_ASSIGN = 66
    PLUS = 67
    OR = 68
    DOLLAR = 69
    RANGE = 70
    DOT = 71
    AT = 72
    POUND = 73
    NOT = 74
    ID = 75
    END_ARGUMENT = 76
    UNTERMINATED_ARGUMENT = 77
    ARGUMENT_CONTENT = 78
    UNTERMINATED_CHAR_SET = 79

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

    class GrammarSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def grammarDecl(self):
            return self.getTypedRuleContext(ANTLRv4Parser.GrammarDeclContext, 0)

        def rules(self):
            return self.getTypedRuleContext(ANTLRv4Parser.RulesContext, 0)

        def EOF(self):
            return self.getToken(ANTLRv4Parser.EOF, 0)

        def prequelConstruct(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.PrequelConstructContext)
            else:
                return self.getTypedRuleContext(
                    ANTLRv4Parser.PrequelConstructContext, i
                )

        def modeSpec(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.ModeSpecContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.ModeSpecContext, i)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_grammarSpec

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

    def grammarSpec(self):

        localctx = ANTLRv4Parser.GrammarSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_grammarSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 134
            self.grammarDecl()
            self.state = 138
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la - 37)) & ~0x3F) == 0 and (
                (1 << (_la - 37)) & 34359738383
            ) != 0:
                self.state = 135
                self.prequelConstruct()
                self.state = 140
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 141
            self.rules()
            self.state = 145
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 53:
                self.state = 142
                self.modeSpec()
                self.state = 147
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 148
            self.match(ANTLRv4Parser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class GrammarDeclContext(ParserRuleContext):
        __slots__ = "parser"

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

        def grammarType(self):
            return self.getTypedRuleContext(ANTLRv4Parser.GrammarTypeContext, 0)

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

        def SEMI(self):
            return self.getToken(ANTLRv4Parser.SEMI, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_grammarDecl

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

    def grammarDecl(self):

        localctx = ANTLRv4Parser.GrammarDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_grammarDecl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 150
            self.grammarType()
            self.state = 151
            self.identifier()
            self.state = 152
            self.match(ANTLRv4Parser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class GrammarTypeContext(ParserRuleContext):
        __slots__ = "parser"

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

        def LEXER(self):
            return self.getToken(ANTLRv4Parser.LEXER, 0)

        def GRAMMAR(self):
            return self.getToken(ANTLRv4Parser.GRAMMAR, 0)

        def PARSER(self):
            return self.getToken(ANTLRv4Parser.PARSER, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_grammarType

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

    def grammarType(self):

        localctx = ANTLRv4Parser.GrammarTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_grammarType)
        try:
            self.state = 159
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [42]:
                self.enterOuterAlt(localctx, 1)
                self.state = 154
                self.match(ANTLRv4Parser.LEXER)
                self.state = 155
                self.match(ANTLRv4Parser.GRAMMAR)
                pass
            elif token in [43]:
                self.enterOuterAlt(localctx, 2)
                self.state = 156
                self.match(ANTLRv4Parser.PARSER)
                self.state = 157
                self.match(ANTLRv4Parser.GRAMMAR)
                pass
            elif token in [44]:
                self.enterOuterAlt(localctx, 3)
                self.state = 158
                self.match(ANTLRv4Parser.GRAMMAR)
                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 PrequelConstructContext(ParserRuleContext):
        __slots__ = "parser"

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

        def optionsSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.OptionsSpecContext, 0)

        def delegateGrammars(self):
            return self.getTypedRuleContext(ANTLRv4Parser.DelegateGrammarsContext, 0)

        def tokensSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.TokensSpecContext, 0)

        def channelsSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ChannelsSpecContext, 0)

        def action_(self):
            return self.getTypedRuleContext(ANTLRv4Parser.Action_Context, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_prequelConstruct

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

    def prequelConstruct(self):

        localctx = ANTLRv4Parser.PrequelConstructContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_prequelConstruct)
        try:
            self.state = 166
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [37]:
                self.enterOuterAlt(localctx, 1)
                self.state = 161
                self.optionsSpec()
                pass
            elif token in [40]:
                self.enterOuterAlt(localctx, 2)
                self.state = 162
                self.delegateGrammars()
                pass
            elif token in [38]:
                self.enterOuterAlt(localctx, 3)
                self.state = 163
                self.tokensSpec()
                pass
            elif token in [39]:
                self.enterOuterAlt(localctx, 4)
                self.state = 164
                self.channelsSpec()
                pass
            elif token in [72]:
                self.enterOuterAlt(localctx, 5)
                self.state = 165
                self.action_()
                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 OptionsSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def OPTIONS(self):
            return self.getToken(ANTLRv4Parser.OPTIONS, 0)

        def RBRACE(self):
            return self.getToken(ANTLRv4Parser.RBRACE, 0)

        def option(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.OptionContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.OptionContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_optionsSpec

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

    def optionsSpec(self):

        localctx = ANTLRv4Parser.OptionsSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_optionsSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 168
            self.match(ANTLRv4Parser.OPTIONS)
            self.state = 174
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 9 or _la == 13:
                self.state = 169
                self.option()
                self.state = 170
                self.match(ANTLRv4Parser.SEMI)
                self.state = 176
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 177
            self.match(ANTLRv4Parser.RBRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OptionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

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

        def optionValue(self):
            return self.getTypedRuleContext(ANTLRv4Parser.OptionValueContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_option

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

    def option(self):

        localctx = ANTLRv4Parser.OptionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_option)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 179
            self.identifier()
            self.state = 180
            self.match(ANTLRv4Parser.ASSIGN)
            self.state = 181
            self.optionValue()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OptionValueContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.IdentifierContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, i)

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

        def STRING_LITERAL(self):
            return self.getToken(ANTLRv4Parser.STRING_LITERAL, 0)

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_optionValue

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

    def optionValue(self):

        localctx = ANTLRv4Parser.OptionValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_optionValue)
        self._la = 0  # Token type
        try:
            self.state = 194
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [9, 13]:
                self.enterOuterAlt(localctx, 1)
                self.state = 183
                self.identifier()
                self.state = 188
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 71:
                    self.state = 184
                    self.match(ANTLRv4Parser.DOT)
                    self.state = 185
                    self.identifier()
                    self.state = 190
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 191
                self.match(ANTLRv4Parser.STRING_LITERAL)
                pass
            elif token in [4]:
                self.enterOuterAlt(localctx, 3)
                self.state = 192
                self.actionBlock()
                pass
            elif token in [34]:
                self.enterOuterAlt(localctx, 4)
                self.state = 193
                self.match(ANTLRv4Parser.INT)
                pass
            else:
                raise NoViableAltException(self)

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

    class DelegateGrammarsContext(ParserRuleContext):
        __slots__ = "parser"

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

        def IMPORT(self):
            return self.getToken(ANTLRv4Parser.IMPORT, 0)

        def delegateGrammar(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.DelegateGrammarContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.DelegateGrammarContext, i)

        def SEMI(self):
            return self.getToken(ANTLRv4Parser.SEMI, 0)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_delegateGrammars

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

    def delegateGrammars(self):

        localctx = ANTLRv4Parser.DelegateGrammarsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_delegateGrammars)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 196
            self.match(ANTLRv4Parser.IMPORT)
            self.state = 197
            self.delegateGrammar()
            self.state = 202
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 56:
                self.state = 198
                self.match(ANTLRv4Parser.COMMA)
                self.state = 199
                self.delegateGrammar()
                self.state = 204
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 205
            self.match(ANTLRv4Parser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class DelegateGrammarContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.IdentifierContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_delegateGrammar

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

    def delegateGrammar(self):

        localctx = ANTLRv4Parser.DelegateGrammarContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_delegateGrammar)
        try:
            self.state = 212
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 8, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 207
                self.identifier()
                self.state = 208
                self.match(ANTLRv4Parser.ASSIGN)
                self.state = 209
                self.identifier()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 211
                self.identifier()
                pass

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

    class TokensSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def TOKENS(self):
            return self.getToken(ANTLRv4Parser.TOKENS, 0)

        def RBRACE(self):
            return self.getToken(ANTLRv4Parser.RBRACE, 0)

        def idList(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdListContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_tokensSpec

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

    def tokensSpec(self):

        localctx = ANTLRv4Parser.TokensSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_tokensSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 214
            self.match(ANTLRv4Parser.TOKENS)
            self.state = 216
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 9 or _la == 13:
                self.state = 215
                self.idList()

            self.state = 218
            self.match(ANTLRv4Parser.RBRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ChannelsSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def CHANNELS(self):
            return self.getToken(ANTLRv4Parser.CHANNELS, 0)

        def RBRACE(self):
            return self.getToken(ANTLRv4Parser.RBRACE, 0)

        def idList(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdListContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_channelsSpec

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

    def channelsSpec(self):

        localctx = ANTLRv4Parser.ChannelsSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_channelsSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 220
            self.match(ANTLRv4Parser.CHANNELS)
            self.state = 222
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 9 or _la == 13:
                self.state = 221
                self.idList()

            self.state = 224
            self.match(ANTLRv4Parser.RBRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class IdListContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.IdentifierContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_idList

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

    def idList(self):

        localctx = ANTLRv4Parser.IdListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_idList)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 226
            self.identifier()
            self.state = 231
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 11, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 227
                    self.match(ANTLRv4Parser.COMMA)
                    self.state = 228
                    self.identifier()
                self.state = 233
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 11, self._ctx)

            self.state = 235
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 56:
                self.state = 234
                self.match(ANTLRv4Parser.COMMA)

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

    class Action_Context(ParserRuleContext):
        __slots__ = "parser"

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

        def AT(self):
            return self.getToken(ANTLRv4Parser.AT, 0)

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

        def actionScopeName(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionScopeNameContext, 0)

        def COLONCOLON(self):
            return self.getToken(ANTLRv4Parser.COLONCOLON, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_action_

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

    def action_(self):

        localctx = ANTLRv4Parser.Action_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_action_)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 237
            self.match(ANTLRv4Parser.AT)
            self.state = 241
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 13, self._ctx)
            if la_ == 1:
                self.state = 238
                self.actionScopeName()
                self.state = 239
                self.match(ANTLRv4Parser.COLONCOLON)

            self.state = 243
            self.identifier()
            self.state = 244
            self.actionBlock()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ActionScopeNameContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

        def LEXER(self):
            return self.getToken(ANTLRv4Parser.LEXER, 0)

        def PARSER(self):
            return self.getToken(ANTLRv4Parser.PARSER, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_actionScopeName

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

    def actionScopeName(self):

        localctx = ANTLRv4Parser.ActionScopeNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_actionScopeName)
        try:
            self.state = 249
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [9, 13]:
                self.enterOuterAlt(localctx, 1)
                self.state = 246
                self.identifier()
                pass
            elif token in [42]:
                self.enterOuterAlt(localctx, 2)
                self.state = 247
                self.match(ANTLRv4Parser.LEXER)
                pass
            elif token in [43]:
                self.enterOuterAlt(localctx, 3)
                self.state = 248
                self.match(ANTLRv4Parser.PARSER)
                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 ActionBlockContext(ParserRuleContext):
        __slots__ = "parser"

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

        def ACTION(self):
            return self.getToken(ANTLRv4Parser.ACTION, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_actionBlock

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

    def actionBlock(self):

        localctx = ANTLRv4Parser.ActionBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_actionBlock)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 251
            self.match(ANTLRv4Parser.ACTION)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ArgActionBlockContext(ParserRuleContext):
        __slots__ = "parser"

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

        def BEGIN_ARGUMENT(self):
            return self.getToken(ANTLRv4Parser.BEGIN_ARGUMENT, 0)

        def END_ARGUMENT(self):
            return self.getToken(ANTLRv4Parser.END_ARGUMENT, 0)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_argActionBlock

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

    def argActionBlock(self):

        localctx = ANTLRv4Parser.ArgActionBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_argActionBlock)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 253
            self.match(ANTLRv4Parser.BEGIN_ARGUMENT)
            self.state = 257
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 15, self._ctx)
            while _alt != 1 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1 + 1:
                    self.state = 254
                    self.match(ANTLRv4Parser.ARGUMENT_CONTENT)
                self.state = 259
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 15, self._ctx)

            self.state = 260
            self.match(ANTLRv4Parser.END_ARGUMENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ModeSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def MODE(self):
            return self.getToken(ANTLRv4Parser.MODE, 0)

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

        def SEMI(self):
            return self.getToken(ANTLRv4Parser.SEMI, 0)

        def lexerRuleSpec(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.LexerRuleSpecContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.LexerRuleSpecContext, i)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_modeSpec

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

    def modeSpec(self):

        localctx = ANTLRv4Parser.ModeSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_modeSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 262
            self.match(ANTLRv4Parser.MODE)
            self.state = 263
            self.identifier()
            self.state = 264
            self.match(ANTLRv4Parser.SEMI)
            self.state = 268
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 13 or _la == 41:
                self.state = 265
                self.lexerRuleSpec()
                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 RulesContext(ParserRuleContext):
        __slots__ = "parser"

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

        def ruleSpec(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.RuleSpecContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.RuleSpecContext, i)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_rules

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

    def rules(self):

        localctx = ANTLRv4Parser.RulesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_rules)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 274
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3F) == 0 and ((1 << _la) & 248489627886080) != 0:
                self.state = 271
                self.ruleSpec()
                self.state = 276
                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 RuleSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def parserRuleSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ParserRuleSpecContext, 0)

        def lexerRuleSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerRuleSpecContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleSpec

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

    def ruleSpec(self):

        localctx = ANTLRv4Parser.RuleSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_ruleSpec)
        try:
            self.state = 279
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 18, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 277
                self.parserRuleSpec()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 278
                self.lexerRuleSpec()
                pass

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

    class ParserRuleSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def RULE_REF(self):
            return self.getToken(ANTLRv4Parser.RULE_REF, 0)

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

        def ruleBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.RuleBlockContext, 0)

        def SEMI(self):
            return self.getToken(ANTLRv4Parser.SEMI, 0)

        def exceptionGroup(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ExceptionGroupContext, 0)

        def ruleModifiers(self):
            return self.getTypedRuleContext(ANTLRv4Parser.RuleModifiersContext, 0)

        def argActionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ArgActionBlockContext, 0)

        def ruleReturns(self):
            return self.getTypedRuleContext(ANTLRv4Parser.RuleReturnsContext, 0)

        def throwsSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ThrowsSpecContext, 0)

        def localsSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LocalsSpecContext, 0)

        def rulePrequel(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.RulePrequelContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.RulePrequelContext, i)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_parserRuleSpec

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

    def parserRuleSpec(self):

        localctx = ANTLRv4Parser.ParserRuleSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_parserRuleSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 282
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3F) == 0 and ((1 << _la) & 248489627877376) != 0:
                self.state = 281
                self.ruleModifiers()

            self.state = 284
            self.match(ANTLRv4Parser.RULE_REF)
            self.state = 286
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 36:
                self.state = 285
                self.argActionBlock()

            self.state = 289
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 48:
                self.state = 288
                self.ruleReturns()

            self.state = 292
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 50:
                self.state = 291
                self.throwsSpec()

            self.state = 295
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 49:
                self.state = 294
                self.localsSpec()

            self.state = 300
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 37 or _la == 72:
                self.state = 297
                self.rulePrequel()
                self.state = 302
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 303
            self.match(ANTLRv4Parser.COLON)
            self.state = 304
            self.ruleBlock()
            self.state = 305
            self.match(ANTLRv4Parser.SEMI)
            self.state = 306
            self.exceptionGroup()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ExceptionGroupContext(ParserRuleContext):
        __slots__ = "parser"

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

        def exceptionHandler(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.ExceptionHandlerContext)
            else:
                return self.getTypedRuleContext(
                    ANTLRv4Parser.ExceptionHandlerContext, i
                )

        def finallyClause(self):
            return self.getTypedRuleContext(ANTLRv4Parser.FinallyClauseContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_exceptionGroup

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

    def exceptionGroup(self):

        localctx = ANTLRv4Parser.ExceptionGroupContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_exceptionGroup)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 311
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 51:
                self.state = 308
                self.exceptionHandler()
                self.state = 313
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 315
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 52:
                self.state = 314
                self.finallyClause()

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

    class ExceptionHandlerContext(ParserRuleContext):
        __slots__ = "parser"

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

        def CATCH(self):
            return self.getToken(ANTLRv4Parser.CATCH, 0)

        def argActionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ArgActionBlockContext, 0)

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_exceptionHandler

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

    def exceptionHandler(self):

        localctx = ANTLRv4Parser.ExceptionHandlerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_exceptionHandler)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 317
            self.match(ANTLRv4Parser.CATCH)
            self.state = 318
            self.argActionBlock()
            self.state = 319
            self.actionBlock()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FinallyClauseContext(ParserRuleContext):
        __slots__ = "parser"

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

        def FINALLY(self):
            return self.getToken(ANTLRv4Parser.FINALLY, 0)

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_finallyClause

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

    def finallyClause(self):

        localctx = ANTLRv4Parser.FinallyClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_finallyClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 321
            self.match(ANTLRv4Parser.FINALLY)
            self.state = 322
            self.actionBlock()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RulePrequelContext(ParserRuleContext):
        __slots__ = "parser"

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

        def optionsSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.OptionsSpecContext, 0)

        def ruleAction(self):
            return self.getTypedRuleContext(ANTLRv4Parser.RuleActionContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_rulePrequel

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

    def rulePrequel(self):

        localctx = ANTLRv4Parser.RulePrequelContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_rulePrequel)
        try:
            self.state = 326
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [37]:
                self.enterOuterAlt(localctx, 1)
                self.state = 324
                self.optionsSpec()
                pass
            elif token in [72]:
                self.enterOuterAlt(localctx, 2)
                self.state = 325
                self.ruleAction()
                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 RuleReturnsContext(ParserRuleContext):
        __slots__ = "parser"

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

        def RETURNS(self):
            return self.getToken(ANTLRv4Parser.RETURNS, 0)

        def argActionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ArgActionBlockContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleReturns

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

    def ruleReturns(self):

        localctx = ANTLRv4Parser.RuleReturnsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_ruleReturns)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 328
            self.match(ANTLRv4Parser.RETURNS)
            self.state = 329
            self.argActionBlock()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ThrowsSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def THROWS(self):
            return self.getToken(ANTLRv4Parser.THROWS, 0)

        def qualifiedIdentifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(
                    ANTLRv4Parser.QualifiedIdentifierContext
                )
            else:
                return self.getTypedRuleContext(
                    ANTLRv4Parser.QualifiedIdentifierContext, i
                )

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_throwsSpec

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

    def throwsSpec(self):

        localctx = ANTLRv4Parser.ThrowsSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_throwsSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 331
            self.match(ANTLRv4Parser.THROWS)
            self.state = 332
            self.qualifiedIdentifier()
            self.state = 337
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 56:
                self.state = 333
                self.match(ANTLRv4Parser.COMMA)
                self.state = 334
                self.qualifiedIdentifier()
                self.state = 339
                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 LocalsSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def LOCALS(self):
            return self.getToken(ANTLRv4Parser.LOCALS, 0)

        def argActionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ArgActionBlockContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_localsSpec

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

    def localsSpec(self):

        localctx = ANTLRv4Parser.LocalsSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_localsSpec)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 340
            self.match(ANTLRv4Parser.LOCALS)
            self.state = 341
            self.argActionBlock()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RuleActionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def AT(self):
            return self.getToken(ANTLRv4Parser.AT, 0)

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleAction

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

    def ruleAction(self):

        localctx = ANTLRv4Parser.RuleActionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_ruleAction)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 343
            self.match(ANTLRv4Parser.AT)
            self.state = 344
            self.identifier()
            self.state = 345
            self.actionBlock()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RuleModifiersContext(ParserRuleContext):
        __slots__ = "parser"

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

        def ruleModifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.RuleModifierContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.RuleModifierContext, i)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleModifiers

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

    def ruleModifiers(self):

        localctx = ANTLRv4Parser.RuleModifiersContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_ruleModifiers)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 348
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 347
                self.ruleModifier()
                self.state = 350
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 248489627877376) != 0)):
                    break

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

    class RuleModifierContext(ParserRuleContext):
        __slots__ = "parser"

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

        def PUBLIC(self):
            return self.getToken(ANTLRv4Parser.PUBLIC, 0)

        def PRIVATE(self):
            return self.getToken(ANTLRv4Parser.PRIVATE, 0)

        def PROTECTED(self):
            return self.getToken(ANTLRv4Parser.PROTECTED, 0)

        def FRAGMENT(self):
            return self.getToken(ANTLRv4Parser.FRAGMENT, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleModifier

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

    def ruleModifier(self):

        localctx = ANTLRv4Parser.RuleModifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_ruleModifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 352
            _la = self._input.LA(1)
            if not ((((_la) & ~0x3F) == 0 and ((1 << _la) & 248489627877376) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RuleBlockContext(ParserRuleContext):
        __slots__ = "parser"

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

        def ruleAltList(self):
            return self.getTypedRuleContext(ANTLRv4Parser.RuleAltListContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleBlock

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

    def ruleBlock(self):

        localctx = ANTLRv4Parser.RuleBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_ruleBlock)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 354
            self.ruleAltList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RuleAltListContext(ParserRuleContext):
        __slots__ = "parser"

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

        def labeledAlt(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.LabeledAltContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.LabeledAltContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleAltList

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

    def ruleAltList(self):

        localctx = ANTLRv4Parser.RuleAltListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_ruleAltList)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 356
            self.labeledAlt()
            self.state = 361
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 68:
                self.state = 357
                self.match(ANTLRv4Parser.OR)
                self.state = 358
                self.labeledAlt()
                self.state = 363
                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 LabeledAltContext(ParserRuleContext):
        __slots__ = "parser"

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

        def alternative(self):
            return self.getTypedRuleContext(ANTLRv4Parser.AlternativeContext, 0)

        def POUND(self):
            return self.getToken(ANTLRv4Parser.POUND, 0)

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_labeledAlt

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

    def labeledAlt(self):

        localctx = ANTLRv4Parser.LabeledAltContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_labeledAlt)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 364
            self.alternative()
            self.state = 367
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 73:
                self.state = 365
                self.match(ANTLRv4Parser.POUND)
                self.state = 366
                self.identifier()

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

    class LexerRuleSpecContext(ParserRuleContext):
        __slots__ = "parser"

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

        def TOKEN_REF(self):
            return self.getToken(ANTLRv4Parser.TOKEN_REF, 0)

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

        def lexerRuleBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerRuleBlockContext, 0)

        def SEMI(self):
            return self.getToken(ANTLRv4Parser.SEMI, 0)

        def FRAGMENT(self):
            return self.getToken(ANTLRv4Parser.FRAGMENT, 0)

        def optionsSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.OptionsSpecContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerRuleSpec

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

    def lexerRuleSpec(self):

        localctx = ANTLRv4Parser.LexerRuleSpecContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_lexerRuleSpec)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 370
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 41:
                self.state = 369
                self.match(ANTLRv4Parser.FRAGMENT)

            self.state = 372
            self.match(ANTLRv4Parser.TOKEN_REF)
            self.state = 374
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 37:
                self.state = 373
                self.optionsSpec()

            self.state = 376
            self.match(ANTLRv4Parser.COLON)
            self.state = 377
            self.lexerRuleBlock()
            self.state = 378
            self.match(ANTLRv4Parser.SEMI)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class LexerRuleBlockContext(ParserRuleContext):
        __slots__ = "parser"

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

        def lexerAltList(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerAltListContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerRuleBlock

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

    def lexerRuleBlock(self):

        localctx = ANTLRv4Parser.LexerRuleBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_lexerRuleBlock)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 380
            self.lexerAltList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class LexerAltListContext(ParserRuleContext):
        __slots__ = "parser"

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

        def lexerAlt(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.LexerAltContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.LexerAltContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerAltList

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

    def lexerAltList(self):

        localctx = ANTLRv4Parser.LexerAltListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_lexerAltList)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 382
            self.lexerAlt()
            self.state = 387
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 68:
                self.state = 383
                self.match(ANTLRv4Parser.OR)
                self.state = 384
                self.lexerAlt()
                self.state = 389
                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 LexerAltContext(ParserRuleContext):
        __slots__ = "parser"

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

        def lexerElements(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerElementsContext, 0)

        def lexerCommands(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerCommandsContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerAlt

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

    def lexerAlt(self):

        localctx = ANTLRv4Parser.LexerAltContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_lexerAlt)
        self._la = 0  # Token type
        try:
            self.state = 395
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 36, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 390
                self.lexerElements()
                self.state = 392
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 61:
                    self.state = 391
                    self.lexerCommands()

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)

                pass

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

    class LexerElementsContext(ParserRuleContext):
        __slots__ = "parser"

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

        def lexerElement(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.LexerElementContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.LexerElementContext, i)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerElements

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

    def lexerElements(self):

        localctx = ANTLRv4Parser.LexerElementsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_lexerElements)
        self._la = 0  # Token type
        try:
            self.state = 403
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [4, 8, 11, 13, 58, 71, 74]:
                self.enterOuterAlt(localctx, 1)
                self.state = 398
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 397
                    self.lexerElement()
                    self.state = 400
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (
                        (
                            ((_la) & ~0x3F) == 0
                            and ((1 << _la) & 288230376151722256) != 0
                        )
                        or _la == 71
                        or _la == 74
                    ):
                        break

                pass
            elif token in [57, 59, 61, 68]:
                self.enterOuterAlt(localctx, 2)

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

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

        def lexerAtom(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerAtomContext, 0)

        def ebnfSuffix(self):
            return self.getTypedRuleContext(ANTLRv4Parser.EbnfSuffixContext, 0)

        def lexerBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerBlockContext, 0)

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

        def QUESTION(self):
            return self.getToken(ANTLRv4Parser.QUESTION, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerElement

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

    def lexerElement(self):

        localctx = ANTLRv4Parser.LexerElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_lexerElement)
        self._la = 0  # Token type
        try:
            self.state = 417
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [8, 11, 13, 71, 74]:
                self.enterOuterAlt(localctx, 1)
                self.state = 405
                self.lexerAtom()
                self.state = 407
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la - 64)) & ~0x3F) == 0 and ((1 << (_la - 64)) & 11) != 0:
                    self.state = 406
                    self.ebnfSuffix()

                pass
            elif token in [58]:
                self.enterOuterAlt(localctx, 2)
                self.state = 409
                self.lexerBlock()
                self.state = 411
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la - 64)) & ~0x3F) == 0 and ((1 << (_la - 64)) & 11) != 0:
                    self.state = 410
                    self.ebnfSuffix()

                pass
            elif token in [4]:
                self.enterOuterAlt(localctx, 3)
                self.state = 413
                self.actionBlock()
                self.state = 415
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 64:
                    self.state = 414
                    self.match(ANTLRv4Parser.QUESTION)

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

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

        def LPAREN(self):
            return self.getToken(ANTLRv4Parser.LPAREN, 0)

        def lexerAltList(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerAltListContext, 0)

        def RPAREN(self):
            return self.getToken(ANTLRv4Parser.RPAREN, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerBlock

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

    def lexerBlock(self):

        localctx = ANTLRv4Parser.LexerBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_lexerBlock)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 419
            self.match(ANTLRv4Parser.LPAREN)
            self.state = 420
            self.lexerAltList()
            self.state = 421
            self.match(ANTLRv4Parser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class LexerCommandsContext(ParserRuleContext):
        __slots__ = "parser"

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

        def RARROW(self):
            return self.getToken(ANTLRv4Parser.RARROW, 0)

        def lexerCommand(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.LexerCommandContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.LexerCommandContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerCommands

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

    def lexerCommands(self):

        localctx = ANTLRv4Parser.LexerCommandsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_lexerCommands)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 423
            self.match(ANTLRv4Parser.RARROW)
            self.state = 424
            self.lexerCommand()
            self.state = 429
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 56:
                self.state = 425
                self.match(ANTLRv4Parser.COMMA)
                self.state = 426
                self.lexerCommand()
                self.state = 431
                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 LexerCommandContext(ParserRuleContext):
        __slots__ = "parser"

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

        def lexerCommandName(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerCommandNameContext, 0)

        def LPAREN(self):
            return self.getToken(ANTLRv4Parser.LPAREN, 0)

        def lexerCommandExpr(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LexerCommandExprContext, 0)

        def RPAREN(self):
            return self.getToken(ANTLRv4Parser.RPAREN, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerCommand

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

    def lexerCommand(self):

        localctx = ANTLRv4Parser.LexerCommandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_lexerCommand)
        try:
            self.state = 438
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 44, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 432
                self.lexerCommandName()
                self.state = 433
                self.match(ANTLRv4Parser.LPAREN)
                self.state = 434
                self.lexerCommandExpr()
                self.state = 435
                self.match(ANTLRv4Parser.RPAREN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 437
                self.lexerCommandName()
                pass

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

    class LexerCommandNameContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

        def MODE(self):
            return self.getToken(ANTLRv4Parser.MODE, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerCommandName

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

    def lexerCommandName(self):

        localctx = ANTLRv4Parser.LexerCommandNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_lexerCommandName)
        try:
            self.state = 442
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [9, 13]:
                self.enterOuterAlt(localctx, 1)
                self.state = 440
                self.identifier()
                pass
            elif token in [53]:
                self.enterOuterAlt(localctx, 2)
                self.state = 441
                self.match(ANTLRv4Parser.MODE)
                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 LexerCommandExprContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerCommandExpr

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

    def lexerCommandExpr(self):

        localctx = ANTLRv4Parser.LexerCommandExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_lexerCommandExpr)
        try:
            self.state = 446
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [9, 13]:
                self.enterOuterAlt(localctx, 1)
                self.state = 444
                self.identifier()
                pass
            elif token in [34]:
                self.enterOuterAlt(localctx, 2)
                self.state = 445
                self.match(ANTLRv4Parser.INT)
                pass
            else:
                raise NoViableAltException(self)

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

    class AltListContext(ParserRuleContext):
        __slots__ = "parser"

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

        def alternative(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.AlternativeContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.AlternativeContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_altList

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

    def altList(self):

        localctx = ANTLRv4Parser.AltListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_altList)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 448
            self.alternative()
            self.state = 453
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 68:
                self.state = 449
                self.match(ANTLRv4Parser.OR)
                self.state = 450
                self.alternative()
                self.state = 455
                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 AlternativeContext(ParserRuleContext):
        __slots__ = "parser"

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

        def elementOptions(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ElementOptionsContext, 0)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_alternative

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

    def alternative(self):

        localctx = ANTLRv4Parser.AlternativeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_alternative)
        self._la = 0  # Token type
        try:
            self.state = 465
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [4, 9, 11, 13, 58, 62, 71, 74]:
                self.enterOuterAlt(localctx, 1)
                self.state = 457
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 62:
                    self.state = 456
                    self.elementOptions()

                self.state = 460
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 459
                    self.element()
                    self.state = 462
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (
                        (
                            ((_la) & ~0x3F) == 0
                            and ((1 << _la) & 288230376151722512) != 0
                        )
                        or _la == 71
                        or _la == 74
                    ):
                        break

                pass
            elif token in [57, 59, 68, 73]:
                self.enterOuterAlt(localctx, 2)

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

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

        def labeledElement(self):
            return self.getTypedRuleContext(ANTLRv4Parser.LabeledElementContext, 0)

        def ebnfSuffix(self):
            return self.getTypedRuleContext(ANTLRv4Parser.EbnfSuffixContext, 0)

        def atom(self):
            return self.getTypedRuleContext(ANTLRv4Parser.AtomContext, 0)

        def ebnf(self):
            return self.getTypedRuleContext(ANTLRv4Parser.EbnfContext, 0)

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

        def QUESTION(self):
            return self.getToken(ANTLRv4Parser.QUESTION, 0)

        def predicateOptions(self):
            return self.getTypedRuleContext(ANTLRv4Parser.PredicateOptionsContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_element

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

    def element(self):

        localctx = ANTLRv4Parser.ElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_element)
        self._la = 0  # Token type
        try:
            self.state = 485
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 55, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 467
                self.labeledElement()
                self.state = 470
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [64, 65, 67]:
                    self.state = 468
                    self.ebnfSuffix()
                    pass
                elif token in [4, 9, 11, 13, 57, 58, 59, 68, 71, 73, 74]:
                    pass
                else:
                    raise NoViableAltException(self)

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 472
                self.atom()
                self.state = 475
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [64, 65, 67]:
                    self.state = 473
                    self.ebnfSuffix()
                    pass
                elif token in [4, 9, 11, 13, 57, 58, 59, 68, 71, 73, 74]:
                    pass
                else:
                    raise NoViableAltException(self)

                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 477
                self.ebnf()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 478
                self.actionBlock()
                self.state = 480
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 64:
                    self.state = 479
                    self.match(ANTLRv4Parser.QUESTION)

                self.state = 483
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 62:
                    self.state = 482
                    self.predicateOptions()

                pass

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

    class PredicateOptionsContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def predicateOption(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.PredicateOptionContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.PredicateOptionContext, i)

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

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_predicateOptions

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

    def predicateOptions(self):

        localctx = ANTLRv4Parser.PredicateOptionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_predicateOptions)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 487
            self.match(ANTLRv4Parser.LT)
            self.state = 488
            self.predicateOption()
            self.state = 493
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 56:
                self.state = 489
                self.match(ANTLRv4Parser.COMMA)
                self.state = 490
                self.predicateOption()
                self.state = 495
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 496
            self.match(ANTLRv4Parser.GT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class PredicateOptionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def elementOption(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ElementOptionContext, 0)

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

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

        def actionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ActionBlockContext, 0)

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

        def STRING_LITERAL(self):
            return self.getToken(ANTLRv4Parser.STRING_LITERAL, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_predicateOption

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

    def predicateOption(self):

        localctx = ANTLRv4Parser.PredicateOptionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_predicateOption)
        try:
            self.state = 506
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 58, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 498
                self.elementOption()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 499
                self.identifier()
                self.state = 500
                self.match(ANTLRv4Parser.ASSIGN)
                self.state = 504
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [4]:
                    self.state = 501
                    self.actionBlock()
                    pass
                elif token in [34]:
                    self.state = 502
                    self.match(ANTLRv4Parser.INT)
                    pass
                elif token in [11]:
                    self.state = 503
                    self.match(ANTLRv4Parser.STRING_LITERAL)
                    pass
                else:
                    raise NoViableAltException(self)

                pass

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

    class LabeledElementContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

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

        def PLUS_ASSIGN(self):
            return self.getToken(ANTLRv4Parser.PLUS_ASSIGN, 0)

        def atom(self):
            return self.getTypedRuleContext(ANTLRv4Parser.AtomContext, 0)

        def block(self):
            return self.getTypedRuleContext(ANTLRv4Parser.BlockContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_labeledElement

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

    def labeledElement(self):

        localctx = ANTLRv4Parser.LabeledElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_labeledElement)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 508
            self.identifier()
            self.state = 509
            _la = self._input.LA(1)
            if not (_la == 7 or _la == 66):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 512
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [9, 11, 13, 71, 74]:
                self.state = 510
                self.atom()
                pass
            elif token in [58]:
                self.state = 511
                self.block()
                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 EbnfContext(ParserRuleContext):
        __slots__ = "parser"

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

        def block(self):
            return self.getTypedRuleContext(ANTLRv4Parser.BlockContext, 0)

        def blockSuffix(self):
            return self.getTypedRuleContext(ANTLRv4Parser.BlockSuffixContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ebnf

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

    def ebnf(self):

        localctx = ANTLRv4Parser.EbnfContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_ebnf)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 514
            self.block()
            self.state = 516
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la - 64)) & ~0x3F) == 0 and ((1 << (_la - 64)) & 11) != 0:
                self.state = 515
                self.blockSuffix()

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

    class BlockSuffixContext(ParserRuleContext):
        __slots__ = "parser"

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

        def ebnfSuffix(self):
            return self.getTypedRuleContext(ANTLRv4Parser.EbnfSuffixContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_blockSuffix

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

    def blockSuffix(self):

        localctx = ANTLRv4Parser.BlockSuffixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_blockSuffix)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 518
            self.ebnfSuffix()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class EbnfSuffixContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def STAR(self):
            return self.getToken(ANTLRv4Parser.STAR, 0)

        def PLUS(self):
            return self.getToken(ANTLRv4Parser.PLUS, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ebnfSuffix

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

    def ebnfSuffix(self):

        localctx = ANTLRv4Parser.EbnfSuffixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_ebnfSuffix)
        self._la = 0  # Token type
        try:
            self.state = 532
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [64]:
                self.enterOuterAlt(localctx, 1)
                self.state = 520
                self.match(ANTLRv4Parser.QUESTION)
                self.state = 522
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 64:
                    self.state = 521
                    self.match(ANTLRv4Parser.QUESTION)

                pass
            elif token in [65]:
                self.enterOuterAlt(localctx, 2)
                self.state = 524
                self.match(ANTLRv4Parser.STAR)
                self.state = 526
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 64:
                    self.state = 525
                    self.match(ANTLRv4Parser.QUESTION)

                pass
            elif token in [67]:
                self.enterOuterAlt(localctx, 3)
                self.state = 528
                self.match(ANTLRv4Parser.PLUS)
                self.state = 530
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 64:
                    self.state = 529
                    self.match(ANTLRv4Parser.QUESTION)

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

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

        def characterRange(self):
            return self.getTypedRuleContext(ANTLRv4Parser.CharacterRangeContext, 0)

        def terminalDef(self):
            return self.getTypedRuleContext(ANTLRv4Parser.TerminalDefContext, 0)

        def notSet(self):
            return self.getTypedRuleContext(ANTLRv4Parser.NotSetContext, 0)

        def LEXER_CHAR_SET(self):
            return self.getToken(ANTLRv4Parser.LEXER_CHAR_SET, 0)

        def wildcard(self):
            return self.getTypedRuleContext(ANTLRv4Parser.WildcardContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_lexerAtom

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

    def lexerAtom(self):

        localctx = ANTLRv4Parser.LexerAtomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_lexerAtom)
        try:
            self.state = 539
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 65, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 534
                self.characterRange()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 535
                self.terminalDef()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 536
                self.notSet()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 537
                self.match(ANTLRv4Parser.LEXER_CHAR_SET)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 538
                self.wildcard()
                pass

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

    class AtomContext(ParserRuleContext):
        __slots__ = "parser"

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

        def terminalDef(self):
            return self.getTypedRuleContext(ANTLRv4Parser.TerminalDefContext, 0)

        def ruleref(self):
            return self.getTypedRuleContext(ANTLRv4Parser.RulerefContext, 0)

        def notSet(self):
            return self.getTypedRuleContext(ANTLRv4Parser.NotSetContext, 0)

        def wildcard(self):
            return self.getTypedRuleContext(ANTLRv4Parser.WildcardContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_atom

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

    def atom(self):

        localctx = ANTLRv4Parser.AtomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_atom)
        try:
            self.state = 545
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [11, 13]:
                self.enterOuterAlt(localctx, 1)
                self.state = 541
                self.terminalDef()
                pass
            elif token in [9]:
                self.enterOuterAlt(localctx, 2)
                self.state = 542
                self.ruleref()
                pass
            elif token in [74]:
                self.enterOuterAlt(localctx, 3)
                self.state = 543
                self.notSet()
                pass
            elif token in [71]:
                self.enterOuterAlt(localctx, 4)
                self.state = 544
                self.wildcard()
                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 WildcardContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def elementOptions(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ElementOptionsContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_wildcard

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

    def wildcard(self):

        localctx = ANTLRv4Parser.WildcardContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_wildcard)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 547
            self.match(ANTLRv4Parser.DOT)
            self.state = 549
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 62:
                self.state = 548
                self.elementOptions()

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

    class NotSetContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def setElement(self):
            return self.getTypedRuleContext(ANTLRv4Parser.SetElementContext, 0)

        def blockSet(self):
            return self.getTypedRuleContext(ANTLRv4Parser.BlockSetContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_notSet

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

    def notSet(self):

        localctx = ANTLRv4Parser.NotSetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_notSet)
        try:
            self.state = 555
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 68, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 551
                self.match(ANTLRv4Parser.NOT)
                self.state = 552
                self.setElement()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 553
                self.match(ANTLRv4Parser.NOT)
                self.state = 554
                self.blockSet()
                pass

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

    class BlockSetContext(ParserRuleContext):
        __slots__ = "parser"

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

        def LPAREN(self):
            return self.getToken(ANTLRv4Parser.LPAREN, 0)

        def setElement(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.SetElementContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.SetElementContext, i)

        def RPAREN(self):
            return self.getToken(ANTLRv4Parser.RPAREN, 0)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_blockSet

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

    def blockSet(self):

        localctx = ANTLRv4Parser.BlockSetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_blockSet)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 557
            self.match(ANTLRv4Parser.LPAREN)
            self.state = 558
            self.setElement()
            self.state = 563
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 68:
                self.state = 559
                self.match(ANTLRv4Parser.OR)
                self.state = 560
                self.setElement()
                self.state = 565
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 566
            self.match(ANTLRv4Parser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class SetElementContext(ParserRuleContext):
        __slots__ = "parser"

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

        def TOKEN_REF(self):
            return self.getToken(ANTLRv4Parser.TOKEN_REF, 0)

        def elementOptions(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ElementOptionsContext, 0)

        def STRING_LITERAL(self):
            return self.getToken(ANTLRv4Parser.STRING_LITERAL, 0)

        def characterRange(self):
            return self.getTypedRuleContext(ANTLRv4Parser.CharacterRangeContext, 0)

        def LEXER_CHAR_SET(self):
            return self.getToken(ANTLRv4Parser.LEXER_CHAR_SET, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_setElement

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

    def setElement(self):

        localctx = ANTLRv4Parser.SetElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_setElement)
        self._la = 0  # Token type
        try:
            self.state = 578
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 72, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 568
                self.match(ANTLRv4Parser.TOKEN_REF)
                self.state = 570
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 62:
                    self.state = 569
                    self.elementOptions()

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 572
                self.match(ANTLRv4Parser.STRING_LITERAL)
                self.state = 574
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 62:
                    self.state = 573
                    self.elementOptions()

                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 576
                self.characterRange()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 577
                self.match(ANTLRv4Parser.LEXER_CHAR_SET)
                pass

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

    class BlockContext(ParserRuleContext):
        __slots__ = "parser"

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

        def LPAREN(self):
            return self.getToken(ANTLRv4Parser.LPAREN, 0)

        def altList(self):
            return self.getTypedRuleContext(ANTLRv4Parser.AltListContext, 0)

        def RPAREN(self):
            return self.getToken(ANTLRv4Parser.RPAREN, 0)

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

        def optionsSpec(self):
            return self.getTypedRuleContext(ANTLRv4Parser.OptionsSpecContext, 0)

        def ruleAction(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.RuleActionContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.RuleActionContext, i)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_block

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

    def block(self):

        localctx = ANTLRv4Parser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_block)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 580
            self.match(ANTLRv4Parser.LPAREN)
            self.state = 591
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la - 37)) & ~0x3F) == 0 and ((1 << (_la - 37)) & 34359869441) != 0:
                self.state = 582
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 37:
                    self.state = 581
                    self.optionsSpec()

                self.state = 587
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == 72:
                    self.state = 584
                    self.ruleAction()
                    self.state = 589
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 590
                self.match(ANTLRv4Parser.COLON)

            self.state = 593
            self.altList()
            self.state = 594
            self.match(ANTLRv4Parser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RulerefContext(ParserRuleContext):
        __slots__ = "parser"

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

        def RULE_REF(self):
            return self.getToken(ANTLRv4Parser.RULE_REF, 0)

        def argActionBlock(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ArgActionBlockContext, 0)

        def elementOptions(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ElementOptionsContext, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_ruleref

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

    def ruleref(self):

        localctx = ANTLRv4Parser.RulerefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_ruleref)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 596
            self.match(ANTLRv4Parser.RULE_REF)
            self.state = 598
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 36:
                self.state = 597
                self.argActionBlock()

            self.state = 601
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == 62:
                self.state = 600
                self.elementOptions()

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

    class CharacterRangeContext(ParserRuleContext):
        __slots__ = "parser"

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

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

        def RANGE(self):
            return self.getToken(ANTLRv4Parser.RANGE, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_characterRange

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

    def characterRange(self):

        localctx = ANTLRv4Parser.CharacterRangeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_characterRange)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 603
            self.match(ANTLRv4Parser.STRING_LITERAL)
            self.state = 604
            self.match(ANTLRv4Parser.RANGE)
            self.state = 605
            self.match(ANTLRv4Parser.STRING_LITERAL)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TerminalDefContext(ParserRuleContext):
        __slots__ = "parser"

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

        def TOKEN_REF(self):
            return self.getToken(ANTLRv4Parser.TOKEN_REF, 0)

        def elementOptions(self):
            return self.getTypedRuleContext(ANTLRv4Parser.ElementOptionsContext, 0)

        def STRING_LITERAL(self):
            return self.getToken(ANTLRv4Parser.STRING_LITERAL, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_terminalDef

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

    def terminalDef(self):

        localctx = ANTLRv4Parser.TerminalDefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_terminalDef)
        self._la = 0  # Token type
        try:
            self.state = 615
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [13]:
                self.enterOuterAlt(localctx, 1)
                self.state = 607
                self.match(ANTLRv4Parser.TOKEN_REF)
                self.state = 609
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 62:
                    self.state = 608
                    self.elementOptions()

                pass
            elif token in [11]:
                self.enterOuterAlt(localctx, 2)
                self.state = 611
                self.match(ANTLRv4Parser.STRING_LITERAL)
                self.state = 613
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == 62:
                    self.state = 612
                    self.elementOptions()

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

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

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

        def elementOption(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.ElementOptionContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.ElementOptionContext, i)

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

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_elementOptions

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

    def elementOptions(self):

        localctx = ANTLRv4Parser.ElementOptionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_elementOptions)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 617
            self.match(ANTLRv4Parser.LT)
            self.state = 618
            self.elementOption()
            self.state = 623
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 56:
                self.state = 619
                self.match(ANTLRv4Parser.COMMA)
                self.state = 620
                self.elementOption()
                self.state = 625
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 626
            self.match(ANTLRv4Parser.GT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ElementOptionContext(ParserRuleContext):
        __slots__ = "parser"

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

        def qualifiedIdentifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.QualifiedIdentifierContext, 0)

        def identifier(self):
            return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, 0)

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

        def STRING_LITERAL(self):
            return self.getToken(ANTLRv4Parser.STRING_LITERAL, 0)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_elementOption

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

    def elementOption(self):

        localctx = ANTLRv4Parser.ElementOptionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_elementOption)
        try:
            self.state = 636
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 83, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 628
                self.qualifiedIdentifier()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 629
                self.identifier()
                self.state = 630
                self.match(ANTLRv4Parser.ASSIGN)
                self.state = 634
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [9, 13]:
                    self.state = 631
                    self.qualifiedIdentifier()
                    pass
                elif token in [11]:
                    self.state = 632
                    self.match(ANTLRv4Parser.STRING_LITERAL)
                    pass
                elif token in [34]:
                    self.state = 633
                    self.match(ANTLRv4Parser.INT)
                    pass
                else:
                    raise NoViableAltException(self)

                pass

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

    class IdentifierContext(ParserRuleContext):
        __slots__ = "parser"

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

        def RULE_REF(self):
            return self.getToken(ANTLRv4Parser.RULE_REF, 0)

        def TOKEN_REF(self):
            return self.getToken(ANTLRv4Parser.TOKEN_REF, 0)

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_identifier

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

    def identifier(self):

        localctx = ANTLRv4Parser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_identifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 638
            _la = self._input.LA(1)
            if not (_la == 9 or _la == 13):
                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 QualifiedIdentifierContext(ParserRuleContext):
        __slots__ = "parser"

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

        def identifier(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(ANTLRv4Parser.IdentifierContext)
            else:
                return self.getTypedRuleContext(ANTLRv4Parser.IdentifierContext, i)

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

        def getRuleIndex(self):
            return ANTLRv4Parser.RULE_qualifiedIdentifier

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

    def qualifiedIdentifier(self):

        localctx = ANTLRv4Parser.QualifiedIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_qualifiedIdentifier)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 640
            self.identifier()
            self.state = 645
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == 71:
                self.state = 641
                self.match(ANTLRv4Parser.DOT)
                self.state = 642
                self.identifier()
                self.state = 647
                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
