# Generated from BOCL.g4 by ANTLR 4.13.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO

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

class BOCLParser ( Parser ):

    grammarFileName = "BOCL.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'*'", "'context'", "'inv'", "'pre'", 
                     "'post'", "'self'", "'forAll'", "'exists'", "'select'", 
                     "'collect'", "'OclAny'", "'OclVoid'", "<INVALID>", 
                     "'..'", "'::'", "'('", "')'", "'{'", "'}'", "';'", 
                     "':'", "','", "'.'", "'='", "'''", "'Boolean'", "'Integer'", 
                     "'Real'", "'String'", "'if'", "'then'", "'else'", "'endif'", 
                     "'and'", "'or'", "'not'", "'<>'", "'<'", "'<='", "'>'", 
                     "'>='", "'|'", "<INVALID>", "'Bag'", "'Sequence'", 
                     "'OrderedSet'", "'-'", "'+'", "'/'", "' '", "'xor'", 
                     "'implies'", "'oclAsType'", "'oclIsTypeOf'", "'oclIsKindOf'", 
                     "'allInstances'", "'isEmpty'", "'sum'", "'size'", "'includes'", 
                     "'excludes'", "'subSequence'", "'subOrderedSet'", "'prepend'", 
                     "'last'", "'append'", "'symmetricDifference'", "'first'", 
                     "'derive'", "'body'", "'init'", "'union'", "'null'", 
                     "'let'", "'in'", "<INVALID>", "'def'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "CONTEXT", "INV", "PRE", 
                      "POST", "SELF", "FORALL", "EXISTS", "SELECT", "COLLECT", 
                      "OCLANY", "OCLVOID", "WS", "DoubleDots", "DoubleCOLON", 
                      "LPAREN", "RPAREN", "LBRACE", "RBRACE", "SEMI", "COLON", 
                      "COMMA", "DOT", "EQUAL", "SingleQuote", "BOOLEAN_TYPE", 
                      "INTEGER_TYPE", "REAL_TYPE", "STRING_TYPE", "IF", 
                      "THEN", "ELSE", "ENDIF", "AND", "OR", "NOT", "NOTEQUAL", 
                      "LT", "LE", "GT", "GE", "PIPE", "SET", "BAG", "SEQUENCE", 
                      "ORDEREDSET", "MINUS", "PLUS", "Divide", "EMPTYSTRING", 
                      "XOR", "IMPLIES", "OCLASTYPE", "OCLISTYPEOF", "OCLISKINDOF", 
                      "ALLINSTANCES", "ISEMPTY", "SUM", "SIZE", "INCLUDES", 
                      "EXCLUDES", "SUBSEQUENCE", "SUBORDEREDSET", "PREPEND", 
                      "LAST", "APPEND", "SYMMETRICDIFFERENCE", "FIRST", 
                      "DERIVE", "BODY", "Init", "UNION", "NULL", "LET", 
                      "IN", "Arrow", "Def", "ID", "NUMBER", "STRING_LITERAL", 
                      "BOOLEAN_LITERAL", "COMMENT", "LINE_COMMENT" ]

    RULE_oclFile = 0
    RULE_contextDeclaration = 1
    RULE_constraint = 2
    RULE_functionCall = 3
    RULE_type = 4
    RULE_collectionType = 5
    RULE_userDefinedType = 6
    RULE_expression = 7
    RULE_endExpression = 8
    RULE_binaryFunctionCall = 9
    RULE_binaryExpression = 10
    RULE_unaryExpression = 11
    RULE_operator = 12
    RULE_numberORUserDefined = 13
    RULE_primaryExpression = 14
    RULE_literal = 15

    ruleNames =  [ "oclFile", "contextDeclaration", "constraint", "functionCall", 
                   "type", "collectionType", "userDefinedType", "expression", 
                   "endExpression", "binaryFunctionCall", "binaryExpression", 
                   "unaryExpression", "operator", "numberORUserDefined", 
                   "primaryExpression", "literal" ]

    EOF = Token.EOF
    T__0=1
    CONTEXT=2
    INV=3
    PRE=4
    POST=5
    SELF=6
    FORALL=7
    EXISTS=8
    SELECT=9
    COLLECT=10
    OCLANY=11
    OCLVOID=12
    WS=13
    DoubleDots=14
    DoubleCOLON=15
    LPAREN=16
    RPAREN=17
    LBRACE=18
    RBRACE=19
    SEMI=20
    COLON=21
    COMMA=22
    DOT=23
    EQUAL=24
    SingleQuote=25
    BOOLEAN_TYPE=26
    INTEGER_TYPE=27
    REAL_TYPE=28
    STRING_TYPE=29
    IF=30
    THEN=31
    ELSE=32
    ENDIF=33
    AND=34
    OR=35
    NOT=36
    NOTEQUAL=37
    LT=38
    LE=39
    GT=40
    GE=41
    PIPE=42
    SET=43
    BAG=44
    SEQUENCE=45
    ORDEREDSET=46
    MINUS=47
    PLUS=48
    Divide=49
    EMPTYSTRING=50
    XOR=51
    IMPLIES=52
    OCLASTYPE=53
    OCLISTYPEOF=54
    OCLISKINDOF=55
    ALLINSTANCES=56
    ISEMPTY=57
    SUM=58
    SIZE=59
    INCLUDES=60
    EXCLUDES=61
    SUBSEQUENCE=62
    SUBORDEREDSET=63
    PREPEND=64
    LAST=65
    APPEND=66
    SYMMETRICDIFFERENCE=67
    FIRST=68
    DERIVE=69
    BODY=70
    Init=71
    UNION=72
    NULL=73
    LET=74
    IN=75
    Arrow=76
    Def=77
    ID=78
    NUMBER=79
    STRING_LITERAL=80
    BOOLEAN_LITERAL=81
    COMMENT=82
    LINE_COMMENT=83

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




    class OclFileContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def contextDeclaration(self):
            return self.getTypedRuleContext(BOCLParser.ContextDeclarationContext,0)


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


        def getRuleIndex(self):
            return BOCLParser.RULE_oclFile

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

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




    def oclFile(self):

        localctx = BOCLParser.OclFileContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_oclFile)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 32
            self.contextDeclaration()
            self.state = 36
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -1071861110375594046) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 505) != 0):
                self.state = 33
                self.expression()
                self.state = 38
                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 ContextDeclarationContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return BOCLParser.RULE_contextDeclaration

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



    class ContextExpContext(ContextDeclarationContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BOCLParser.ContextDeclarationContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def CONTEXT(self):
            return self.getToken(BOCLParser.CONTEXT, 0)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def COLON(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.COLON)
            else:
                return self.getToken(BOCLParser.COLON, i)
        def type_(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.TypeContext)
            else:
                return self.getTypedRuleContext(BOCLParser.TypeContext,i)

        def LBRACE(self):
            return self.getToken(BOCLParser.LBRACE, 0)
        def constraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ConstraintContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ConstraintContext,i)

        def RBRACE(self):
            return self.getToken(BOCLParser.RBRACE, 0)
        def DoubleCOLON(self):
            return self.getToken(BOCLParser.DoubleCOLON, 0)
        def functionCall(self):
            return self.getTypedRuleContext(BOCLParser.FunctionCallContext,0)

        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)

        def DERIVE(self):
            return self.getToken(BOCLParser.DERIVE, 0)
        def BODY(self):
            return self.getToken(BOCLParser.BODY, 0)
        def Init(self):
            return self.getToken(BOCLParser.Init, 0)
        def PRE(self):
            return self.getToken(BOCLParser.PRE, 0)
        def POST(self):
            return self.getToken(BOCLParser.POST, 0)
        def Def(self):
            return self.getToken(BOCLParser.Def, 0)

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

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



    def contextDeclaration(self):

        localctx = BOCLParser.ContextDeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_contextDeclaration)
        self._la = 0 # Token type
        try:
            localctx = BOCLParser.ContextExpContext(self, localctx)
            self.enterOuterAlt(localctx, 1)
            self.state = 39
            self.match(BOCLParser.CONTEXT)
            self.state = 40
            self.match(BOCLParser.ID)
            self.state = 43
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,1,self._ctx)
            if la_ == 1:
                self.state = 41
                self.match(BOCLParser.COLON)
                self.state = 42
                self.type_()


            self.state = 46
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 45
                self.match(BOCLParser.LBRACE)


            self.state = 51
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,3,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 48
                    self.constraint() 
                self.state = 53
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,3,self._ctx)

            self.state = 55
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19:
                self.state = 54
                self.match(BOCLParser.RBRACE)


            self.state = 58
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,5,self._ctx)
            if la_ == 1:
                self.state = 57
                self.match(BOCLParser.DoubleCOLON)


            self.state = 61
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.state = 60
                self.functionCall()


            self.state = 64
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
            if la_ == 1:
                self.state = 63
                self.match(BOCLParser.COLON)


            self.state = 67
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.state = 66
                self.type_()


            self.state = 70
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,9,self._ctx)
            if la_ == 1:
                self.state = 69
                self.match(BOCLParser.LPAREN)


            self.state = 73
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.state = 72
                self.match(BOCLParser.ID)


            self.state = 76
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==17:
                self.state = 75
                self.match(BOCLParser.RPAREN)


            self.state = 79
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,12,self._ctx)
            if la_ == 1:
                self.state = 78
                self.match(BOCLParser.COLON)


            self.state = 82
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,13,self._ctx)
            if la_ == 1:
                self.state = 81
                _la = self._input.LA(1)
                if not(_la==4 or _la==5 or ((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & 263) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 85
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==21:
                self.state = 84
                self.match(BOCLParser.COLON)


            self.state = 88
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,15,self._ctx)
            if la_ == 1:
                self.state = 87
                self.expression()


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


    class ConstraintContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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


        def INV(self):
            return self.getToken(BOCLParser.INV, 0)

        def PRE(self):
            return self.getToken(BOCLParser.PRE, 0)

        def POST(self):
            return self.getToken(BOCLParser.POST, 0)

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

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

        def getRuleIndex(self):
            return BOCLParser.RULE_constraint

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

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




    def constraint(self):

        localctx = BOCLParser.ConstraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_constraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 90
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 56) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 92
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==78:
                self.state = 91
                self.match(BOCLParser.ID)


            self.state = 94
            self.match(BOCLParser.COLON)
            self.state = 95
            self.expression()
            self.state = 97
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==20:
                self.state = 96
                self.match(BOCLParser.SEMI)


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


    class FunctionCallContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

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


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

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

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

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

        def getRuleIndex(self):
            return BOCLParser.RULE_functionCall

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

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




    def functionCall(self):

        localctx = BOCLParser.FunctionCallContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_functionCall)
        self._la = 0 # Token type
        try:
            self.state = 139
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,25,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 99
                self.match(BOCLParser.ID)
                self.state = 100
                self.match(BOCLParser.LPAREN)
                self.state = 113
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -1071861110375594046) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 505) != 0):
                    self.state = 102
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,18,self._ctx)
                    if la_ == 1:
                        self.state = 101
                        self.match(BOCLParser.SingleQuote)


                    self.state = 104
                    self.expression()
                    self.state = 106
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                    if la_ == 1:
                        self.state = 105
                        self.match(BOCLParser.SingleQuote)


                    self.state = 109
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==22:
                        self.state = 108
                        self.match(BOCLParser.COMMA)


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

                self.state = 116
                self.match(BOCLParser.RPAREN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 117
                self.match(BOCLParser.ID)
                self.state = 118
                self.match(BOCLParser.LPAREN)
                self.state = 124
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==78:
                    self.state = 119
                    self.match(BOCLParser.ID)
                    self.state = 120
                    self.match(BOCLParser.COLON)
                    self.state = 121
                    self.match(BOCLParser.ID)
                    self.state = 126
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 127
                self.match(BOCLParser.RPAREN)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 128
                self.match(BOCLParser.LPAREN)
                self.state = 135
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==79:
                    self.state = 129
                    self.match(BOCLParser.NUMBER)
                    self.state = 131
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==22:
                        self.state = 130
                        self.match(BOCLParser.COMMA)


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

                self.state = 138
                self.match(BOCLParser.RPAREN)
                pass


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


    class TypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BOOLEAN_TYPE(self):
            return self.getToken(BOCLParser.BOOLEAN_TYPE, 0)

        def INTEGER_TYPE(self):
            return self.getToken(BOCLParser.INTEGER_TYPE, 0)

        def REAL_TYPE(self):
            return self.getToken(BOCLParser.REAL_TYPE, 0)

        def STRING_TYPE(self):
            return self.getToken(BOCLParser.STRING_TYPE, 0)

        def OCLANY(self):
            return self.getToken(BOCLParser.OCLANY, 0)

        def OCLVOID(self):
            return self.getToken(BOCLParser.OCLVOID, 0)

        def collectionType(self):
            return self.getTypedRuleContext(BOCLParser.CollectionTypeContext,0)


        def userDefinedType(self):
            return self.getTypedRuleContext(BOCLParser.UserDefinedTypeContext,0)


        def SET(self):
            return self.getToken(BOCLParser.SET, 0)

        def getRuleIndex(self):
            return BOCLParser.RULE_type

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

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




    def type_(self):

        localctx = BOCLParser.TypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_type)
        try:
            self.state = 150
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,26,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 141
                self.match(BOCLParser.BOOLEAN_TYPE)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 142
                self.match(BOCLParser.INTEGER_TYPE)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 143
                self.match(BOCLParser.REAL_TYPE)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 144
                self.match(BOCLParser.STRING_TYPE)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 145
                self.match(BOCLParser.OCLANY)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 146
                self.match(BOCLParser.OCLVOID)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 147
                self.collectionType()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 148
                self.userDefinedType()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 149
                self.match(BOCLParser.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 CollectionTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SET(self):
            return self.getToken(BOCLParser.SET, 0)

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

        def type_(self):
            return self.getTypedRuleContext(BOCLParser.TypeContext,0)


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

        def BAG(self):
            return self.getToken(BOCLParser.BAG, 0)

        def SEQUENCE(self):
            return self.getToken(BOCLParser.SEQUENCE, 0)

        def ORDEREDSET(self):
            return self.getToken(BOCLParser.ORDEREDSET, 0)

        def getRuleIndex(self):
            return BOCLParser.RULE_collectionType

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

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




    def collectionType(self):

        localctx = BOCLParser.CollectionTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_collectionType)
        try:
            self.state = 172
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [43]:
                self.enterOuterAlt(localctx, 1)
                self.state = 152
                self.match(BOCLParser.SET)
                self.state = 153
                self.match(BOCLParser.LT)
                self.state = 154
                self.type_()
                self.state = 155
                self.match(BOCLParser.GT)
                pass
            elif token in [44]:
                self.enterOuterAlt(localctx, 2)
                self.state = 157
                self.match(BOCLParser.BAG)
                self.state = 158
                self.match(BOCLParser.LT)
                self.state = 159
                self.type_()
                self.state = 160
                self.match(BOCLParser.GT)
                pass
            elif token in [45]:
                self.enterOuterAlt(localctx, 3)
                self.state = 162
                self.match(BOCLParser.SEQUENCE)
                self.state = 163
                self.match(BOCLParser.LT)
                self.state = 164
                self.type_()
                self.state = 165
                self.match(BOCLParser.GT)
                pass
            elif token in [46]:
                self.enterOuterAlt(localctx, 4)
                self.state = 167
                self.match(BOCLParser.ORDEREDSET)
                self.state = 168
                self.match(BOCLParser.LT)
                self.state = 169
                self.type_()
                self.state = 170
                self.match(BOCLParser.GT)
                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 UserDefinedTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def getRuleIndex(self):
            return BOCLParser.RULE_userDefinedType

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

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




    def userDefinedType(self):

        localctx = BOCLParser.UserDefinedTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_userDefinedType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 174
            self.match(BOCLParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return BOCLParser.RULE_expression

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



    class ElseExpContext(ExpressionContext):

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

        def ELSE(self):
            return self.getToken(BOCLParser.ELSE, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class ArrowexpContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class COLLECTIONContext(ExpressionContext):

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

        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def PIPE(self):
            return self.getToken(BOCLParser.PIPE, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)

        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def FORALL(self):
            return self.getToken(BOCLParser.FORALL, 0)
        def EXISTS(self):
            return self.getToken(BOCLParser.EXISTS, 0)
        def SELECT(self):
            return self.getToken(BOCLParser.SELECT, 0)
        def COLLECT(self):
            return self.getToken(BOCLParser.COLLECT, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def endExpression(self):
            return self.getTypedRuleContext(BOCLParser.EndExpressionContext,0)

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

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

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


    class SETContext(ExpressionContext):

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

        def SET(self):
            return self.getToken(BOCLParser.SET, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def LBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LBRACE)
            else:
                return self.getToken(BOCLParser.LBRACE, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

        def RBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RBRACE)
            else:
                return self.getToken(BOCLParser.RBRACE, i)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def SingleQuote(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.SingleQuote)
            else:
                return self.getToken(BOCLParser.SingleQuote, i)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.COMMA)
            else:
                return self.getToken(BOCLParser.COMMA, i)

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

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


    class DefIDAssignmentexpressionContext(ExpressionContext):

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

        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def COLON(self):
            return self.getToken(BOCLParser.COLON, 0)
        def EQUAL(self):
            return self.getToken(BOCLParser.EQUAL, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class PredefinedfunctionCallContext(ExpressionContext):

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

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class UnaryContext(ExpressionContext):

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

        def unaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.UnaryExpressionContext,0)

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


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

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


    class INCLUDESContext(ExpressionContext):

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

        def INCLUDES(self):
            return self.getToken(BOCLParser.INCLUDES, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)

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

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


    class ThenExpContext(ExpressionContext):

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

        def THEN(self):
            return self.getToken(BOCLParser.THEN, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class SUBORDEREDSETContext(ExpressionContext):

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

        def SUBORDEREDSET(self):
            return self.getToken(BOCLParser.SUBORDEREDSET, 0)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def LBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LBRACE)
            else:
                return self.getToken(BOCLParser.LBRACE, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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


    class PrimaryExpContext(ExpressionContext):

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

        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def primaryExpression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.PrimaryExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,i)

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def operator(self):
            return self.getTypedRuleContext(BOCLParser.OperatorContext,0)

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


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

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


    class OCLISKINDOFContext(ExpressionContext):

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

        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def OCLISKINDOF(self):
            return self.getToken(BOCLParser.OCLISKINDOF, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def type_(self):
            return self.getTypedRuleContext(BOCLParser.TypeContext,0)

        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class NumberContext(ExpressionContext):

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

        def NUMBER(self):
            return self.getToken(BOCLParser.NUMBER, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class DoubleCOLONsContext(ExpressionContext):

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

        def DoubleCOLON(self):
            return self.getToken(BOCLParser.DoubleCOLON, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)

        def AND(self):
            return self.getToken(BOCLParser.AND, 0)
        def OR(self):
            return self.getToken(BOCLParser.OR, 0)
        def ID(self):
            return self.getToken(BOCLParser.ID, 0)

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

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


    class SYMMETRICDIFFERENCEContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def SYMMETRICDIFFERENCE(self):
            return self.getToken(BOCLParser.SYMMETRICDIFFERENCE, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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


    class SEQUENCEContext(ExpressionContext):

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

        def SEQUENCE(self):
            return self.getToken(BOCLParser.SEQUENCE, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def LBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LBRACE)
            else:
                return self.getToken(BOCLParser.LBRACE, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

        def RBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RBRACE)
            else:
                return self.getToken(BOCLParser.RBRACE, i)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def SingleQuote(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.SingleQuote)
            else:
                return self.getToken(BOCLParser.SingleQuote, i)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.COMMA)
            else:
                return self.getToken(BOCLParser.COMMA, i)

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

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


    class ORDEREDSETContext(ExpressionContext):

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

        def ORDEREDSET(self):
            return self.getToken(BOCLParser.ORDEREDSET, 0)
        def LBRACE(self):
            return self.getToken(BOCLParser.LBRACE, 0)
        def RBRACE(self):
            return self.getToken(BOCLParser.RBRACE, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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


    class DoubleDotsContext(ExpressionContext):

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

        def DoubleDots(self):
            return self.getToken(BOCLParser.DoubleDots, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class EXCLUDESContext(ExpressionContext):

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

        def EXCLUDES(self):
            return self.getToken(BOCLParser.EXCLUDES, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)

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

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


    class DERIVEContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def DERIVE(self):
            return self.getToken(BOCLParser.DERIVE, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class IDContext(ExpressionContext):

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

        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

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


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

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


    class ALLINSTANCESContext(ExpressionContext):

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

        def ALLINSTANCES(self):
            return self.getToken(BOCLParser.ALLINSTANCES, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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


    class OpContext(ExpressionContext):

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

        def operator(self):
            return self.getTypedRuleContext(BOCLParser.OperatorContext,0)

        def numberORUserDefined(self):
            return self.getTypedRuleContext(BOCLParser.NumberORUserDefinedContext,0)


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

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


    class SUBSEQUENCEContext(ExpressionContext):

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

        def SUBSEQUENCE(self):
            return self.getToken(BOCLParser.SUBSEQUENCE, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def LBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LBRACE)
            else:
                return self.getToken(BOCLParser.LBRACE, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def RBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RBRACE)
            else:
                return self.getToken(BOCLParser.RBRACE, i)
        def SingleQuote(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.SingleQuote)
            else:
                return self.getToken(BOCLParser.SingleQuote, i)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.COMMA)
            else:
                return self.getToken(BOCLParser.COMMA, i)

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

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


    class SIZEContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def SIZE(self):
            return self.getToken(BOCLParser.SIZE, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def binaryFunctionCall(self):
            return self.getTypedRuleContext(BOCLParser.BinaryFunctionCallContext,0)

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


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

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


    class SingleQuoteExpContext(ExpressionContext):

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

        def SingleQuote(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.SingleQuote)
            else:
                return self.getToken(BOCLParser.SingleQuote, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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


    class BAGContext(ExpressionContext):

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

        def BAG(self):
            return self.getToken(BOCLParser.BAG, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def LBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LBRACE)
            else:
                return self.getToken(BOCLParser.LBRACE, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

        def RBRACE(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RBRACE)
            else:
                return self.getToken(BOCLParser.RBRACE, i)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def SingleQuote(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.SingleQuote)
            else:
                return self.getToken(BOCLParser.SingleQuote, i)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.COMMA)
            else:
                return self.getToken(BOCLParser.COMMA, i)

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

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


    class OCLISTYPEOFContext(ExpressionContext):

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

        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def OCLISTYPEOF(self):
            return self.getToken(BOCLParser.OCLISTYPEOF, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def type_(self):
            return self.getTypedRuleContext(BOCLParser.TypeContext,0)

        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class SUMContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def SUM(self):
            return self.getToken(BOCLParser.SUM, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def binaryFunctionCall(self):
            return self.getTypedRuleContext(BOCLParser.BinaryFunctionCallContext,0)

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


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

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


    class FIRSTContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def FIRST(self):
            return self.getToken(BOCLParser.FIRST, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class APPENDContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def APPEND(self):
            return self.getToken(BOCLParser.APPEND, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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


    class OCLASTYPEContext(ExpressionContext):

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

        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def OCLASTYPE(self):
            return self.getToken(BOCLParser.OCLASTYPE, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def type_(self):
            return self.getTypedRuleContext(BOCLParser.TypeContext,0)

        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class CollectionExpressionVariableContext(ExpressionContext):

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

        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)

        def RPAREN(self):
            return self.getToken(BOCLParser.RPAREN, 0)
        def FORALL(self):
            return self.getToken(BOCLParser.FORALL, 0)
        def EXISTS(self):
            return self.getToken(BOCLParser.EXISTS, 0)
        def SELECT(self):
            return self.getToken(BOCLParser.SELECT, 0)
        def COLLECT(self):
            return self.getToken(BOCLParser.COLLECT, 0)
        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def endExpression(self):
            return self.getTypedRuleContext(BOCLParser.EndExpressionContext,0)


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

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


    class LASTContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def LAST(self):
            return self.getToken(BOCLParser.LAST, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class BinaryContext(ExpressionContext):

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

        def binaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.BinaryExpressionContext,0)

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

        def AND(self):
            return self.getToken(BOCLParser.AND, 0)
        def OR(self):
            return self.getToken(BOCLParser.OR, 0)

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

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


    class IfExpContext(ExpressionContext):

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

        def IF(self):
            return self.getToken(BOCLParser.IF, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class EndIfExpContext(ExpressionContext):

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

        def ENDIF(self):
            return self.getToken(BOCLParser.ENDIF, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class ISEMPTYContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def ISEMPTY(self):
            return self.getToken(BOCLParser.ISEMPTY, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.RPAREN)
            else:
                return self.getToken(BOCLParser.RPAREN, i)
        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class DefExpContext(ExpressionContext):

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

        def Def(self):
            return self.getToken(BOCLParser.Def, 0)
        def COLON(self):
            return self.getToken(BOCLParser.COLON, 0)
        def expression(self):
            return self.getTypedRuleContext(BOCLParser.ExpressionContext,0)


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

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


    class FuncCallContext(ExpressionContext):

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

        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)

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

        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.DOT)
            else:
                return self.getToken(BOCLParser.DOT, i)
        def ID(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.ID)
            else:
                return self.getToken(BOCLParser.ID, i)
        def operator(self):
            return self.getTypedRuleContext(BOCLParser.OperatorContext,0)

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


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

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


    class UNIONContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def UNION(self):
            return self.getToken(BOCLParser.UNION, 0)
        def LPAREN(self):
            return self.getToken(BOCLParser.LPAREN, 0)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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


    class PREPENDContext(ExpressionContext):

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

        def Arrow(self):
            return self.getToken(BOCLParser.Arrow, 0)
        def PREPEND(self):
            return self.getToken(BOCLParser.PREPEND, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(BOCLParser.LPAREN)
            else:
                return self.getToken(BOCLParser.LPAREN, i)
        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.ExpressionContext,i)

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

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

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



    def expression(self):

        localctx = BOCLParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_expression)
        self._la = 0 # Token type
        try:
            self.state = 908
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,175,self._ctx)
            if la_ == 1:
                localctx = BOCLParser.BinaryContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 177
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==34 or _la==35:
                    self.state = 176
                    _la = self._input.LA(1)
                    if not(_la==34 or _la==35):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()


                self.state = 179
                self.binaryExpression()
                self.state = 181
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,29,self._ctx)
                if la_ == 1:
                    self.state = 180
                    self.expression()


                pass

            elif la_ == 2:
                localctx = BOCLParser.UnaryContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 183
                self.unaryExpression()
                self.state = 185
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,30,self._ctx)
                if la_ == 1:
                    self.state = 184
                    self.expression()


                pass

            elif la_ == 3:
                localctx = BOCLParser.IfExpContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 187
                self.match(BOCLParser.IF)
                self.state = 188
                self.expression()
                pass

            elif la_ == 4:
                localctx = BOCLParser.ThenExpContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 189
                self.match(BOCLParser.THEN)
                self.state = 190
                self.expression()
                pass

            elif la_ == 5:
                localctx = BOCLParser.ElseExpContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 191
                self.match(BOCLParser.ELSE)
                self.state = 192
                self.expression()
                pass

            elif la_ == 6:
                localctx = BOCLParser.EndIfExpContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 193
                self.match(BOCLParser.ENDIF)
                self.state = 195
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,31,self._ctx)
                if la_ == 1:
                    self.state = 194
                    self.expression()


                pass

            elif la_ == 7:
                localctx = BOCLParser.OCLISTYPEOFContext(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 197
                self.primaryExpression()
                self.state = 202
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,32,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 198
                        self.match(BOCLParser.DOT)
                        self.state = 199
                        self.match(BOCLParser.ID) 
                    self.state = 204
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,32,self._ctx)

                self.state = 205
                self.match(BOCLParser.DOT)
                self.state = 206
                self.match(BOCLParser.OCLISTYPEOF)
                self.state = 207
                self.match(BOCLParser.LPAREN)
                self.state = 208
                self.type_()
                self.state = 209
                self.match(BOCLParser.RPAREN)
                self.state = 211
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,33,self._ctx)
                if la_ == 1:
                    self.state = 210
                    self.expression()


                pass

            elif la_ == 8:
                localctx = BOCLParser.OCLASTYPEContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 213
                self.primaryExpression()
                self.state = 218
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,34,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 214
                        self.match(BOCLParser.DOT)
                        self.state = 215
                        self.match(BOCLParser.ID) 
                    self.state = 220
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,34,self._ctx)

                self.state = 221
                self.match(BOCLParser.DOT)
                self.state = 222
                self.match(BOCLParser.OCLASTYPE)
                self.state = 223
                self.match(BOCLParser.LPAREN)
                self.state = 224
                self.type_()
                self.state = 225
                self.match(BOCLParser.RPAREN)
                self.state = 227
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,35,self._ctx)
                if la_ == 1:
                    self.state = 226
                    self.expression()


                pass

            elif la_ == 9:
                localctx = BOCLParser.OCLISKINDOFContext(self, localctx)
                self.enterOuterAlt(localctx, 9)
                self.state = 229
                self.primaryExpression()
                self.state = 234
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,36,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 230
                        self.match(BOCLParser.DOT)
                        self.state = 231
                        self.match(BOCLParser.ID) 
                    self.state = 236
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,36,self._ctx)

                self.state = 237
                self.match(BOCLParser.DOT)
                self.state = 238
                self.match(BOCLParser.OCLISKINDOF)
                self.state = 239
                self.match(BOCLParser.LPAREN)
                self.state = 240
                self.type_()
                self.state = 241
                self.match(BOCLParser.RPAREN)
                self.state = 243
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,37,self._ctx)
                if la_ == 1:
                    self.state = 242
                    self.expression()


                pass

            elif la_ == 10:
                localctx = BOCLParser.ISEMPTYContext(self, localctx)
                self.enterOuterAlt(localctx, 10)
                self.state = 246
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==6 or _la==16 or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 481) != 0):
                    self.state = 245
                    self.primaryExpression()


                self.state = 252
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==23:
                    self.state = 248
                    self.match(BOCLParser.DOT)
                    self.state = 249
                    self.match(BOCLParser.ID)
                    self.state = 254
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 255
                self.match(BOCLParser.Arrow)
                self.state = 256
                self.match(BOCLParser.ISEMPTY)
                self.state = 257
                self.match(BOCLParser.LPAREN)
                self.state = 258
                self.match(BOCLParser.RPAREN)
                self.state = 260
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,40,self._ctx)
                if la_ == 1:
                    self.state = 259
                    self.expression()


                self.state = 265
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,41,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 262
                        self.match(BOCLParser.RPAREN) 
                    self.state = 267
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,41,self._ctx)

                pass

            elif la_ == 11:
                localctx = BOCLParser.SUMContext(self, localctx)
                self.enterOuterAlt(localctx, 11)
                self.state = 269
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==6 or _la==16 or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 481) != 0):
                    self.state = 268
                    self.primaryExpression()


                self.state = 275
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==23:
                    self.state = 271
                    self.match(BOCLParser.DOT)
                    self.state = 272
                    self.match(BOCLParser.ID)
                    self.state = 277
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 278
                self.match(BOCLParser.Arrow)
                self.state = 279
                self.match(BOCLParser.SUM)
                self.state = 280
                self.match(BOCLParser.LPAREN)
                self.state = 281
                self.match(BOCLParser.RPAREN)
                self.state = 283
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,44,self._ctx)
                if la_ == 1:
                    self.state = 282
                    self.binaryFunctionCall()


                self.state = 286
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,45,self._ctx)
                if la_ == 1:
                    self.state = 285
                    self.expression()


                self.state = 291
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,46,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 288
                        self.match(BOCLParser.RPAREN) 
                    self.state = 293
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,46,self._ctx)

                pass

            elif la_ == 12:
                localctx = BOCLParser.SIZEContext(self, localctx)
                self.enterOuterAlt(localctx, 12)
                self.state = 295
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==6 or _la==16 or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 481) != 0):
                    self.state = 294
                    self.primaryExpression()


                self.state = 301
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==23:
                    self.state = 297
                    self.match(BOCLParser.DOT)
                    self.state = 298
                    self.match(BOCLParser.ID)
                    self.state = 303
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 304
                self.match(BOCLParser.Arrow)
                self.state = 305
                self.match(BOCLParser.SIZE)
                self.state = 306
                self.match(BOCLParser.LPAREN)
                self.state = 307
                self.match(BOCLParser.RPAREN)
                self.state = 309
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,49,self._ctx)
                if la_ == 1:
                    self.state = 308
                    self.binaryFunctionCall()


                self.state = 312
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,50,self._ctx)
                if la_ == 1:
                    self.state = 311
                    self.expression()


                self.state = 317
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,51,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 314
                        self.match(BOCLParser.RPAREN) 
                    self.state = 319
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,51,self._ctx)

                pass

            elif la_ == 13:
                localctx = BOCLParser.INCLUDESContext(self, localctx)
                self.enterOuterAlt(localctx, 13)
                self.state = 321
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 320
                    self.match(BOCLParser.Arrow)


                self.state = 323
                self.match(BOCLParser.INCLUDES)
                self.state = 324
                self.match(BOCLParser.LPAREN)
                self.state = 325
                self.expression()
                self.state = 326
                self.match(BOCLParser.RPAREN)
                self.state = 328
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,53,self._ctx)
                if la_ == 1:
                    self.state = 327
                    self.expression()


                self.state = 333
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,54,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 330
                        self.match(BOCLParser.RPAREN) 
                    self.state = 335
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,54,self._ctx)

                pass

            elif la_ == 14:
                localctx = BOCLParser.EXCLUDESContext(self, localctx)
                self.enterOuterAlt(localctx, 14)
                self.state = 337
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 336
                    self.match(BOCLParser.Arrow)


                self.state = 339
                self.match(BOCLParser.EXCLUDES)
                self.state = 340
                self.match(BOCLParser.LPAREN)
                self.state = 341
                self.expression()
                self.state = 342
                self.match(BOCLParser.RPAREN)
                self.state = 344
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,56,self._ctx)
                if la_ == 1:
                    self.state = 343
                    self.expression()


                self.state = 349
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,57,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 346
                        self.match(BOCLParser.RPAREN) 
                    self.state = 351
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,57,self._ctx)

                pass

            elif la_ == 15:
                localctx = BOCLParser.SEQUENCEContext(self, localctx)
                self.enterOuterAlt(localctx, 15)
                self.state = 353
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 352
                    self.match(BOCLParser.Arrow)


                self.state = 358
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==16:
                    self.state = 355
                    self.match(BOCLParser.LPAREN)
                    self.state = 360
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 361
                self.match(BOCLParser.SEQUENCE)
                self.state = 365
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==18:
                    self.state = 362
                    self.match(BOCLParser.LBRACE)
                    self.state = 367
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 371
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,61,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 368
                        self.match(BOCLParser.LPAREN) 
                    self.state = 373
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,61,self._ctx)

                self.state = 386
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,65,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 375
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,62,self._ctx)
                        if la_ == 1:
                            self.state = 374
                            self.match(BOCLParser.SingleQuote)


                        self.state = 377
                        self.expression()
                        self.state = 379
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,63,self._ctx)
                        if la_ == 1:
                            self.state = 378
                            self.match(BOCLParser.SingleQuote)


                        self.state = 382
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,64,self._ctx)
                        if la_ == 1:
                            self.state = 381
                            self.match(BOCLParser.COMMA)

                 
                    self.state = 388
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,65,self._ctx)

                self.state = 392
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,66,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 389
                        self.match(BOCLParser.RBRACE) 
                    self.state = 394
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,66,self._ctx)

                self.state = 398
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,67,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 395
                        self.match(BOCLParser.RPAREN) 
                    self.state = 400
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,67,self._ctx)

                self.state = 402
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,68,self._ctx)
                if la_ == 1:
                    self.state = 401
                    self.expression()


                pass

            elif la_ == 16:
                localctx = BOCLParser.SUBSEQUENCEContext(self, localctx)
                self.enterOuterAlt(localctx, 16)
                self.state = 405
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 404
                    self.match(BOCLParser.Arrow)


                self.state = 410
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==16:
                    self.state = 407
                    self.match(BOCLParser.LPAREN)
                    self.state = 412
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 413
                self.match(BOCLParser.SUBSEQUENCE)
                self.state = 417
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==18:
                    self.state = 414
                    self.match(BOCLParser.LBRACE)
                    self.state = 419
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 423
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,72,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 420
                        self.match(BOCLParser.LPAREN) 
                    self.state = 425
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,72,self._ctx)

                self.state = 438
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,76,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 427
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,73,self._ctx)
                        if la_ == 1:
                            self.state = 426
                            self.match(BOCLParser.SingleQuote)


                        self.state = 429
                        self.expression()
                        self.state = 431
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,74,self._ctx)
                        if la_ == 1:
                            self.state = 430
                            self.match(BOCLParser.SingleQuote)


                        self.state = 434
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,75,self._ctx)
                        if la_ == 1:
                            self.state = 433
                            self.match(BOCLParser.COMMA)

                 
                    self.state = 440
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,76,self._ctx)

                self.state = 444
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,77,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 441
                        self.match(BOCLParser.RPAREN) 
                    self.state = 446
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,77,self._ctx)

                self.state = 450
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,78,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 447
                        self.match(BOCLParser.RBRACE) 
                    self.state = 452
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,78,self._ctx)

                self.state = 454
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,79,self._ctx)
                if la_ == 1:
                    self.state = 453
                    self.expression()


                pass

            elif la_ == 17:
                localctx = BOCLParser.ALLINSTANCESContext(self, localctx)
                self.enterOuterAlt(localctx, 17)
                self.state = 457
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 456
                    self.match(BOCLParser.Arrow)


                self.state = 459
                self.match(BOCLParser.ALLINSTANCES)
                self.state = 461 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 460
                        self.match(BOCLParser.LPAREN)

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

                self.state = 466
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1071861110375594046) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 505) != 0):
                    self.state = 465
                    self.expression()


                self.state = 469 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 468
                        self.match(BOCLParser.RPAREN)

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

                self.state = 474
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,84,self._ctx)
                if la_ == 1:
                    self.state = 473
                    self.expression()


                pass

            elif la_ == 18:
                localctx = BOCLParser.ORDEREDSETContext(self, localctx)
                self.enterOuterAlt(localctx, 18)
                self.state = 477
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 476
                    self.match(BOCLParser.Arrow)


                self.state = 482
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==16:
                    self.state = 479
                    self.match(BOCLParser.LPAREN)
                    self.state = 484
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 485
                self.match(BOCLParser.ORDEREDSET)
                self.state = 486
                self.match(BOCLParser.LBRACE)
                self.state = 499
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -1071861110375594046) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 505) != 0):
                    self.state = 488
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,87,self._ctx)
                    if la_ == 1:
                        self.state = 487
                        self.match(BOCLParser.SingleQuote)


                    self.state = 490
                    self.expression()
                    self.state = 492
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,88,self._ctx)
                    if la_ == 1:
                        self.state = 491
                        self.match(BOCLParser.SingleQuote)


                    self.state = 495
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==22:
                        self.state = 494
                        self.match(BOCLParser.COMMA)


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

                self.state = 502
                self.match(BOCLParser.RBRACE)
                self.state = 506
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,91,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 503
                        self.match(BOCLParser.RPAREN) 
                    self.state = 508
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,91,self._ctx)

                self.state = 510
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,92,self._ctx)
                if la_ == 1:
                    self.state = 509
                    self.expression()


                pass

            elif la_ == 19:
                localctx = BOCLParser.SUBORDEREDSETContext(self, localctx)
                self.enterOuterAlt(localctx, 19)
                self.state = 513
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 512
                    self.match(BOCLParser.Arrow)


                self.state = 518
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==16:
                    self.state = 515
                    self.match(BOCLParser.LPAREN)
                    self.state = 520
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 521
                self.match(BOCLParser.SUBORDEREDSET)
                self.state = 525
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==18:
                    self.state = 522
                    self.match(BOCLParser.LBRACE)
                    self.state = 527
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 531
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,96,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 528
                        self.match(BOCLParser.LPAREN) 
                    self.state = 533
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,96,self._ctx)

                self.state = 546
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,100,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 535
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,97,self._ctx)
                        if la_ == 1:
                            self.state = 534
                            self.match(BOCLParser.SingleQuote)


                        self.state = 537
                        self.expression()
                        self.state = 539
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,98,self._ctx)
                        if la_ == 1:
                            self.state = 538
                            self.match(BOCLParser.SingleQuote)


                        self.state = 542
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==22:
                            self.state = 541
                            self.match(BOCLParser.COMMA)

                 
                    self.state = 548
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,100,self._ctx)

                self.state = 552
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==19:
                    self.state = 549
                    self.match(BOCLParser.RBRACE)
                    self.state = 554
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 558
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,102,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 555
                        self.match(BOCLParser.RPAREN) 
                    self.state = 560
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,102,self._ctx)

                self.state = 562
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1071861110375594046) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 505) != 0):
                    self.state = 561
                    self.expression()


                self.state = 564
                self.match(BOCLParser.RPAREN)
                pass

            elif la_ == 20:
                localctx = BOCLParser.SETContext(self, localctx)
                self.enterOuterAlt(localctx, 20)
                self.state = 566
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 565
                    self.match(BOCLParser.Arrow)


                self.state = 571
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==16:
                    self.state = 568
                    self.match(BOCLParser.LPAREN)
                    self.state = 573
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 574
                self.match(BOCLParser.SET)
                self.state = 578
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,106,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 575
                        self.match(BOCLParser.LPAREN) 
                    self.state = 580
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,106,self._ctx)

                self.state = 584
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==18:
                    self.state = 581
                    self.match(BOCLParser.LBRACE)
                    self.state = 586
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 599
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,111,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 588
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,108,self._ctx)
                        if la_ == 1:
                            self.state = 587
                            self.match(BOCLParser.SingleQuote)


                        self.state = 590
                        self.expression()
                        self.state = 592
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,109,self._ctx)
                        if la_ == 1:
                            self.state = 591
                            self.match(BOCLParser.SingleQuote)


                        self.state = 595
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,110,self._ctx)
                        if la_ == 1:
                            self.state = 594
                            self.match(BOCLParser.COMMA)

                 
                    self.state = 601
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,111,self._ctx)

                self.state = 605
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,112,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 602
                        self.match(BOCLParser.RBRACE) 
                    self.state = 607
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,112,self._ctx)

                self.state = 611
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,113,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 608
                        self.match(BOCLParser.RPAREN) 
                    self.state = 613
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,113,self._ctx)

                self.state = 615
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,114,self._ctx)
                if la_ == 1:
                    self.state = 614
                    self.expression()


                pass

            elif la_ == 21:
                localctx = BOCLParser.BAGContext(self, localctx)
                self.enterOuterAlt(localctx, 21)
                self.state = 618
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 617
                    self.match(BOCLParser.Arrow)


                self.state = 623
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==16:
                    self.state = 620
                    self.match(BOCLParser.LPAREN)
                    self.state = 625
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 626
                self.match(BOCLParser.BAG)
                self.state = 630
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,117,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 627
                        self.match(BOCLParser.LPAREN) 
                    self.state = 632
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,117,self._ctx)

                self.state = 636
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==18:
                    self.state = 633
                    self.match(BOCLParser.LBRACE)
                    self.state = 638
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 651
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,122,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 640
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,119,self._ctx)
                        if la_ == 1:
                            self.state = 639
                            self.match(BOCLParser.SingleQuote)


                        self.state = 642
                        self.expression()
                        self.state = 644
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,120,self._ctx)
                        if la_ == 1:
                            self.state = 643
                            self.match(BOCLParser.SingleQuote)


                        self.state = 647
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,121,self._ctx)
                        if la_ == 1:
                            self.state = 646
                            self.match(BOCLParser.COMMA)

                 
                    self.state = 653
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,122,self._ctx)

                self.state = 657
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,123,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 654
                        self.match(BOCLParser.RBRACE) 
                    self.state = 659
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,123,self._ctx)

                self.state = 663
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,124,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 660
                        self.match(BOCLParser.RPAREN) 
                    self.state = 665
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,124,self._ctx)

                self.state = 667
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,125,self._ctx)
                if la_ == 1:
                    self.state = 666
                    self.expression()


                pass

            elif la_ == 22:
                localctx = BOCLParser.PREPENDContext(self, localctx)
                self.enterOuterAlt(localctx, 22)
                self.state = 669
                self.match(BOCLParser.Arrow)
                self.state = 670
                self.match(BOCLParser.PREPEND)
                self.state = 672 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 671
                        self.match(BOCLParser.LPAREN)

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

                self.state = 688
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -1071861110375594046) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 505) != 0):
                    self.state = 677
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,127,self._ctx)
                    if la_ == 1:
                        self.state = 676
                        self.match(BOCLParser.SingleQuote)


                    self.state = 679
                    self.expression()
                    self.state = 681
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,128,self._ctx)
                    if la_ == 1:
                        self.state = 680
                        self.match(BOCLParser.SingleQuote)


                    self.state = 684
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==22:
                        self.state = 683
                        self.match(BOCLParser.COMMA)


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

                self.state = 692 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 691
                        self.match(BOCLParser.RPAREN)

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

                self.state = 697
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,132,self._ctx)
                if la_ == 1:
                    self.state = 696
                    self.expression()


                pass

            elif la_ == 23:
                localctx = BOCLParser.LASTContext(self, localctx)
                self.enterOuterAlt(localctx, 23)
                self.state = 699
                self.match(BOCLParser.Arrow)
                self.state = 700
                self.match(BOCLParser.LAST)
                self.state = 701
                self.match(BOCLParser.LPAREN)
                self.state = 703 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 702
                        self.match(BOCLParser.RPAREN)

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

                self.state = 708
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,134,self._ctx)
                if la_ == 1:
                    self.state = 707
                    self.expression()


                pass

            elif la_ == 24:
                localctx = BOCLParser.APPENDContext(self, localctx)
                self.enterOuterAlt(localctx, 24)
                self.state = 710
                self.match(BOCLParser.Arrow)
                self.state = 711
                self.match(BOCLParser.APPEND)
                self.state = 712
                self.match(BOCLParser.LPAREN)
                self.state = 725
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -1071861110375594046) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 505) != 0):
                    self.state = 714
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,135,self._ctx)
                    if la_ == 1:
                        self.state = 713
                        self.match(BOCLParser.SingleQuote)


                    self.state = 716
                    self.expression()
                    self.state = 718
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,136,self._ctx)
                    if la_ == 1:
                        self.state = 717
                        self.match(BOCLParser.SingleQuote)


                    self.state = 721
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==22:
                        self.state = 720
                        self.match(BOCLParser.COMMA)


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

                self.state = 729 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 728
                        self.match(BOCLParser.RPAREN)

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

                self.state = 734
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,140,self._ctx)
                if la_ == 1:
                    self.state = 733
                    self.expression()


                pass

            elif la_ == 25:
                localctx = BOCLParser.COLLECTIONContext(self, localctx)
                self.enterOuterAlt(localctx, 25)
                self.state = 737
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 736
                    self.match(BOCLParser.Arrow)


                self.state = 739
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 1920) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 740
                self.match(BOCLParser.LPAREN)
                self.state = 749 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 741
                    self.match(BOCLParser.ID)
                    self.state = 744
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==21:
                        self.state = 742
                        self.match(BOCLParser.COLON)
                        self.state = 743
                        self.match(BOCLParser.ID)


                    self.state = 747
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==22:
                        self.state = 746
                        self.match(BOCLParser.COMMA)


                    self.state = 751 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==78):
                        break

                self.state = 753
                self.match(BOCLParser.PIPE)
                self.state = 754
                self.expression()
                self.state = 755
                self.match(BOCLParser.RPAREN)
                self.state = 757
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,145,self._ctx)
                if la_ == 1:
                    self.state = 756
                    self.endExpression()


                pass

            elif la_ == 26:
                localctx = BOCLParser.CollectionExpressionVariableContext(self, localctx)
                self.enterOuterAlt(localctx, 26)
                self.state = 760
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 759
                    self.match(BOCLParser.Arrow)


                self.state = 762
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 1920) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 763
                self.match(BOCLParser.LPAREN)
                self.state = 764
                self.expression()
                self.state = 765
                self.match(BOCLParser.RPAREN)
                self.state = 767
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,147,self._ctx)
                if la_ == 1:
                    self.state = 766
                    self.endExpression()


                pass

            elif la_ == 27:
                localctx = BOCLParser.SYMMETRICDIFFERENCEContext(self, localctx)
                self.enterOuterAlt(localctx, 27)
                self.state = 769
                self.match(BOCLParser.Arrow)
                self.state = 770
                self.match(BOCLParser.SYMMETRICDIFFERENCE)
                self.state = 771
                self.match(BOCLParser.LPAREN)
                self.state = 772
                self.expression()
                self.state = 774 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 773
                        self.match(BOCLParser.RPAREN)

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

                self.state = 779
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,149,self._ctx)
                if la_ == 1:
                    self.state = 778
                    self.expression()


                pass

            elif la_ == 28:
                localctx = BOCLParser.FIRSTContext(self, localctx)
                self.enterOuterAlt(localctx, 28)
                self.state = 781
                self.match(BOCLParser.Arrow)
                self.state = 782
                self.match(BOCLParser.FIRST)
                self.state = 783
                self.match(BOCLParser.LPAREN)
                self.state = 784
                self.match(BOCLParser.RPAREN)
                self.state = 786
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,150,self._ctx)
                if la_ == 1:
                    self.state = 785
                    self.expression()


                pass

            elif la_ == 29:
                localctx = BOCLParser.DERIVEContext(self, localctx)
                self.enterOuterAlt(localctx, 29)
                self.state = 788
                self.match(BOCLParser.Arrow)
                self.state = 789
                self.match(BOCLParser.DERIVE)
                self.state = 790
                self.match(BOCLParser.LPAREN)
                self.state = 791
                self.match(BOCLParser.RPAREN)
                self.state = 793
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,151,self._ctx)
                if la_ == 1:
                    self.state = 792
                    self.expression()


                pass

            elif la_ == 30:
                localctx = BOCLParser.UNIONContext(self, localctx)
                self.enterOuterAlt(localctx, 30)
                self.state = 795
                self.match(BOCLParser.Arrow)
                self.state = 796
                self.match(BOCLParser.UNION)
                self.state = 797
                self.match(BOCLParser.LPAREN)
                self.state = 798
                self.expression()
                self.state = 799
                self.match(BOCLParser.RPAREN)
                self.state = 801
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,152,self._ctx)
                if la_ == 1:
                    self.state = 800
                    self.expression()


                pass

            elif la_ == 31:
                localctx = BOCLParser.DefExpContext(self, localctx)
                self.enterOuterAlt(localctx, 31)
                self.state = 803
                self.match(BOCLParser.Def)
                self.state = 804
                self.match(BOCLParser.COLON)
                self.state = 805
                self.expression()
                pass

            elif la_ == 32:
                localctx = BOCLParser.DefIDAssignmentexpressionContext(self, localctx)
                self.enterOuterAlt(localctx, 32)
                self.state = 806
                self.match(BOCLParser.ID)
                self.state = 807
                self.match(BOCLParser.COLON)
                self.state = 808
                self.match(BOCLParser.ID)
                self.state = 809
                self.match(BOCLParser.EQUAL)
                self.state = 810
                self.expression()
                pass

            elif la_ == 33:
                localctx = BOCLParser.PrimaryExpContext(self, localctx)
                self.enterOuterAlt(localctx, 33)
                self.state = 814
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,153,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 811
                        self.match(BOCLParser.LPAREN) 
                    self.state = 816
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,153,self._ctx)

                self.state = 818
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,154,self._ctx)
                if la_ == 1:
                    self.state = 817
                    self.primaryExpression()


                self.state = 824
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,155,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 820
                        self.match(BOCLParser.DOT)
                        self.state = 821
                        self.match(BOCLParser.ID) 
                    self.state = 826
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,155,self._ctx)

                self.state = 828
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & 8870773930328066) != 0):
                    self.state = 827
                    self.operator()


                self.state = 831
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==6 or _la==16 or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 481) != 0):
                    self.state = 830
                    self.primaryExpression()


                self.state = 835 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 833
                        self.match(BOCLParser.DOT)
                        self.state = 834
                        self.match(BOCLParser.ID)

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

                self.state = 840
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,159,self._ctx)
                if la_ == 1:
                    self.state = 839
                    self.expression()


                pass

            elif la_ == 34:
                localctx = BOCLParser.FuncCallContext(self, localctx)
                self.enterOuterAlt(localctx, 34)
                self.state = 842
                self.primaryExpression()
                self.state = 846
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==23:
                    self.state = 843
                    self.match(BOCLParser.DOT)
                    self.state = 848
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 852
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,161,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 849
                        self.match(BOCLParser.ID) 
                    self.state = 854
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,161,self._ctx)

                self.state = 855
                self.functionCall()
                self.state = 857
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,162,self._ctx)
                if la_ == 1:
                    self.state = 856
                    self.operator()


                self.state = 860
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,163,self._ctx)
                if la_ == 1:
                    self.state = 859
                    self.expression()


                pass

            elif la_ == 35:
                localctx = BOCLParser.ArrowexpContext(self, localctx)
                self.enterOuterAlt(localctx, 35)
                self.state = 862
                self.match(BOCLParser.Arrow)
                self.state = 863
                self.expression()
                pass

            elif la_ == 36:
                localctx = BOCLParser.NumberContext(self, localctx)
                self.enterOuterAlt(localctx, 36)
                self.state = 864
                self.match(BOCLParser.NUMBER)
                self.state = 866
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,164,self._ctx)
                if la_ == 1:
                    self.state = 865
                    self.expression()


                pass

            elif la_ == 37:
                localctx = BOCLParser.PredefinedfunctionCallContext(self, localctx)
                self.enterOuterAlt(localctx, 37)
                self.state = 869
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==76:
                    self.state = 868
                    self.match(BOCLParser.Arrow)


                self.state = 871
                self.functionCall()
                self.state = 873
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,166,self._ctx)
                if la_ == 1:
                    self.state = 872
                    self.expression()


                pass

            elif la_ == 38:
                localctx = BOCLParser.SingleQuoteExpContext(self, localctx)
                self.enterOuterAlt(localctx, 38)
                self.state = 875
                self.match(BOCLParser.SingleQuote)
                self.state = 876
                self.expression()
                self.state = 878
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==23:
                    self.state = 877
                    self.match(BOCLParser.DOT)


                self.state = 880
                self.match(BOCLParser.SingleQuote)
                self.state = 882
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,168,self._ctx)
                if la_ == 1:
                    self.state = 881
                    self.match(BOCLParser.DOT)


                self.state = 885
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,169,self._ctx)
                if la_ == 1:
                    self.state = 884
                    self.expression()


                pass

            elif la_ == 39:
                localctx = BOCLParser.DoubleDotsContext(self, localctx)
                self.enterOuterAlt(localctx, 39)
                self.state = 887
                self.match(BOCLParser.DoubleDots)
                self.state = 888
                self.expression()
                pass

            elif la_ == 40:
                localctx = BOCLParser.DoubleCOLONsContext(self, localctx)
                self.enterOuterAlt(localctx, 40)
                self.state = 890
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==34:
                    self.state = 889
                    self.match(BOCLParser.AND)


                self.state = 893
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==35:
                    self.state = 892
                    self.match(BOCLParser.OR)


                self.state = 896
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==78:
                    self.state = 895
                    self.match(BOCLParser.ID)


                self.state = 898
                self.match(BOCLParser.DoubleCOLON)
                self.state = 899
                self.expression()
                pass

            elif la_ == 41:
                localctx = BOCLParser.OpContext(self, localctx)
                self.enterOuterAlt(localctx, 41)
                self.state = 900
                self.operator()
                self.state = 902
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,173,self._ctx)
                if la_ == 1:
                    self.state = 901
                    self.numberORUserDefined()


                pass

            elif la_ == 42:
                localctx = BOCLParser.IDContext(self, localctx)
                self.enterOuterAlt(localctx, 42)
                self.state = 904
                self.primaryExpression()
                self.state = 906
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,174,self._ctx)
                if la_ == 1:
                    self.state = 905
                    self.expression()


                pass


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


    class EndExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


        def AND(self):
            return self.getToken(BOCLParser.AND, 0)

        def OR(self):
            return self.getToken(BOCLParser.OR, 0)

        def getRuleIndex(self):
            return BOCLParser.RULE_endExpression

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

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




    def endExpression(self):

        localctx = BOCLParser.EndExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_endExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 911
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,176,self._ctx)
            if la_ == 1:
                self.state = 910
                _la = self._input.LA(1)
                if not(_la==34 or _la==35):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


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


    class BinaryFunctionCallContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def operator(self):
            return self.getTypedRuleContext(BOCLParser.OperatorContext,0)


        def NUMBER(self):
            return self.getToken(BOCLParser.NUMBER, 0)

        def primaryExpression(self):
            return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,0)


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

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

        def getRuleIndex(self):
            return BOCLParser.RULE_binaryFunctionCall

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

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




    def binaryFunctionCall(self):

        localctx = BOCLParser.BinaryFunctionCallContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_binaryFunctionCall)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 915
            self.operator()
            self.state = 925
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,178,self._ctx)
            if la_ == 1:
                self.state = 916
                self.primaryExpression()
                self.state = 921
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,177,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 917
                        self.match(BOCLParser.DOT)
                        self.state = 918
                        self.match(BOCLParser.ID) 
                    self.state = 923
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,177,self._ctx)

                pass

            elif la_ == 2:
                self.state = 924
                self.match(BOCLParser.NUMBER)
                pass


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


    class BinaryExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def operator(self):
            return self.getTypedRuleContext(BOCLParser.OperatorContext,0)


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

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

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

        def primaryExpression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BOCLParser.PrimaryExpressionContext)
            else:
                return self.getTypedRuleContext(BOCLParser.PrimaryExpressionContext,i)


        def getRuleIndex(self):
            return BOCLParser.RULE_binaryExpression

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

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




    def binaryExpression(self):

        localctx = BOCLParser.BinaryExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_binaryExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 936
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,180,self._ctx)
            if la_ == 1:
                self.state = 927
                self.primaryExpression()
                self.state = 932
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,179,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 928
                        self.match(BOCLParser.DOT)
                        self.state = 929
                        self.match(BOCLParser.ID) 
                    self.state = 934
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,179,self._ctx)

                pass

            elif la_ == 2:
                self.state = 935
                self.match(BOCLParser.NUMBER)
                pass


            self.state = 942
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==23:
                self.state = 938
                self.match(BOCLParser.DOT)
                self.state = 939
                self.match(BOCLParser.ID)
                self.state = 944
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 945
            self.operator()
            self.state = 955
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,183,self._ctx)
            if la_ == 1:
                self.state = 946
                self.primaryExpression()
                self.state = 951
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,182,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 947
                        self.match(BOCLParser.DOT)
                        self.state = 948
                        self.match(BOCLParser.ID) 
                    self.state = 953
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,182,self._ctx)

                pass

            elif la_ == 2:
                self.state = 954
                self.match(BOCLParser.NUMBER)
                pass


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


    class UnaryExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


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

        def MINUS(self):
            return self.getToken(BOCLParser.MINUS, 0)

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

        def Divide(self):
            return self.getToken(BOCLParser.Divide, 0)

        def getRuleIndex(self):
            return BOCLParser.RULE_unaryExpression

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

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




    def unaryExpression(self):

        localctx = BOCLParser.UnaryExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_unaryExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 957
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 985231137964034) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 958
            self.expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OperatorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def EQUAL(self):
            return self.getToken(BOCLParser.EQUAL, 0)

        def NOTEQUAL(self):
            return self.getToken(BOCLParser.NOTEQUAL, 0)

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

        def LE(self):
            return self.getToken(BOCLParser.LE, 0)

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

        def GE(self):
            return self.getToken(BOCLParser.GE, 0)

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

        def MINUS(self):
            return self.getToken(BOCLParser.MINUS, 0)

        def EMPTYSTRING(self):
            return self.getToken(BOCLParser.EMPTYSTRING, 0)

        def Divide(self):
            return self.getToken(BOCLParser.Divide, 0)

        def AND(self):
            return self.getToken(BOCLParser.AND, 0)

        def OR(self):
            return self.getToken(BOCLParser.OR, 0)

        def XOR(self):
            return self.getToken(BOCLParser.XOR, 0)

        def IMPLIES(self):
            return self.getToken(BOCLParser.IMPLIES, 0)

        def getRuleIndex(self):
            return BOCLParser.RULE_operator

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

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




    def operator(self):

        localctx = BOCLParser.OperatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_operator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 960
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 8870773930328066) != 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 NumberORUserDefinedContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NUMBER(self):
            return self.getToken(BOCLParser.NUMBER, 0)

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

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

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

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

        def getRuleIndex(self):
            return BOCLParser.RULE_numberORUserDefined

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

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




    def numberORUserDefined(self):

        localctx = BOCLParser.NumberORUserDefinedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_numberORUserDefined)
        self._la = 0 # Token type
        try:
            self.state = 976
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [79]:
                self.enterOuterAlt(localctx, 1)
                self.state = 962
                self.match(BOCLParser.NUMBER)
                pass
            elif token in [25, 78]:
                self.enterOuterAlt(localctx, 2)
                self.state = 964
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==25:
                    self.state = 963
                    self.match(BOCLParser.SingleQuote)


                self.state = 966
                self.match(BOCLParser.ID)
                self.state = 968
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,185,self._ctx)
                if la_ == 1:
                    self.state = 967
                    self.match(BOCLParser.LPAREN)


                self.state = 971
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,186,self._ctx)
                if la_ == 1:
                    self.state = 970
                    self.match(BOCLParser.RPAREN)


                self.state = 974
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,187,self._ctx)
                if la_ == 1:
                    self.state = 973
                    self.match(BOCLParser.SingleQuote)


                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 PrimaryExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def literal(self):
            return self.getTypedRuleContext(BOCLParser.LiteralContext,0)


        def SELF(self):
            return self.getToken(BOCLParser.SELF, 0)

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


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

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


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

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

        def getRuleIndex(self):
            return BOCLParser.RULE_primaryExpression

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

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




    def primaryExpression(self):

        localctx = BOCLParser.PrimaryExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_primaryExpression)
        try:
            self.state = 986
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,189,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 978
                self.literal()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 979
                self.match(BOCLParser.SELF)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 980
                self.functionCall()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 981
                self.match(BOCLParser.LPAREN)
                self.state = 982
                self.expression()
                self.state = 983
                self.match(BOCLParser.RPAREN)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 985
                self.match(BOCLParser.ID)
                pass


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


    class LiteralContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NUMBER(self):
            return self.getToken(BOCLParser.NUMBER, 0)

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

        def BOOLEAN_LITERAL(self):
            return self.getToken(BOCLParser.BOOLEAN_LITERAL, 0)

        def NULL(self):
            return self.getToken(BOCLParser.NULL, 0)

        def getRuleIndex(self):
            return BOCLParser.RULE_literal

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

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




    def literal(self):

        localctx = BOCLParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_literal)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 988
            _la = self._input.LA(1)
            if not(((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 449) != 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





