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

class PSParser ( Parser ):

    grammarFileName = "PS.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'\\acute'", "'\\bar'", "'\\overline'", 
                     "'\\breve'", "'\\check'", "'\\widecheck'", "'\\dot'", 
                     "'\\ddot'", "'\\grave'", "'\\hat'", "'\\tilde'", "'\\widetilde'", 
                     "'\\vec'", "'\\overrightarrow'", "'\\bm'", "'\\boldsymbol'", 
                     "'\\text'", "'\\textit'", "'\\mathbb'", "'\\mathbin'", 
                     "'\\mathbf'", "'\\mathcal'", "'\\mathclap'", "'\\mathclose'", 
                     "'\\mathellipsis'", "'\\mathfrak'", "'\\mathinner'", 
                     "'\\mathnormal'", "'\\mathop'", "'\\mathopen'", "'\\mathord'", 
                     "'\\mathpunct'", "'\\mathrel'", "'\\mathring'", "'\\mathrlap'", 
                     "'\\mathrm'", "'\\mathscr'", "'\\mathsf'", "'\\mathsterling'", 
                     "'\\mathtt'", "'^T'", "'^{T}'", "'^\\top'", "'^{\\top}'", 
                     "'''", "<INVALID>", "'\\$'", "'+'", "'-'", "'*'", "<INVALID>", 
                     "'('", "')'", "'\\lgroup'", "'\\rgroup'", "'{'", "'}'", 
                     "'\\{'", "'\\}'", "'\\lbrace'", "'\\rbrace'", "'['", 
                     "']'", "'\\lbrack'", "'\\rbrack'", "'|'", "'\\lvert'", 
                     "'\\rvert'", "'\\vert'", "'\\|'", "'\\lfloor'", "'\\rfloor'", 
                     "'\\llcorner'", "'\\lrcorner'", "'\\lceil'", "'\\rceil'", 
                     "'\\ulcorner'", "'\\urcorner'", "'\\left'", "'\\right'", 
                     "'\\mleft'", "'\\mright'", "'\\lim'", "<INVALID>", 
                     "'\\int'", "'\\sum'", "'\\prod'", "'\\log'", "'\\ln'", 
                     "'\\exp'", "'\\sin'", "'\\cos'", "'\\tan'", "'\\csc'", 
                     "'\\sec'", "'\\cot'", "'\\arcsin'", "'\\arccos'", "'\\arctan'", 
                     "'\\arccsc'", "'\\arcsec'", "'\\arccot'", "'\\sinh'", 
                     "'\\cosh'", "'\\tanh'", "'\\arsinh'", "'\\arcosh'", 
                     "'\\artanh'", "'\\arcsinh'", "'\\arccosh'", "'\\arctanh'", 
                     "'arsinh'", "'arcsinh'", "'arcosh'", "'arccosh'", "'artanh'", 
                     "'arctanh'", "'gcd'", "'lcm'", "'floor'", "'ceil'", 
                     "'\\sqrt'", "'\\gcd'", "'\\lcm'", "'\\floor'", "'\\ceil'", 
                     "'\\max'", "'\\min'", "'\\det'", "'eye'", "'zeros'", 
                     "'ones'", "'cols'", "'rows'", "'diag'", "'norm'", "'rank'", 
                     "<INVALID>", "'rref'", "'hstack'", "'vstack'", "<INVALID>", 
                     "'nullspace'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'\\times'", "'\\cdot'", "'\\div'", "'\\frac'", 
                     "<INVALID>", "'\\choose'", "'\\mod'", "'\\mathit'", 
                     "'\\operatorname'", "'matrix'", "'pmatrix'", "'bmatrix'", 
                     "'vmatrix'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'&'", "'\\\\'", "'_'", "'^'", 
                     "':'", "';'", "','", "'.'", "<INVALID>", "<INVALID>", 
                     "'E'", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'\\in'", "'='", "<INVALID>", "'<'", "<INVALID>", "'>'", 
                     "<INVALID>", "<INVALID>", "'!'", "'\\%'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "WS", "DOLLAR_SIGN", "ADD", 
                      "SUB", "MUL", "DIV", "L_PAREN", "R_PAREN", "L_GROUP", 
                      "R_GROUP", "L_BRACE", "R_BRACE", "L_BRACE_VISUAL", 
                      "R_BRACE_VISUAL", "L_BRACE_CMD", "R_BRACE_CMD", "L_BRACKET", 
                      "R_BRACKET", "L_BRACK", "R_BRACK", "BAR", "L_VERT", 
                      "R_VERT", "VERT", "NORM", "L_FLOOR", "R_FLOOR", "LL_CORNER", 
                      "LR_CORNER", "L_CEIL", "R_CEIL", "UL_CORNER", "UR_CORNER", 
                      "L_LEFT", "R_RIGHT", "ML_LEFT", "MR_RIGHT", "FUNC_LIM", 
                      "LIM_APPROACH_SYM", "FUNC_INT", "FUNC_SUM", "FUNC_PROD", 
                      "FUNC_LOG", "FUNC_LN", "FUNC_EXP", "FUNC_SIN", "FUNC_COS", 
                      "FUNC_TAN", "FUNC_CSC", "FUNC_SEC", "FUNC_COT", "FUNC_ARCSIN", 
                      "FUNC_ARCCOS", "FUNC_ARCTAN", "FUNC_ARCCSC", "FUNC_ARCSEC", 
                      "FUNC_ARCCOT", "FUNC_SINH", "FUNC_COSH", "FUNC_TANH", 
                      "FUNC_ARSINH", "FUNC_ARCOSH", "FUNC_ARTANH", "FUNC_ARCSINH", 
                      "FUNC_ARCCOSH", "FUNC_ARCTANH", "FUNC_ARSINH_NAME", 
                      "FUNC_ARCSINH_NAME", "FUNC_ARCOSH_NAME", "FUNC_ARCCOSH_NAME", 
                      "FUNC_ARTANH_NAME", "FUNC_ARCTANH_NAME", "FUNC_GCD_NAME", 
                      "FUNC_LCM_NAME", "FUNC_FLOOR_NAME", "FUNC_CEIL_NAME", 
                      "FUNC_SQRT", "FUNC_GCD", "FUNC_LCM", "FUNC_FLOOR", 
                      "FUNC_CEIL", "FUNC_MAX", "FUNC_MIN", "FUNC_DET", "FUNC_EYE_NAME", 
                      "FUNC_ZEROS_NAME", "FUNC_ONES_NAME", "FUNC_COLS_NAME", 
                      "FUNC_ROWS_NAME", "FUNC_DIAG_NAME", "FUNC_NORM_NAME", 
                      "FUNC_RANK_NAME", "FUNC_TRACE_NAME", "FUNC_RREF_NAME", 
                      "FUNC_HSTACK_NAME", "FUNC_VSTACK_NAME", "FUNC_ORTHOGONALIZE_NAME", 
                      "FUNC_NULLSPACE_NAME", "FUNC_DIAGONALIZE_NAME", "FUNC_EIGENVALS_NAME", 
                      "FUNC_EIGENVECTORS_NAME", "FUNC_SVD_NAME", "CMD_TIMES", 
                      "CMD_CDOT", "CMD_DIV", "CMD_FRAC", "CMD_BINOM", "CMD_CHOOSE", 
                      "CMD_MOD", "CMD_MATHIT", "CMD_OPERATORNAME", "MATRIX_TYPE_MATRIX", 
                      "MATRIX_TYPE_PMATRIX", "MATRIX_TYPE_BMATRIX", "MATRIX_TYPE_DET", 
                      "MATRIX_TYPES", "CMD_MATRIX_START", "CMD_MATRIX_END", 
                      "CMD_DET_START", "CMD_DET_END", "MATRIX_DEL_COL", 
                      "MATRIX_DEL_ROW", "UNDERSCORE", "CARET", "COLON", 
                      "SEMICOLON", "COMMA", "PERIOD", "DIFFERENTIAL", "EXP_E", 
                      "E_NOTATION_E", "LETTER_NO_E", "DIGIT", "MATRIX_XRIGHTARROW", 
                      "TRANSFORM_EXCHANGE", "IN", "ASSIGNMENT", "EQUAL", 
                      "LT", "LTE", "GT", "GTE", "UNEQUAL", "BANG", "PERCENT_SIGN", 
                      "GREEK_CMD", "OTHER_SYMBOL_CMD", "SYMBOL", "VARIABLE" ]

    RULE_number = 0
    RULE_e_notation = 1
    RULE_percent_number = 2
    RULE_accent_symbol = 3
    RULE_math = 4
    RULE_transpose = 5
    RULE_transform_atom = 6
    RULE_transform_scale = 7
    RULE_transform_swap = 8
    RULE_transform_assignment = 9
    RULE_elementary_transform = 10
    RULE_elementary_transforms = 11
    RULE_matrix = 12
    RULE_det = 13
    RULE_matrix_row = 14
    RULE_relation = 15
    RULE_relation_list = 16
    RULE_relation_list_content = 17
    RULE_equality = 18
    RULE_expr = 19
    RULE_additive = 20
    RULE_mp = 21
    RULE_mp_nofunc = 22
    RULE_unary = 23
    RULE_unary_nofunc = 24
    RULE_postfix = 25
    RULE_postfix_nofunc = 26
    RULE_postfix_op = 27
    RULE_eval_at = 28
    RULE_eval_at_sub = 29
    RULE_eval_at_sup = 30
    RULE_exp = 31
    RULE_exp_nofunc = 32
    RULE_comp = 33
    RULE_comp_nofunc = 34
    RULE_group = 35
    RULE_norm_group = 36
    RULE_abs_group = 37
    RULE_floor_group = 38
    RULE_ceil_group = 39
    RULE_accent = 40
    RULE_atom_expr_no_supexpr = 41
    RULE_atom_expr = 42
    RULE_atom = 43
    RULE_mathit = 44
    RULE_mathit_text = 45
    RULE_frac = 46
    RULE_binom = 47
    RULE_func_normal_functions_single_arg = 48
    RULE_func_normal_functions_multi_arg = 49
    RULE_func_operator_names_single_arg = 50
    RULE_func_operator_names_multi_arg = 51
    RULE_func_normal_single_arg = 52
    RULE_func_normal_multi_arg = 53
    RULE_func = 54
    RULE_args = 55
    RULE_func_common_args = 56
    RULE_limit_sub = 57
    RULE_func_single_arg = 58
    RULE_func_single_arg_noparens = 59
    RULE_func_multi_arg = 60
    RULE_func_multi_arg_noparens = 61
    RULE_subexpr = 62
    RULE_supexpr = 63
    RULE_subeq = 64
    RULE_supeq = 65

    ruleNames =  [ "number", "e_notation", "percent_number", "accent_symbol", 
                   "math", "transpose", "transform_atom", "transform_scale", 
                   "transform_swap", "transform_assignment", "elementary_transform", 
                   "elementary_transforms", "matrix", "det", "matrix_row", 
                   "relation", "relation_list", "relation_list_content", 
                   "equality", "expr", "additive", "mp", "mp_nofunc", "unary", 
                   "unary_nofunc", "postfix", "postfix_nofunc", "postfix_op", 
                   "eval_at", "eval_at_sub", "eval_at_sup", "exp", "exp_nofunc", 
                   "comp", "comp_nofunc", "group", "norm_group", "abs_group", 
                   "floor_group", "ceil_group", "accent", "atom_expr_no_supexpr", 
                   "atom_expr", "atom", "mathit", "mathit_text", "frac", 
                   "binom", "func_normal_functions_single_arg", "func_normal_functions_multi_arg", 
                   "func_operator_names_single_arg", "func_operator_names_multi_arg", 
                   "func_normal_single_arg", "func_normal_multi_arg", "func", 
                   "args", "func_common_args", "limit_sub", "func_single_arg", 
                   "func_single_arg_noparens", "func_multi_arg", "func_multi_arg_noparens", 
                   "subexpr", "supexpr", "subeq", "supeq" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    T__19=20
    T__20=21
    T__21=22
    T__22=23
    T__23=24
    T__24=25
    T__25=26
    T__26=27
    T__27=28
    T__28=29
    T__29=30
    T__30=31
    T__31=32
    T__32=33
    T__33=34
    T__34=35
    T__35=36
    T__36=37
    T__37=38
    T__38=39
    T__39=40
    T__40=41
    T__41=42
    T__42=43
    T__43=44
    T__44=45
    WS=46
    DOLLAR_SIGN=47
    ADD=48
    SUB=49
    MUL=50
    DIV=51
    L_PAREN=52
    R_PAREN=53
    L_GROUP=54
    R_GROUP=55
    L_BRACE=56
    R_BRACE=57
    L_BRACE_VISUAL=58
    R_BRACE_VISUAL=59
    L_BRACE_CMD=60
    R_BRACE_CMD=61
    L_BRACKET=62
    R_BRACKET=63
    L_BRACK=64
    R_BRACK=65
    BAR=66
    L_VERT=67
    R_VERT=68
    VERT=69
    NORM=70
    L_FLOOR=71
    R_FLOOR=72
    LL_CORNER=73
    LR_CORNER=74
    L_CEIL=75
    R_CEIL=76
    UL_CORNER=77
    UR_CORNER=78
    L_LEFT=79
    R_RIGHT=80
    ML_LEFT=81
    MR_RIGHT=82
    FUNC_LIM=83
    LIM_APPROACH_SYM=84
    FUNC_INT=85
    FUNC_SUM=86
    FUNC_PROD=87
    FUNC_LOG=88
    FUNC_LN=89
    FUNC_EXP=90
    FUNC_SIN=91
    FUNC_COS=92
    FUNC_TAN=93
    FUNC_CSC=94
    FUNC_SEC=95
    FUNC_COT=96
    FUNC_ARCSIN=97
    FUNC_ARCCOS=98
    FUNC_ARCTAN=99
    FUNC_ARCCSC=100
    FUNC_ARCSEC=101
    FUNC_ARCCOT=102
    FUNC_SINH=103
    FUNC_COSH=104
    FUNC_TANH=105
    FUNC_ARSINH=106
    FUNC_ARCOSH=107
    FUNC_ARTANH=108
    FUNC_ARCSINH=109
    FUNC_ARCCOSH=110
    FUNC_ARCTANH=111
    FUNC_ARSINH_NAME=112
    FUNC_ARCSINH_NAME=113
    FUNC_ARCOSH_NAME=114
    FUNC_ARCCOSH_NAME=115
    FUNC_ARTANH_NAME=116
    FUNC_ARCTANH_NAME=117
    FUNC_GCD_NAME=118
    FUNC_LCM_NAME=119
    FUNC_FLOOR_NAME=120
    FUNC_CEIL_NAME=121
    FUNC_SQRT=122
    FUNC_GCD=123
    FUNC_LCM=124
    FUNC_FLOOR=125
    FUNC_CEIL=126
    FUNC_MAX=127
    FUNC_MIN=128
    FUNC_DET=129
    FUNC_EYE_NAME=130
    FUNC_ZEROS_NAME=131
    FUNC_ONES_NAME=132
    FUNC_COLS_NAME=133
    FUNC_ROWS_NAME=134
    FUNC_DIAG_NAME=135
    FUNC_NORM_NAME=136
    FUNC_RANK_NAME=137
    FUNC_TRACE_NAME=138
    FUNC_RREF_NAME=139
    FUNC_HSTACK_NAME=140
    FUNC_VSTACK_NAME=141
    FUNC_ORTHOGONALIZE_NAME=142
    FUNC_NULLSPACE_NAME=143
    FUNC_DIAGONALIZE_NAME=144
    FUNC_EIGENVALS_NAME=145
    FUNC_EIGENVECTORS_NAME=146
    FUNC_SVD_NAME=147
    CMD_TIMES=148
    CMD_CDOT=149
    CMD_DIV=150
    CMD_FRAC=151
    CMD_BINOM=152
    CMD_CHOOSE=153
    CMD_MOD=154
    CMD_MATHIT=155
    CMD_OPERATORNAME=156
    MATRIX_TYPE_MATRIX=157
    MATRIX_TYPE_PMATRIX=158
    MATRIX_TYPE_BMATRIX=159
    MATRIX_TYPE_DET=160
    MATRIX_TYPES=161
    CMD_MATRIX_START=162
    CMD_MATRIX_END=163
    CMD_DET_START=164
    CMD_DET_END=165
    MATRIX_DEL_COL=166
    MATRIX_DEL_ROW=167
    UNDERSCORE=168
    CARET=169
    COLON=170
    SEMICOLON=171
    COMMA=172
    PERIOD=173
    DIFFERENTIAL=174
    EXP_E=175
    E_NOTATION_E=176
    LETTER_NO_E=177
    DIGIT=178
    MATRIX_XRIGHTARROW=179
    TRANSFORM_EXCHANGE=180
    IN=181
    ASSIGNMENT=182
    EQUAL=183
    LT=184
    LTE=185
    GT=186
    GTE=187
    UNEQUAL=188
    BANG=189
    PERCENT_SIGN=190
    GREEK_CMD=191
    OTHER_SYMBOL_CMD=192
    SYMBOL=193
    VARIABLE=194

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




    class NumberContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def PERIOD(self):
            return self.getToken(PSParser.PERIOD, 0)

        def getRuleIndex(self):
            return PSParser.RULE_number

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

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




    def number(self):

        localctx = PSParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_number)
        try:
            self.state = 160
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [178]:
                self.enterOuterAlt(localctx, 1)
                self.state = 133 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 132
                        self.match(PSParser.DIGIT)

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

                self.state = 143
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,1,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 137
                        self.match(PSParser.COMMA)
                        self.state = 138
                        self.match(PSParser.DIGIT)
                        self.state = 139
                        self.match(PSParser.DIGIT)
                        self.state = 140
                        self.match(PSParser.DIGIT) 
                    self.state = 145
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,1,self._ctx)

                self.state = 152
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
                if la_ == 1:
                    self.state = 146
                    self.match(PSParser.PERIOD)
                    self.state = 148 
                    self._errHandler.sync(self)
                    _alt = 1
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt == 1:
                            self.state = 147
                            self.match(PSParser.DIGIT)

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



                pass
            elif token in [173]:
                self.enterOuterAlt(localctx, 2)
                self.state = 154
                self.match(PSParser.PERIOD)
                self.state = 156 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 155
                        self.match(PSParser.DIGIT)

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

                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 E_notationContext(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.getTypedRuleContext(PSParser.NumberContext,0)


        def E_NOTATION_E(self):
            return self.getToken(PSParser.E_NOTATION_E, 0)

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

        def SUB(self):
            return self.getToken(PSParser.SUB, 0)

        def ADD(self):
            return self.getToken(PSParser.ADD, 0)

        def getRuleIndex(self):
            return PSParser.RULE_e_notation

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

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




    def e_notation(self):

        localctx = PSParser.E_notationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_e_notation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 162
            self.number()
            self.state = 163
            self.match(PSParser.E_NOTATION_E)
            self.state = 165
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==48 or _la==49:
                self.state = 164
                _la = self._input.LA(1)
                if not(_la==48 or _la==49):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 168 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 167
                    self.match(PSParser.DIGIT)

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

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


    class Percent_numberContext(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.getTypedRuleContext(PSParser.NumberContext,0)


        def PERCENT_SIGN(self):
            return self.getToken(PSParser.PERCENT_SIGN, 0)

        def getRuleIndex(self):
            return PSParser.RULE_percent_number

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

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




    def percent_number(self):

        localctx = PSParser.Percent_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_percent_number)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 172
            self.number()
            self.state = 173
            self.match(PSParser.PERCENT_SIGN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Accent_symbolContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CMD_MATHIT(self):
            return self.getToken(PSParser.CMD_MATHIT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_accent_symbol

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

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




    def accent_symbol(self):

        localctx = PSParser.Accent_symbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_accent_symbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 175
            _la = self._input.LA(1)
            if not(((_la) & ~0x3f) == 0 and ((1 << _la) & 2199023255550) != 0 or _la==155):
                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 MathContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def relation(self):
            return self.getTypedRuleContext(PSParser.RelationContext,0)


        def relation_list(self):
            return self.getTypedRuleContext(PSParser.Relation_listContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_math

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

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




    def math(self):

        localctx = PSParser.MathContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_math)
        try:
            self.state = 179
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 177
                self.relation(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 178
                self.relation_list()
                pass


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


    class TransposeContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return PSParser.RULE_transpose

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

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




    def transpose(self):

        localctx = PSParser.TransposeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_transpose)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 181
            _la = self._input.LA(1)
            if not(((_la) & ~0x3f) == 0 and ((1 << _la) & 68169720922112) != 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 Transform_atomContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LETTER_NO_E(self):
            return self.getToken(PSParser.LETTER_NO_E, 0)

        def UNDERSCORE(self):
            return self.getToken(PSParser.UNDERSCORE, 0)

        def number(self):
            return self.getTypedRuleContext(PSParser.NumberContext,0)


        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def getRuleIndex(self):
            return PSParser.RULE_transform_atom

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

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




    def transform_atom(self):

        localctx = PSParser.Transform_atomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_transform_atom)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 183
            self.match(PSParser.LETTER_NO_E)
            self.state = 184
            self.match(PSParser.UNDERSCORE)
            self.state = 190
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [173, 178]:
                self.state = 185
                self.number()
                pass
            elif token in [56]:
                self.state = 186
                self.match(PSParser.L_BRACE)
                self.state = 187
                self.number()
                self.state = 188
                self.match(PSParser.R_BRACE)
                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 Transform_scaleContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def transform_atom(self):
            return self.getTypedRuleContext(PSParser.Transform_atomContext,0)


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


        def group(self):
            return self.getTypedRuleContext(PSParser.GroupContext,0)


        def ADD(self):
            return self.getToken(PSParser.ADD, 0)

        def SUB(self):
            return self.getToken(PSParser.SUB, 0)

        def getRuleIndex(self):
            return PSParser.RULE_transform_scale

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

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




    def transform_scale(self):

        localctx = PSParser.Transform_scaleContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_transform_scale)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 196
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,10,self._ctx)
            if la_ == 1:
                self.state = 192
                self.expr()
                pass

            elif la_ == 2:
                self.state = 193
                self.group()
                pass

            elif la_ == 3:
                self.state = 194
                self.match(PSParser.ADD)
                pass

            elif la_ == 4:
                self.state = 195
                self.match(PSParser.SUB)
                pass


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


    class Transform_swapContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def transform_atom(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Transform_atomContext)
            else:
                return self.getTypedRuleContext(PSParser.Transform_atomContext,i)


        def TRANSFORM_EXCHANGE(self):
            return self.getToken(PSParser.TRANSFORM_EXCHANGE, 0)

        def getRuleIndex(self):
            return PSParser.RULE_transform_swap

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

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




    def transform_swap(self):

        localctx = PSParser.Transform_swapContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_transform_swap)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 200
            self.transform_atom()
            self.state = 201
            self.match(PSParser.TRANSFORM_EXCHANGE)
            self.state = 202
            self.transform_atom()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Transform_assignmentContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def transform_atom(self):
            return self.getTypedRuleContext(PSParser.Transform_atomContext,0)


        def transform_scale(self):
            return self.getTypedRuleContext(PSParser.Transform_scaleContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_transform_assignment

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

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




    def transform_assignment(self):

        localctx = PSParser.Transform_assignmentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_transform_assignment)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 204
            self.transform_atom()
            self.state = 205
            self.transform_scale()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Elementary_transformContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def transform_assignment(self):
            return self.getTypedRuleContext(PSParser.Transform_assignmentContext,0)


        def transform_scale(self):
            return self.getTypedRuleContext(PSParser.Transform_scaleContext,0)


        def transform_swap(self):
            return self.getTypedRuleContext(PSParser.Transform_swapContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_elementary_transform

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

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




    def elementary_transform(self):

        localctx = PSParser.Elementary_transformContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_elementary_transform)
        try:
            self.state = 210
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,11,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 207
                self.transform_assignment()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 208
                self.transform_scale()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 209
                self.transform_swap()
                pass


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


    class Elementary_transformsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def elementary_transform(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Elementary_transformContext)
            else:
                return self.getTypedRuleContext(PSParser.Elementary_transformContext,i)


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

        def getRuleIndex(self):
            return PSParser.RULE_elementary_transforms

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

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




    def elementary_transforms(self):

        localctx = PSParser.Elementary_transformsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_elementary_transforms)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 212
            self.elementary_transform()
            self.state = 217
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==172:
                self.state = 213
                self.match(PSParser.COMMA)
                self.state = 214
                self.elementary_transform()
                self.state = 219
                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 MatrixContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CMD_MATRIX_START(self):
            return self.getToken(PSParser.CMD_MATRIX_START, 0)

        def matrix_row(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Matrix_rowContext)
            else:
                return self.getTypedRuleContext(PSParser.Matrix_rowContext,i)


        def CMD_MATRIX_END(self):
            return self.getToken(PSParser.CMD_MATRIX_END, 0)

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

        def MATRIX_XRIGHTARROW(self):
            return self.getToken(PSParser.MATRIX_XRIGHTARROW, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def elementary_transforms(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Elementary_transformsContext)
            else:
                return self.getTypedRuleContext(PSParser.Elementary_transformsContext,i)


        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def L_BRACKET(self):
            return self.getToken(PSParser.L_BRACKET, 0)

        def R_BRACKET(self):
            return self.getToken(PSParser.R_BRACKET, 0)

        def getRuleIndex(self):
            return PSParser.RULE_matrix

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

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




    def matrix(self):

        localctx = PSParser.MatrixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_matrix)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 220
            self.match(PSParser.CMD_MATRIX_START)
            self.state = 221
            self.matrix_row()
            self.state = 226
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,13,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 222
                    self.match(PSParser.MATRIX_DEL_ROW)
                    self.state = 223
                    self.matrix_row() 
                self.state = 228
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,13,self._ctx)

            self.state = 230
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==167:
                self.state = 229
                self.match(PSParser.MATRIX_DEL_ROW)


            self.state = 232
            self.match(PSParser.CMD_MATRIX_END)
            self.state = 244
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,16,self._ctx)
            if la_ == 1:
                self.state = 233
                self.match(PSParser.MATRIX_XRIGHTARROW)
                self.state = 238
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==62:
                    self.state = 234
                    self.match(PSParser.L_BRACKET)
                    self.state = 235
                    self.elementary_transforms()
                    self.state = 236
                    self.match(PSParser.R_BRACKET)


                self.state = 240
                self.match(PSParser.L_BRACE)
                self.state = 241
                self.elementary_transforms()
                self.state = 242
                self.match(PSParser.R_BRACE)


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


    class DetContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CMD_DET_START(self):
            return self.getToken(PSParser.CMD_DET_START, 0)

        def matrix_row(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Matrix_rowContext)
            else:
                return self.getTypedRuleContext(PSParser.Matrix_rowContext,i)


        def CMD_DET_END(self):
            return self.getToken(PSParser.CMD_DET_END, 0)

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

        def getRuleIndex(self):
            return PSParser.RULE_det

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

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




    def det(self):

        localctx = PSParser.DetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_det)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 246
            self.match(PSParser.CMD_DET_START)
            self.state = 247
            self.matrix_row()
            self.state = 252
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,17,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 248
                    self.match(PSParser.MATRIX_DEL_ROW)
                    self.state = 249
                    self.matrix_row() 
                self.state = 254
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,17,self._ctx)

            self.state = 256
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==167:
                self.state = 255
                self.match(PSParser.MATRIX_DEL_ROW)


            self.state = 258
            self.match(PSParser.CMD_DET_END)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Matrix_rowContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


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

        def getRuleIndex(self):
            return PSParser.RULE_matrix_row

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

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




    def matrix_row(self):

        localctx = PSParser.Matrix_rowContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_matrix_row)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 260
            self.expr()
            self.state = 265
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==166:
                self.state = 261
                self.match(PSParser.MATRIX_DEL_COL)
                self.state = 262
                self.expr()
                self.state = 267
                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 RelationContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


        def relation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.RelationContext)
            else:
                return self.getTypedRuleContext(PSParser.RelationContext,i)


        def IN(self):
            return self.getToken(PSParser.IN, 0)

        def ASSIGNMENT(self):
            return self.getToken(PSParser.ASSIGNMENT, 0)

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

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

        def LTE(self):
            return self.getToken(PSParser.LTE, 0)

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

        def GTE(self):
            return self.getToken(PSParser.GTE, 0)

        def UNEQUAL(self):
            return self.getToken(PSParser.UNEQUAL, 0)

        def getRuleIndex(self):
            return PSParser.RULE_relation

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

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



    def relation(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = PSParser.RelationContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 30
        self.enterRecursionRule(localctx, 30, self.RULE_relation, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 269
            self.expr()
            self._ctx.stop = self._input.LT(-1)
            self.state = 276
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,20,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = PSParser.RelationContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_relation)
                    self.state = 271
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 272
                    _la = self._input.LA(1)
                    if not((((_la - 181)) & ~0x3f) == 0 and ((1 << (_la - 181)) & 255) != 0):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 273
                    self.relation(3) 
                self.state = 278
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,20,self._ctx)

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


    class Relation_listContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def relation_list_content(self):
            return self.getTypedRuleContext(PSParser.Relation_list_contentContext,0)


        def L_BRACKET(self):
            return self.getToken(PSParser.L_BRACKET, 0)

        def R_BRACKET(self):
            return self.getToken(PSParser.R_BRACKET, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def L_BRACE_VISUAL(self):
            return self.getToken(PSParser.L_BRACE_VISUAL, 0)

        def R_BRACE_VISUAL(self):
            return self.getToken(PSParser.R_BRACE_VISUAL, 0)

        def L_LEFT(self):
            return self.getToken(PSParser.L_LEFT, 0)

        def R_RIGHT(self):
            return self.getToken(PSParser.R_RIGHT, 0)

        def ML_LEFT(self):
            return self.getToken(PSParser.ML_LEFT, 0)

        def MR_RIGHT(self):
            return self.getToken(PSParser.MR_RIGHT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_relation_list

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

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




    def relation_list(self):

        localctx = PSParser.Relation_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_relation_list)
        try:
            self.state = 316
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,21,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 279
                self.relation_list_content()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 280
                self.match(PSParser.L_BRACKET)
                self.state = 281
                self.relation_list_content()
                self.state = 282
                self.match(PSParser.R_BRACKET)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 284
                self.match(PSParser.L_BRACE)
                self.state = 285
                self.relation_list_content()
                self.state = 286
                self.match(PSParser.R_BRACE)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 288
                self.match(PSParser.L_BRACE_VISUAL)
                self.state = 289
                self.relation_list_content()
                self.state = 290
                self.match(PSParser.R_BRACE_VISUAL)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 292
                self.match(PSParser.L_LEFT)
                self.state = 293
                self.match(PSParser.L_BRACKET)
                self.state = 294
                self.relation_list_content()
                self.state = 295
                self.match(PSParser.R_RIGHT)
                self.state = 296
                self.match(PSParser.R_BRACKET)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 298
                self.match(PSParser.L_LEFT)
                self.state = 299
                self.match(PSParser.L_BRACE_VISUAL)
                self.state = 300
                self.relation_list_content()
                self.state = 301
                self.match(PSParser.R_RIGHT)
                self.state = 302
                self.match(PSParser.R_BRACE_VISUAL)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 304
                self.match(PSParser.ML_LEFT)
                self.state = 305
                self.match(PSParser.L_BRACKET)
                self.state = 306
                self.relation_list_content()
                self.state = 307
                self.match(PSParser.MR_RIGHT)
                self.state = 308
                self.match(PSParser.R_BRACKET)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 310
                self.match(PSParser.ML_LEFT)
                self.state = 311
                self.match(PSParser.L_BRACE_VISUAL)
                self.state = 312
                self.relation_list_content()
                self.state = 313
                self.match(PSParser.MR_RIGHT)
                self.state = 314
                self.match(PSParser.R_BRACE_VISUAL)
                pass


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


    class Relation_list_contentContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def relation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.RelationContext)
            else:
                return self.getTypedRuleContext(PSParser.RelationContext,i)


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

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

        def getRuleIndex(self):
            return PSParser.RULE_relation_list_content

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

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




    def relation_list_content(self):

        localctx = PSParser.Relation_list_contentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_relation_list_content)
        self._la = 0 # Token type
        try:
            self.state = 338
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,24,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 318
                self.relation(0)
                self.state = 319
                self.match(PSParser.COMMA)
                self.state = 320
                self.relation(0)
                self.state = 325
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==172:
                    self.state = 321
                    self.match(PSParser.COMMA)
                    self.state = 322
                    self.relation(0)
                    self.state = 327
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 328
                self.relation(0)
                self.state = 329
                self.match(PSParser.SEMICOLON)
                self.state = 330
                self.relation(0)
                self.state = 335
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==171:
                    self.state = 331
                    self.match(PSParser.SEMICOLON)
                    self.state = 332
                    self.relation(0)
                    self.state = 337
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass


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


    class EqualityContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


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

        def ASSIGNMENT(self):
            return self.getToken(PSParser.ASSIGNMENT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_equality

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

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




    def equality(self):

        localctx = PSParser.EqualityContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_equality)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 340
            self.expr()
            self.state = 341
            _la = self._input.LA(1)
            if not(_la==182 or _la==183):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 342
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def additive(self):
            return self.getTypedRuleContext(PSParser.AdditiveContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_expr

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

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




    def expr(self):

        localctx = PSParser.ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 344
            self.additive(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AdditiveContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def mp(self):
            return self.getTypedRuleContext(PSParser.MpContext,0)


        def additive(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.AdditiveContext)
            else:
                return self.getTypedRuleContext(PSParser.AdditiveContext,i)


        def ADD(self):
            return self.getToken(PSParser.ADD, 0)

        def SUB(self):
            return self.getToken(PSParser.SUB, 0)

        def getRuleIndex(self):
            return PSParser.RULE_additive

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

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



    def additive(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = PSParser.AdditiveContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 40
        self.enterRecursionRule(localctx, 40, self.RULE_additive, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 347
            self.mp(0)
            self._ctx.stop = self._input.LT(-1)
            self.state = 354
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,25,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = PSParser.AdditiveContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_additive)
                    self.state = 349
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 350
                    _la = self._input.LA(1)
                    if not(_la==48 or _la==49):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 351
                    self.additive(3) 
                self.state = 356
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,25,self._ctx)

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


    class MpContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def unary(self):
            return self.getTypedRuleContext(PSParser.UnaryContext,0)


        def mp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.MpContext)
            else:
                return self.getTypedRuleContext(PSParser.MpContext,i)


        def MUL(self):
            return self.getToken(PSParser.MUL, 0)

        def CMD_TIMES(self):
            return self.getToken(PSParser.CMD_TIMES, 0)

        def CMD_CDOT(self):
            return self.getToken(PSParser.CMD_CDOT, 0)

        def DIV(self):
            return self.getToken(PSParser.DIV, 0)

        def CMD_DIV(self):
            return self.getToken(PSParser.CMD_DIV, 0)

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

        def CMD_MOD(self):
            return self.getToken(PSParser.CMD_MOD, 0)

        def getRuleIndex(self):
            return PSParser.RULE_mp

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

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



    def mp(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = PSParser.MpContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 42
        self.enterRecursionRule(localctx, 42, self.RULE_mp, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 358
            self.unary()
            self._ctx.stop = self._input.LT(-1)
            self.state = 365
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,26,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = PSParser.MpContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_mp)
                    self.state = 360
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 361
                    _la = self._input.LA(1)
                    if not(_la==50 or _la==51 or (((_la - 148)) & ~0x3f) == 0 and ((1 << (_la - 148)) & 4194375) != 0):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 362
                    self.mp(3) 
                self.state = 367
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,26,self._ctx)

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


    class Mp_nofuncContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def unary_nofunc(self):
            return self.getTypedRuleContext(PSParser.Unary_nofuncContext,0)


        def mp_nofunc(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Mp_nofuncContext)
            else:
                return self.getTypedRuleContext(PSParser.Mp_nofuncContext,i)


        def MUL(self):
            return self.getToken(PSParser.MUL, 0)

        def CMD_TIMES(self):
            return self.getToken(PSParser.CMD_TIMES, 0)

        def CMD_CDOT(self):
            return self.getToken(PSParser.CMD_CDOT, 0)

        def DIV(self):
            return self.getToken(PSParser.DIV, 0)

        def CMD_DIV(self):
            return self.getToken(PSParser.CMD_DIV, 0)

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

        def CMD_MOD(self):
            return self.getToken(PSParser.CMD_MOD, 0)

        def getRuleIndex(self):
            return PSParser.RULE_mp_nofunc

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

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



    def mp_nofunc(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = PSParser.Mp_nofuncContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 44
        self.enterRecursionRule(localctx, 44, self.RULE_mp_nofunc, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 369
            self.unary_nofunc()
            self._ctx.stop = self._input.LT(-1)
            self.state = 376
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,27,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = PSParser.Mp_nofuncContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_mp_nofunc)
                    self.state = 371
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 372
                    _la = self._input.LA(1)
                    if not(_la==50 or _la==51 or (((_la - 148)) & ~0x3f) == 0 and ((1 << (_la - 148)) & 4194375) != 0):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 373
                    self.mp_nofunc(3) 
                self.state = 378
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,27,self._ctx)

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


    class UnaryContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def unary(self):
            return self.getTypedRuleContext(PSParser.UnaryContext,0)


        def ADD(self):
            return self.getToken(PSParser.ADD, 0)

        def SUB(self):
            return self.getToken(PSParser.SUB, 0)

        def postfix(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.PostfixContext)
            else:
                return self.getTypedRuleContext(PSParser.PostfixContext,i)


        def getRuleIndex(self):
            return PSParser.RULE_unary

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

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




    def unary(self):

        localctx = PSParser.UnaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_unary)
        self._la = 0 # Token type
        try:
            self.state = 386
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [48, 49]:
                self.enterOuterAlt(localctx, 1)
                self.state = 379
                _la = self._input.LA(1)
                if not(_la==48 or _la==49):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 380
                self.unary()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 52, 54, 56, 58, 60, 62, 64, 66, 67, 69, 70, 71, 73, 75, 77, 79, 81, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 122, 123, 124, 125, 126, 127, 128, 129, 151, 152, 155, 156, 162, 164, 173, 174, 175, 177, 178, 191, 192, 193, 194]:
                self.enterOuterAlt(localctx, 2)
                self.state = 382 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 381
                        self.postfix()

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

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

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

        def unary_nofunc(self):
            return self.getTypedRuleContext(PSParser.Unary_nofuncContext,0)


        def ADD(self):
            return self.getToken(PSParser.ADD, 0)

        def SUB(self):
            return self.getToken(PSParser.SUB, 0)

        def postfix(self):
            return self.getTypedRuleContext(PSParser.PostfixContext,0)


        def postfix_nofunc(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Postfix_nofuncContext)
            else:
                return self.getTypedRuleContext(PSParser.Postfix_nofuncContext,i)


        def getRuleIndex(self):
            return PSParser.RULE_unary_nofunc

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

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




    def unary_nofunc(self):

        localctx = PSParser.Unary_nofuncContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_unary_nofunc)
        self._la = 0 # Token type
        try:
            self.state = 397
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [48, 49]:
                self.enterOuterAlt(localctx, 1)
                self.state = 388
                _la = self._input.LA(1)
                if not(_la==48 or _la==49):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 389
                self.unary_nofunc()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 52, 54, 56, 58, 60, 62, 64, 66, 67, 69, 70, 71, 73, 75, 77, 79, 81, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 122, 123, 124, 125, 126, 127, 128, 129, 151, 152, 155, 156, 162, 164, 173, 174, 175, 177, 178, 191, 192, 193, 194]:
                self.enterOuterAlt(localctx, 2)
                self.state = 390
                self.postfix()
                self.state = 394
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,30,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 391
                        self.postfix_nofunc() 
                    self.state = 396
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,30,self._ctx)

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

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

        def exp(self):
            return self.getTypedRuleContext(PSParser.ExpContext,0)


        def postfix_op(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Postfix_opContext)
            else:
                return self.getTypedRuleContext(PSParser.Postfix_opContext,i)


        def getRuleIndex(self):
            return PSParser.RULE_postfix

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

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




    def postfix(self):

        localctx = PSParser.PostfixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_postfix)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 399
            self.exp(0)
            self.state = 403
            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 = 400
                    self.postfix_op() 
                self.state = 405
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,32,self._ctx)

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


    class Postfix_nofuncContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def exp_nofunc(self):
            return self.getTypedRuleContext(PSParser.Exp_nofuncContext,0)


        def postfix_op(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(PSParser.Postfix_opContext)
            else:
                return self.getTypedRuleContext(PSParser.Postfix_opContext,i)


        def getRuleIndex(self):
            return PSParser.RULE_postfix_nofunc

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

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




    def postfix_nofunc(self):

        localctx = PSParser.Postfix_nofuncContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_postfix_nofunc)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 406
            self.exp_nofunc(0)
            self.state = 410
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,33,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 407
                    self.postfix_op() 
                self.state = 412
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,33,self._ctx)

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


    class Postfix_opContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BANG(self):
            return self.getToken(PSParser.BANG, 0)

        def eval_at(self):
            return self.getTypedRuleContext(PSParser.Eval_atContext,0)


        def transpose(self):
            return self.getTypedRuleContext(PSParser.TransposeContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_postfix_op

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

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




    def postfix_op(self):

        localctx = PSParser.Postfix_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_postfix_op)
        try:
            self.state = 416
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [189]:
                self.enterOuterAlt(localctx, 1)
                self.state = 413
                self.match(PSParser.BANG)
                pass
            elif token in [66]:
                self.enterOuterAlt(localctx, 2)
                self.state = 414
                self.eval_at()
                pass
            elif token in [41, 42, 43, 44, 45]:
                self.enterOuterAlt(localctx, 3)
                self.state = 415
                self.transpose()
                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 Eval_atContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BAR(self):
            return self.getToken(PSParser.BAR, 0)

        def eval_at_sup(self):
            return self.getTypedRuleContext(PSParser.Eval_at_supContext,0)


        def eval_at_sub(self):
            return self.getTypedRuleContext(PSParser.Eval_at_subContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_eval_at

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

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




    def eval_at(self):

        localctx = PSParser.Eval_atContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_eval_at)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 418
            self.match(PSParser.BAR)
            self.state = 424
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,35,self._ctx)
            if la_ == 1:
                self.state = 419
                self.eval_at_sup()
                pass

            elif la_ == 2:
                self.state = 420
                self.eval_at_sub()
                pass

            elif la_ == 3:
                self.state = 421
                self.eval_at_sup()
                self.state = 422
                self.eval_at_sub()
                pass


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


    class Eval_at_subContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def UNDERSCORE(self):
            return self.getToken(PSParser.UNDERSCORE, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

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


        def equality(self):
            return self.getTypedRuleContext(PSParser.EqualityContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_eval_at_sub

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

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




    def eval_at_sub(self):

        localctx = PSParser.Eval_at_subContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_eval_at_sub)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 426
            self.match(PSParser.UNDERSCORE)
            self.state = 427
            self.match(PSParser.L_BRACE)
            self.state = 430
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,36,self._ctx)
            if la_ == 1:
                self.state = 428
                self.expr()
                pass

            elif la_ == 2:
                self.state = 429
                self.equality()
                pass


            self.state = 432
            self.match(PSParser.R_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Eval_at_supContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CARET(self):
            return self.getToken(PSParser.CARET, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

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


        def equality(self):
            return self.getTypedRuleContext(PSParser.EqualityContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_eval_at_sup

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

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




    def eval_at_sup(self):

        localctx = PSParser.Eval_at_supContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_eval_at_sup)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 434
            self.match(PSParser.CARET)
            self.state = 435
            self.match(PSParser.L_BRACE)
            self.state = 438
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,37,self._ctx)
            if la_ == 1:
                self.state = 436
                self.expr()
                pass

            elif la_ == 2:
                self.state = 437
                self.equality()
                pass


            self.state = 440
            self.match(PSParser.R_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def comp(self):
            return self.getTypedRuleContext(PSParser.CompContext,0)


        def exp(self):
            return self.getTypedRuleContext(PSParser.ExpContext,0)


        def CARET(self):
            return self.getToken(PSParser.CARET, 0)

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


        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

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


        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def subexpr(self):
            return self.getTypedRuleContext(PSParser.SubexprContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_exp

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

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



    def exp(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = PSParser.ExpContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 62
        self.enterRecursionRule(localctx, 62, self.RULE_exp, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 443
            self.comp()
            self._ctx.stop = self._input.LT(-1)
            self.state = 459
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,40,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = PSParser.ExpContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                    self.state = 445
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 446
                    self.match(PSParser.CARET)
                    self.state = 452
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 151, 155, 173, 174, 177, 178, 191, 192, 193, 194]:
                        self.state = 447
                        self.atom()
                        pass
                    elif token in [56]:
                        self.state = 448
                        self.match(PSParser.L_BRACE)
                        self.state = 449
                        self.expr()
                        self.state = 450
                        self.match(PSParser.R_BRACE)
                        pass
                    else:
                        raise NoViableAltException(self)

                    self.state = 455
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,39,self._ctx)
                    if la_ == 1:
                        self.state = 454
                        self.subexpr()

             
                self.state = 461
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,40,self._ctx)

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


    class Exp_nofuncContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def comp_nofunc(self):
            return self.getTypedRuleContext(PSParser.Comp_nofuncContext,0)


        def exp_nofunc(self):
            return self.getTypedRuleContext(PSParser.Exp_nofuncContext,0)


        def CARET(self):
            return self.getToken(PSParser.CARET, 0)

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


        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

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


        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def subexpr(self):
            return self.getTypedRuleContext(PSParser.SubexprContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_exp_nofunc

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

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



    def exp_nofunc(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = PSParser.Exp_nofuncContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 64
        self.enterRecursionRule(localctx, 64, self.RULE_exp_nofunc, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 463
            self.comp_nofunc()
            self._ctx.stop = self._input.LT(-1)
            self.state = 479
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,43,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = PSParser.Exp_nofuncContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_exp_nofunc)
                    self.state = 465
                    if not self.precpred(self._ctx, 2):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                    self.state = 466
                    self.match(PSParser.CARET)
                    self.state = 472
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 151, 155, 173, 174, 177, 178, 191, 192, 193, 194]:
                        self.state = 467
                        self.atom()
                        pass
                    elif token in [56]:
                        self.state = 468
                        self.match(PSParser.L_BRACE)
                        self.state = 469
                        self.expr()
                        self.state = 470
                        self.match(PSParser.R_BRACE)
                        pass
                    else:
                        raise NoViableAltException(self)

                    self.state = 475
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,42,self._ctx)
                    if la_ == 1:
                        self.state = 474
                        self.subexpr()

             
                self.state = 481
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,43,self._ctx)

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


    class CompContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def group(self):
            return self.getTypedRuleContext(PSParser.GroupContext,0)


        def norm_group(self):
            return self.getTypedRuleContext(PSParser.Norm_groupContext,0)


        def abs_group(self):
            return self.getTypedRuleContext(PSParser.Abs_groupContext,0)


        def floor_group(self):
            return self.getTypedRuleContext(PSParser.Floor_groupContext,0)


        def ceil_group(self):
            return self.getTypedRuleContext(PSParser.Ceil_groupContext,0)


        def func(self):
            return self.getTypedRuleContext(PSParser.FuncContext,0)


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


        def binom(self):
            return self.getTypedRuleContext(PSParser.BinomContext,0)


        def matrix(self):
            return self.getTypedRuleContext(PSParser.MatrixContext,0)


        def det(self):
            return self.getTypedRuleContext(PSParser.DetContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_comp

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

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




    def comp(self):

        localctx = PSParser.CompContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_comp)
        try:
            self.state = 492
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,44,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 482
                self.group()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 483
                self.norm_group()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 484
                self.abs_group()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 485
                self.floor_group()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 486
                self.ceil_group()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 487
                self.func()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 488
                self.atom()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 489
                self.binom()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 490
                self.matrix()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 491
                self.det()
                pass


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


    class Comp_nofuncContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def group(self):
            return self.getTypedRuleContext(PSParser.GroupContext,0)


        def norm_group(self):
            return self.getTypedRuleContext(PSParser.Norm_groupContext,0)


        def abs_group(self):
            return self.getTypedRuleContext(PSParser.Abs_groupContext,0)


        def floor_group(self):
            return self.getTypedRuleContext(PSParser.Floor_groupContext,0)


        def ceil_group(self):
            return self.getTypedRuleContext(PSParser.Ceil_groupContext,0)


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


        def binom(self):
            return self.getTypedRuleContext(PSParser.BinomContext,0)


        def matrix(self):
            return self.getTypedRuleContext(PSParser.MatrixContext,0)


        def det(self):
            return self.getTypedRuleContext(PSParser.DetContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_comp_nofunc

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

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




    def comp_nofunc(self):

        localctx = PSParser.Comp_nofuncContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_comp_nofunc)
        try:
            self.state = 503
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,45,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 494
                self.group()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 495
                self.norm_group()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 496
                self.abs_group()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 497
                self.floor_group()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 498
                self.ceil_group()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 499
                self.atom()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 500
                self.binom()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 501
                self.matrix()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 502
                self.det()
                pass


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


    class GroupContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def L_PAREN(self):
            return self.getToken(PSParser.L_PAREN, 0)

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


        def R_PAREN(self):
            return self.getToken(PSParser.R_PAREN, 0)

        def L_GROUP(self):
            return self.getToken(PSParser.L_GROUP, 0)

        def R_GROUP(self):
            return self.getToken(PSParser.R_GROUP, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def L_BRACE_VISUAL(self):
            return self.getToken(PSParser.L_BRACE_VISUAL, 0)

        def R_BRACE_VISUAL(self):
            return self.getToken(PSParser.R_BRACE_VISUAL, 0)

        def L_BRACE_CMD(self):
            return self.getToken(PSParser.L_BRACE_CMD, 0)

        def R_BRACE_CMD(self):
            return self.getToken(PSParser.R_BRACE_CMD, 0)

        def L_BRACKET(self):
            return self.getToken(PSParser.L_BRACKET, 0)

        def R_BRACKET(self):
            return self.getToken(PSParser.R_BRACKET, 0)

        def L_BRACK(self):
            return self.getToken(PSParser.L_BRACK, 0)

        def R_BRACK(self):
            return self.getToken(PSParser.R_BRACK, 0)

        def L_LEFT(self):
            return self.getToken(PSParser.L_LEFT, 0)

        def R_RIGHT(self):
            return self.getToken(PSParser.R_RIGHT, 0)

        def ML_LEFT(self):
            return self.getToken(PSParser.ML_LEFT, 0)

        def MR_RIGHT(self):
            return self.getToken(PSParser.MR_RIGHT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_group

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

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




    def group(self):

        localctx = PSParser.GroupContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_group)
        try:
            self.state = 617
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,46,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 505
                self.match(PSParser.L_PAREN)
                self.state = 506
                self.expr()
                self.state = 507
                self.match(PSParser.R_PAREN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 509
                self.match(PSParser.L_GROUP)
                self.state = 510
                self.expr()
                self.state = 511
                self.match(PSParser.R_GROUP)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 513
                self.match(PSParser.L_BRACE)
                self.state = 514
                self.expr()
                self.state = 515
                self.match(PSParser.R_BRACE)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 517
                self.match(PSParser.L_BRACE_VISUAL)
                self.state = 518
                self.expr()
                self.state = 519
                self.match(PSParser.R_BRACE_VISUAL)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 521
                self.match(PSParser.L_BRACE_CMD)
                self.state = 522
                self.expr()
                self.state = 523
                self.match(PSParser.R_BRACE_CMD)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 525
                self.match(PSParser.L_BRACKET)
                self.state = 526
                self.expr()
                self.state = 527
                self.match(PSParser.R_BRACKET)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 529
                self.match(PSParser.L_BRACK)
                self.state = 530
                self.expr()
                self.state = 531
                self.match(PSParser.R_BRACK)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 533
                self.match(PSParser.L_LEFT)
                self.state = 534
                self.match(PSParser.L_PAREN)
                self.state = 535
                self.expr()
                self.state = 536
                self.match(PSParser.R_RIGHT)
                self.state = 537
                self.match(PSParser.R_PAREN)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 539
                self.match(PSParser.L_LEFT)
                self.state = 540
                self.match(PSParser.L_GROUP)
                self.state = 541
                self.expr()
                self.state = 542
                self.match(PSParser.R_RIGHT)
                self.state = 543
                self.match(PSParser.R_GROUP)
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 545
                self.match(PSParser.L_LEFT)
                self.state = 546
                self.match(PSParser.L_BRACE)
                self.state = 547
                self.expr()
                self.state = 548
                self.match(PSParser.R_RIGHT)
                self.state = 549
                self.match(PSParser.R_BRACE)
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 551
                self.match(PSParser.L_LEFT)
                self.state = 552
                self.match(PSParser.L_BRACE_VISUAL)
                self.state = 553
                self.expr()
                self.state = 554
                self.match(PSParser.R_RIGHT)
                self.state = 555
                self.match(PSParser.R_BRACE_VISUAL)
                pass

            elif la_ == 12:
                self.enterOuterAlt(localctx, 12)
                self.state = 557
                self.match(PSParser.L_LEFT)
                self.state = 558
                self.match(PSParser.L_BRACE_CMD)
                self.state = 559
                self.expr()
                self.state = 560
                self.match(PSParser.R_RIGHT)
                self.state = 561
                self.match(PSParser.R_BRACE_CMD)
                pass

            elif la_ == 13:
                self.enterOuterAlt(localctx, 13)
                self.state = 563
                self.match(PSParser.L_LEFT)
                self.state = 564
                self.match(PSParser.L_BRACKET)
                self.state = 565
                self.expr()
                self.state = 566
                self.match(PSParser.R_RIGHT)
                self.state = 567
                self.match(PSParser.R_BRACKET)
                pass

            elif la_ == 14:
                self.enterOuterAlt(localctx, 14)
                self.state = 569
                self.match(PSParser.L_LEFT)
                self.state = 570
                self.match(PSParser.L_BRACK)
                self.state = 571
                self.expr()
                self.state = 572
                self.match(PSParser.R_RIGHT)
                self.state = 573
                self.match(PSParser.R_BRACK)
                pass

            elif la_ == 15:
                self.enterOuterAlt(localctx, 15)
                self.state = 575
                self.match(PSParser.ML_LEFT)
                self.state = 576
                self.match(PSParser.L_PAREN)
                self.state = 577
                self.expr()
                self.state = 578
                self.match(PSParser.MR_RIGHT)
                self.state = 579
                self.match(PSParser.R_PAREN)
                pass

            elif la_ == 16:
                self.enterOuterAlt(localctx, 16)
                self.state = 581
                self.match(PSParser.ML_LEFT)
                self.state = 582
                self.match(PSParser.L_GROUP)
                self.state = 583
                self.expr()
                self.state = 584
                self.match(PSParser.MR_RIGHT)
                self.state = 585
                self.match(PSParser.R_GROUP)
                pass

            elif la_ == 17:
                self.enterOuterAlt(localctx, 17)
                self.state = 587
                self.match(PSParser.ML_LEFT)
                self.state = 588
                self.match(PSParser.L_BRACE)
                self.state = 589
                self.expr()
                self.state = 590
                self.match(PSParser.MR_RIGHT)
                self.state = 591
                self.match(PSParser.R_BRACE)
                pass

            elif la_ == 18:
                self.enterOuterAlt(localctx, 18)
                self.state = 593
                self.match(PSParser.ML_LEFT)
                self.state = 594
                self.match(PSParser.L_BRACE_VISUAL)
                self.state = 595
                self.expr()
                self.state = 596
                self.match(PSParser.MR_RIGHT)
                self.state = 597
                self.match(PSParser.R_BRACE_VISUAL)
                pass

            elif la_ == 19:
                self.enterOuterAlt(localctx, 19)
                self.state = 599
                self.match(PSParser.ML_LEFT)
                self.state = 600
                self.match(PSParser.L_BRACE_CMD)
                self.state = 601
                self.expr()
                self.state = 602
                self.match(PSParser.MR_RIGHT)
                self.state = 603
                self.match(PSParser.R_BRACE_CMD)
                pass

            elif la_ == 20:
                self.enterOuterAlt(localctx, 20)
                self.state = 605
                self.match(PSParser.ML_LEFT)
                self.state = 606
                self.match(PSParser.L_BRACKET)
                self.state = 607
                self.expr()
                self.state = 608
                self.match(PSParser.MR_RIGHT)
                self.state = 609
                self.match(PSParser.R_BRACKET)
                pass

            elif la_ == 21:
                self.enterOuterAlt(localctx, 21)
                self.state = 611
                self.match(PSParser.ML_LEFT)
                self.state = 612
                self.match(PSParser.L_BRACK)
                self.state = 613
                self.expr()
                self.state = 614
                self.match(PSParser.MR_RIGHT)
                self.state = 615
                self.match(PSParser.R_BRACK)
                pass


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


    class Norm_groupContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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


        def L_LEFT(self):
            return self.getToken(PSParser.L_LEFT, 0)

        def R_RIGHT(self):
            return self.getToken(PSParser.R_RIGHT, 0)

        def ML_LEFT(self):
            return self.getToken(PSParser.ML_LEFT, 0)

        def MR_RIGHT(self):
            return self.getToken(PSParser.MR_RIGHT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_norm_group

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

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




    def norm_group(self):

        localctx = PSParser.Norm_groupContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_norm_group)
        try:
            self.state = 635
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [70]:
                self.enterOuterAlt(localctx, 1)
                self.state = 619
                self.match(PSParser.NORM)
                self.state = 620
                self.expr()
                self.state = 621
                self.match(PSParser.NORM)
                pass
            elif token in [79]:
                self.enterOuterAlt(localctx, 2)
                self.state = 623
                self.match(PSParser.L_LEFT)
                self.state = 624
                self.match(PSParser.NORM)
                self.state = 625
                self.expr()
                self.state = 626
                self.match(PSParser.R_RIGHT)
                self.state = 627
                self.match(PSParser.NORM)
                pass
            elif token in [81]:
                self.enterOuterAlt(localctx, 3)
                self.state = 629
                self.match(PSParser.ML_LEFT)
                self.state = 630
                self.match(PSParser.NORM)
                self.state = 631
                self.expr()
                self.state = 632
                self.match(PSParser.MR_RIGHT)
                self.state = 633
                self.match(PSParser.NORM)
                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 Abs_groupContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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


        def L_VERT(self):
            return self.getToken(PSParser.L_VERT, 0)

        def R_VERT(self):
            return self.getToken(PSParser.R_VERT, 0)

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

        def L_LEFT(self):
            return self.getToken(PSParser.L_LEFT, 0)

        def R_RIGHT(self):
            return self.getToken(PSParser.R_RIGHT, 0)

        def ML_LEFT(self):
            return self.getToken(PSParser.ML_LEFT, 0)

        def MR_RIGHT(self):
            return self.getToken(PSParser.MR_RIGHT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_abs_group

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

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




    def abs_group(self):

        localctx = PSParser.Abs_groupContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_abs_group)
        try:
            self.state = 685
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,48,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 637
                self.match(PSParser.BAR)
                self.state = 638
                self.expr()
                self.state = 639
                self.match(PSParser.BAR)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 641
                self.match(PSParser.L_VERT)
                self.state = 642
                self.expr()
                self.state = 643
                self.match(PSParser.R_VERT)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 645
                self.match(PSParser.VERT)
                self.state = 646
                self.expr()
                self.state = 647
                self.match(PSParser.VERT)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 649
                self.match(PSParser.L_LEFT)
                self.state = 650
                self.match(PSParser.BAR)
                self.state = 651
                self.expr()
                self.state = 652
                self.match(PSParser.R_RIGHT)
                self.state = 653
                self.match(PSParser.BAR)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 655
                self.match(PSParser.L_LEFT)
                self.state = 656
                self.match(PSParser.L_VERT)
                self.state = 657
                self.expr()
                self.state = 658
                self.match(PSParser.R_RIGHT)
                self.state = 659
                self.match(PSParser.R_VERT)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 661
                self.match(PSParser.L_LEFT)
                self.state = 662
                self.match(PSParser.VERT)
                self.state = 663
                self.expr()
                self.state = 664
                self.match(PSParser.R_RIGHT)
                self.state = 665
                self.match(PSParser.VERT)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 667
                self.match(PSParser.ML_LEFT)
                self.state = 668
                self.match(PSParser.BAR)
                self.state = 669
                self.expr()
                self.state = 670
                self.match(PSParser.MR_RIGHT)
                self.state = 671
                self.match(PSParser.BAR)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 673
                self.match(PSParser.ML_LEFT)
                self.state = 674
                self.match(PSParser.L_VERT)
                self.state = 675
                self.expr()
                self.state = 676
                self.match(PSParser.MR_RIGHT)
                self.state = 677
                self.match(PSParser.R_VERT)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 679
                self.match(PSParser.ML_LEFT)
                self.state = 680
                self.match(PSParser.VERT)
                self.state = 681
                self.expr()
                self.state = 682
                self.match(PSParser.MR_RIGHT)
                self.state = 683
                self.match(PSParser.VERT)
                pass


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


    class Floor_groupContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def L_FLOOR(self):
            return self.getToken(PSParser.L_FLOOR, 0)

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


        def R_FLOOR(self):
            return self.getToken(PSParser.R_FLOOR, 0)

        def LL_CORNER(self):
            return self.getToken(PSParser.LL_CORNER, 0)

        def LR_CORNER(self):
            return self.getToken(PSParser.LR_CORNER, 0)

        def L_LEFT(self):
            return self.getToken(PSParser.L_LEFT, 0)

        def R_RIGHT(self):
            return self.getToken(PSParser.R_RIGHT, 0)

        def ML_LEFT(self):
            return self.getToken(PSParser.ML_LEFT, 0)

        def MR_RIGHT(self):
            return self.getToken(PSParser.MR_RIGHT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_floor_group

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

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




    def floor_group(self):

        localctx = PSParser.Floor_groupContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_floor_group)
        try:
            self.state = 719
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,49,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 687
                self.match(PSParser.L_FLOOR)
                self.state = 688
                self.expr()
                self.state = 689
                self.match(PSParser.R_FLOOR)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 691
                self.match(PSParser.LL_CORNER)
                self.state = 692
                self.expr()
                self.state = 693
                self.match(PSParser.LR_CORNER)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 695
                self.match(PSParser.L_LEFT)
                self.state = 696
                self.match(PSParser.L_FLOOR)
                self.state = 697
                self.expr()
                self.state = 698
                self.match(PSParser.R_RIGHT)
                self.state = 699
                self.match(PSParser.R_FLOOR)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 701
                self.match(PSParser.L_LEFT)
                self.state = 702
                self.match(PSParser.LL_CORNER)
                self.state = 703
                self.expr()
                self.state = 704
                self.match(PSParser.R_RIGHT)
                self.state = 705
                self.match(PSParser.LR_CORNER)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 707
                self.match(PSParser.ML_LEFT)
                self.state = 708
                self.match(PSParser.L_FLOOR)
                self.state = 709
                self.expr()
                self.state = 710
                self.match(PSParser.MR_RIGHT)
                self.state = 711
                self.match(PSParser.R_FLOOR)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 713
                self.match(PSParser.ML_LEFT)
                self.state = 714
                self.match(PSParser.LL_CORNER)
                self.state = 715
                self.expr()
                self.state = 716
                self.match(PSParser.MR_RIGHT)
                self.state = 717
                self.match(PSParser.LR_CORNER)
                pass


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


    class Ceil_groupContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def L_CEIL(self):
            return self.getToken(PSParser.L_CEIL, 0)

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


        def R_CEIL(self):
            return self.getToken(PSParser.R_CEIL, 0)

        def UL_CORNER(self):
            return self.getToken(PSParser.UL_CORNER, 0)

        def UR_CORNER(self):
            return self.getToken(PSParser.UR_CORNER, 0)

        def L_LEFT(self):
            return self.getToken(PSParser.L_LEFT, 0)

        def R_RIGHT(self):
            return self.getToken(PSParser.R_RIGHT, 0)

        def ML_LEFT(self):
            return self.getToken(PSParser.ML_LEFT, 0)

        def MR_RIGHT(self):
            return self.getToken(PSParser.MR_RIGHT, 0)

        def getRuleIndex(self):
            return PSParser.RULE_ceil_group

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

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




    def ceil_group(self):

        localctx = PSParser.Ceil_groupContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_ceil_group)
        try:
            self.state = 753
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,50,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 721
                self.match(PSParser.L_CEIL)
                self.state = 722
                self.expr()
                self.state = 723
                self.match(PSParser.R_CEIL)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 725
                self.match(PSParser.UL_CORNER)
                self.state = 726
                self.expr()
                self.state = 727
                self.match(PSParser.UR_CORNER)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 729
                self.match(PSParser.L_LEFT)
                self.state = 730
                self.match(PSParser.L_CEIL)
                self.state = 731
                self.expr()
                self.state = 732
                self.match(PSParser.R_RIGHT)
                self.state = 733
                self.match(PSParser.R_CEIL)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 735
                self.match(PSParser.L_LEFT)
                self.state = 736
                self.match(PSParser.UL_CORNER)
                self.state = 737
                self.expr()
                self.state = 738
                self.match(PSParser.R_RIGHT)
                self.state = 739
                self.match(PSParser.UR_CORNER)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 741
                self.match(PSParser.ML_LEFT)
                self.state = 742
                self.match(PSParser.L_CEIL)
                self.state = 743
                self.expr()
                self.state = 744
                self.match(PSParser.MR_RIGHT)
                self.state = 745
                self.match(PSParser.R_CEIL)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 747
                self.match(PSParser.ML_LEFT)
                self.state = 748
                self.match(PSParser.UL_CORNER)
                self.state = 749
                self.expr()
                self.state = 750
                self.match(PSParser.MR_RIGHT)
                self.state = 751
                self.match(PSParser.UR_CORNER)
                pass


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


    class AccentContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def accent_symbol(self):
            return self.getTypedRuleContext(PSParser.Accent_symbolContext,0)


        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

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


        def getRuleIndex(self):
            return PSParser.RULE_accent

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

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




    def accent(self):

        localctx = PSParser.AccentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_accent)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 755
            self.accent_symbol()
            self.state = 756
            self.match(PSParser.L_BRACE)
            self.state = 757
            localctx.base = self.expr()
            self.state = 758
            self.match(PSParser.R_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Atom_expr_no_supexprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LETTER_NO_E(self):
            return self.getToken(PSParser.LETTER_NO_E, 0)

        def GREEK_CMD(self):
            return self.getToken(PSParser.GREEK_CMD, 0)

        def OTHER_SYMBOL_CMD(self):
            return self.getToken(PSParser.OTHER_SYMBOL_CMD, 0)

        def accent(self):
            return self.getTypedRuleContext(PSParser.AccentContext,0)


        def subexpr(self):
            return self.getTypedRuleContext(PSParser.SubexprContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_atom_expr_no_supexpr

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

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




    def atom_expr_no_supexpr(self):

        localctx = PSParser.Atom_expr_no_supexprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_atom_expr_no_supexpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 764
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [177]:
                self.state = 760
                self.match(PSParser.LETTER_NO_E)
                pass
            elif token in [191]:
                self.state = 761
                self.match(PSParser.GREEK_CMD)
                pass
            elif token in [192]:
                self.state = 762
                self.match(PSParser.OTHER_SYMBOL_CMD)
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 155]:
                self.state = 763
                self.accent()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 767
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==168:
                self.state = 766
                self.subexpr()


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


    class Atom_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LETTER_NO_E(self):
            return self.getToken(PSParser.LETTER_NO_E, 0)

        def GREEK_CMD(self):
            return self.getToken(PSParser.GREEK_CMD, 0)

        def OTHER_SYMBOL_CMD(self):
            return self.getToken(PSParser.OTHER_SYMBOL_CMD, 0)

        def accent(self):
            return self.getTypedRuleContext(PSParser.AccentContext,0)


        def supexpr(self):
            return self.getTypedRuleContext(PSParser.SupexprContext,0)


        def subexpr(self):
            return self.getTypedRuleContext(PSParser.SubexprContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_atom_expr

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

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




    def atom_expr(self):

        localctx = PSParser.Atom_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_atom_expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 773
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [177]:
                self.state = 769
                self.match(PSParser.LETTER_NO_E)
                pass
            elif token in [191]:
                self.state = 770
                self.match(PSParser.GREEK_CMD)
                pass
            elif token in [192]:
                self.state = 771
                self.match(PSParser.OTHER_SYMBOL_CMD)
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 155]:
                self.state = 772
                self.accent()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 783
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,54,self._ctx)
            if la_ == 1:
                self.state = 775
                self.supexpr()
                self.state = 776
                self.subexpr()

            elif la_ == 2:
                self.state = 778
                self.subexpr()
                self.state = 779
                self.supexpr()

            elif la_ == 3:
                self.state = 781
                self.subexpr()

            elif la_ == 4:
                self.state = 782
                self.supexpr()


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


    class AtomContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def atom_expr(self):
            return self.getTypedRuleContext(PSParser.Atom_exprContext,0)


        def SYMBOL(self):
            return self.getToken(PSParser.SYMBOL, 0)

        def e_notation(self):
            return self.getTypedRuleContext(PSParser.E_notationContext,0)


        def percent_number(self):
            return self.getTypedRuleContext(PSParser.Percent_numberContext,0)


        def number(self):
            return self.getTypedRuleContext(PSParser.NumberContext,0)


        def DIFFERENTIAL(self):
            return self.getToken(PSParser.DIFFERENTIAL, 0)

        def mathit(self):
            return self.getTypedRuleContext(PSParser.MathitContext,0)


        def frac(self):
            return self.getTypedRuleContext(PSParser.FracContext,0)


        def VARIABLE(self):
            return self.getToken(PSParser.VARIABLE, 0)

        def getRuleIndex(self):
            return PSParser.RULE_atom

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

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




    def atom(self):

        localctx = PSParser.AtomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_atom)
        try:
            self.state = 794
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,55,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 785
                self.atom_expr()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 786
                self.match(PSParser.SYMBOL)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 787
                self.e_notation()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 788
                self.percent_number()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 789
                self.number()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 790
                self.match(PSParser.DIFFERENTIAL)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 791
                self.mathit()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 792
                self.frac()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 793
                self.match(PSParser.VARIABLE)
                pass


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


    class MathitContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CMD_MATHIT(self):
            return self.getToken(PSParser.CMD_MATHIT, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def mathit_text(self):
            return self.getTypedRuleContext(PSParser.Mathit_textContext,0)


        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def getRuleIndex(self):
            return PSParser.RULE_mathit

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

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




    def mathit(self):

        localctx = PSParser.MathitContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_mathit)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 796
            self.match(PSParser.CMD_MATHIT)
            self.state = 797
            self.match(PSParser.L_BRACE)
            self.state = 798
            self.mathit_text()
            self.state = 799
            self.match(PSParser.R_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Mathit_textContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

        def getRuleIndex(self):
            return PSParser.RULE_mathit_text

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

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




    def mathit_text(self):

        localctx = PSParser.Mathit_textContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_mathit_text)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 802 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 801
                _la = self._input.LA(1)
                if not((((_la - 175)) & ~0x3f) == 0 and ((1 << (_la - 175)) & 7) != 0):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 804 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la - 175)) & ~0x3f) == 0 and ((1 << (_la - 175)) & 7) != 0):
                    break

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


    class FracContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.upperd = None # Token
            self.upper = None # ExprContext
            self.lowerd = None # Token
            self.lower = None # ExprContext

        def CMD_FRAC(self):
            return self.getToken(PSParser.CMD_FRAC, 0)

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

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

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

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


        def getRuleIndex(self):
            return PSParser.RULE_frac

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

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




    def frac(self):

        localctx = PSParser.FracContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_frac)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 806
            self.match(PSParser.CMD_FRAC)
            self.state = 812
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [178]:
                self.state = 807
                localctx.upperd = self.match(PSParser.DIGIT)
                pass
            elif token in [56]:
                self.state = 808
                self.match(PSParser.L_BRACE)
                self.state = 809
                localctx.upper = self.expr()
                self.state = 810
                self.match(PSParser.R_BRACE)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 819
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [178]:
                self.state = 814
                localctx.lowerd = self.match(PSParser.DIGIT)
                pass
            elif token in [56]:
                self.state = 815
                self.match(PSParser.L_BRACE)
                self.state = 816
                localctx.lower = self.expr()
                self.state = 817
                self.match(PSParser.R_BRACE)
                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 BinomContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def CMD_CHOOSE(self):
            return self.getToken(PSParser.CMD_CHOOSE, 0)

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

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


        def CMD_BINOM(self):
            return self.getToken(PSParser.CMD_BINOM, 0)

        def getRuleIndex(self):
            return PSParser.RULE_binom

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

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




    def binom(self):

        localctx = PSParser.BinomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_binom)
        try:
            self.state = 835
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [56]:
                self.enterOuterAlt(localctx, 1)
                self.state = 821
                self.match(PSParser.L_BRACE)
                self.state = 822
                localctx.upper = self.expr()
                self.state = 823
                self.match(PSParser.CMD_CHOOSE)
                self.state = 824
                localctx.lower = self.expr()
                self.state = 825
                self.match(PSParser.R_BRACE)
                pass
            elif token in [152]:
                self.enterOuterAlt(localctx, 2)
                self.state = 827
                self.match(PSParser.CMD_BINOM)
                self.state = 828
                self.match(PSParser.L_BRACE)
                self.state = 829
                localctx.upper = self.expr()
                self.state = 830
                self.match(PSParser.R_BRACE)
                self.state = 831
                self.match(PSParser.L_BRACE)
                self.state = 832
                localctx.lower = self.expr()
                self.state = 833
                self.match(PSParser.R_BRACE)
                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 Func_normal_functions_single_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FUNC_LOG(self):
            return self.getToken(PSParser.FUNC_LOG, 0)

        def FUNC_LN(self):
            return self.getToken(PSParser.FUNC_LN, 0)

        def FUNC_EXP(self):
            return self.getToken(PSParser.FUNC_EXP, 0)

        def FUNC_SIN(self):
            return self.getToken(PSParser.FUNC_SIN, 0)

        def FUNC_COS(self):
            return self.getToken(PSParser.FUNC_COS, 0)

        def FUNC_TAN(self):
            return self.getToken(PSParser.FUNC_TAN, 0)

        def FUNC_CSC(self):
            return self.getToken(PSParser.FUNC_CSC, 0)

        def FUNC_SEC(self):
            return self.getToken(PSParser.FUNC_SEC, 0)

        def FUNC_COT(self):
            return self.getToken(PSParser.FUNC_COT, 0)

        def FUNC_ARCSIN(self):
            return self.getToken(PSParser.FUNC_ARCSIN, 0)

        def FUNC_ARCCOS(self):
            return self.getToken(PSParser.FUNC_ARCCOS, 0)

        def FUNC_ARCTAN(self):
            return self.getToken(PSParser.FUNC_ARCTAN, 0)

        def FUNC_ARCCSC(self):
            return self.getToken(PSParser.FUNC_ARCCSC, 0)

        def FUNC_ARCSEC(self):
            return self.getToken(PSParser.FUNC_ARCSEC, 0)

        def FUNC_ARCCOT(self):
            return self.getToken(PSParser.FUNC_ARCCOT, 0)

        def FUNC_SINH(self):
            return self.getToken(PSParser.FUNC_SINH, 0)

        def FUNC_COSH(self):
            return self.getToken(PSParser.FUNC_COSH, 0)

        def FUNC_TANH(self):
            return self.getToken(PSParser.FUNC_TANH, 0)

        def FUNC_ARSINH(self):
            return self.getToken(PSParser.FUNC_ARSINH, 0)

        def FUNC_ARCOSH(self):
            return self.getToken(PSParser.FUNC_ARCOSH, 0)

        def FUNC_ARTANH(self):
            return self.getToken(PSParser.FUNC_ARTANH, 0)

        def FUNC_ARCSINH(self):
            return self.getToken(PSParser.FUNC_ARCSINH, 0)

        def FUNC_ARCCOSH(self):
            return self.getToken(PSParser.FUNC_ARCCOSH, 0)

        def FUNC_ARCTANH(self):
            return self.getToken(PSParser.FUNC_ARCTANH, 0)

        def FUNC_FLOOR(self):
            return self.getToken(PSParser.FUNC_FLOOR, 0)

        def FUNC_CEIL(self):
            return self.getToken(PSParser.FUNC_CEIL, 0)

        def FUNC_DET(self):
            return self.getToken(PSParser.FUNC_DET, 0)

        def getRuleIndex(self):
            return PSParser.RULE_func_normal_functions_single_arg

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

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




    def func_normal_functions_single_arg(self):

        localctx = PSParser.Func_normal_functions_single_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_func_normal_functions_single_arg)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 837
            _la = self._input.LA(1)
            if not((((_la - 88)) & ~0x3f) == 0 and ((1 << (_la - 88)) & 2611356893183) != 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 Func_normal_functions_multi_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FUNC_GCD(self):
            return self.getToken(PSParser.FUNC_GCD, 0)

        def FUNC_LCM(self):
            return self.getToken(PSParser.FUNC_LCM, 0)

        def FUNC_MAX(self):
            return self.getToken(PSParser.FUNC_MAX, 0)

        def FUNC_MIN(self):
            return self.getToken(PSParser.FUNC_MIN, 0)

        def getRuleIndex(self):
            return PSParser.RULE_func_normal_functions_multi_arg

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

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




    def func_normal_functions_multi_arg(self):

        localctx = PSParser.Func_normal_functions_multi_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_func_normal_functions_multi_arg)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 839
            _la = self._input.LA(1)
            if not((((_la - 123)) & ~0x3f) == 0 and ((1 << (_la - 123)) & 51) != 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 Func_operator_names_single_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FUNC_ARSINH_NAME(self):
            return self.getToken(PSParser.FUNC_ARSINH_NAME, 0)

        def FUNC_ARCOSH_NAME(self):
            return self.getToken(PSParser.FUNC_ARCOSH_NAME, 0)

        def FUNC_ARTANH_NAME(self):
            return self.getToken(PSParser.FUNC_ARTANH_NAME, 0)

        def FUNC_ARCSINH_NAME(self):
            return self.getToken(PSParser.FUNC_ARCSINH_NAME, 0)

        def FUNC_ARCCOSH_NAME(self):
            return self.getToken(PSParser.FUNC_ARCCOSH_NAME, 0)

        def FUNC_ARCTANH_NAME(self):
            return self.getToken(PSParser.FUNC_ARCTANH_NAME, 0)

        def FUNC_FLOOR_NAME(self):
            return self.getToken(PSParser.FUNC_FLOOR_NAME, 0)

        def FUNC_CEIL_NAME(self):
            return self.getToken(PSParser.FUNC_CEIL_NAME, 0)

        def FUNC_EYE_NAME(self):
            return self.getToken(PSParser.FUNC_EYE_NAME, 0)

        def FUNC_RANK_NAME(self):
            return self.getToken(PSParser.FUNC_RANK_NAME, 0)

        def FUNC_TRACE_NAME(self):
            return self.getToken(PSParser.FUNC_TRACE_NAME, 0)

        def FUNC_RREF_NAME(self):
            return self.getToken(PSParser.FUNC_RREF_NAME, 0)

        def FUNC_NULLSPACE_NAME(self):
            return self.getToken(PSParser.FUNC_NULLSPACE_NAME, 0)

        def FUNC_DIAGONALIZE_NAME(self):
            return self.getToken(PSParser.FUNC_DIAGONALIZE_NAME, 0)

        def FUNC_NORM_NAME(self):
            return self.getToken(PSParser.FUNC_NORM_NAME, 0)

        def FUNC_EIGENVALS_NAME(self):
            return self.getToken(PSParser.FUNC_EIGENVALS_NAME, 0)

        def FUNC_EIGENVECTORS_NAME(self):
            return self.getToken(PSParser.FUNC_EIGENVECTORS_NAME, 0)

        def FUNC_SVD_NAME(self):
            return self.getToken(PSParser.FUNC_SVD_NAME, 0)

        def FUNC_COLS_NAME(self):
            return self.getToken(PSParser.FUNC_COLS_NAME, 0)

        def FUNC_ROWS_NAME(self):
            return self.getToken(PSParser.FUNC_ROWS_NAME, 0)

        def getRuleIndex(self):
            return PSParser.RULE_func_operator_names_single_arg

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

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




    def func_operator_names_single_arg(self):

        localctx = PSParser.Func_operator_names_single_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_func_operator_names_single_arg)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 841
            _la = self._input.LA(1)
            if not((((_la - 112)) & ~0x3f) == 0 and ((1 << (_la - 112)) & 66830205759) != 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 Func_operator_names_multi_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FUNC_GCD_NAME(self):
            return self.getToken(PSParser.FUNC_GCD_NAME, 0)

        def FUNC_LCM_NAME(self):
            return self.getToken(PSParser.FUNC_LCM_NAME, 0)

        def FUNC_ZEROS_NAME(self):
            return self.getToken(PSParser.FUNC_ZEROS_NAME, 0)

        def FUNC_ORTHOGONALIZE_NAME(self):
            return self.getToken(PSParser.FUNC_ORTHOGONALIZE_NAME, 0)

        def FUNC_ONES_NAME(self):
            return self.getToken(PSParser.FUNC_ONES_NAME, 0)

        def FUNC_DIAG_NAME(self):
            return self.getToken(PSParser.FUNC_DIAG_NAME, 0)

        def FUNC_HSTACK_NAME(self):
            return self.getToken(PSParser.FUNC_HSTACK_NAME, 0)

        def FUNC_VSTACK_NAME(self):
            return self.getToken(PSParser.FUNC_VSTACK_NAME, 0)

        def getRuleIndex(self):
            return PSParser.RULE_func_operator_names_multi_arg

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

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




    def func_operator_names_multi_arg(self):

        localctx = PSParser.Func_operator_names_multi_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_func_operator_names_multi_arg)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 843
            _la = self._input.LA(1)
            if not((((_la - 118)) & ~0x3f) == 0 and ((1 << (_la - 118)) & 29515779) != 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 Func_normal_single_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def func_normal_functions_single_arg(self):
            return self.getTypedRuleContext(PSParser.Func_normal_functions_single_argContext,0)


        def CMD_OPERATORNAME(self):
            return self.getToken(PSParser.CMD_OPERATORNAME, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def func_operator_names_single_arg(self):
            return self.getTypedRuleContext(PSParser.Func_operator_names_single_argContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_func_normal_single_arg

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

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




    def func_normal_single_arg(self):

        localctx = PSParser.Func_normal_single_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_func_normal_single_arg)
        try:
            self.state = 851
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 125, 126, 129]:
                self.enterOuterAlt(localctx, 1)
                self.state = 845
                self.func_normal_functions_single_arg()
                pass
            elif token in [156]:
                self.enterOuterAlt(localctx, 2)
                self.state = 846
                self.match(PSParser.CMD_OPERATORNAME)
                self.state = 847
                self.match(PSParser.L_BRACE)
                self.state = 848
                localctx.func_operator_name = self.func_operator_names_single_arg()
                self.state = 849
                self.match(PSParser.R_BRACE)
                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 Func_normal_multi_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def func_normal_functions_multi_arg(self):
            return self.getTypedRuleContext(PSParser.Func_normal_functions_multi_argContext,0)


        def CMD_OPERATORNAME(self):
            return self.getToken(PSParser.CMD_OPERATORNAME, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def func_operator_names_multi_arg(self):
            return self.getTypedRuleContext(PSParser.Func_operator_names_multi_argContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_func_normal_multi_arg

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

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




    def func_normal_multi_arg(self):

        localctx = PSParser.Func_normal_multi_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_func_normal_multi_arg)
        try:
            self.state = 859
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [123, 124, 127, 128]:
                self.enterOuterAlt(localctx, 1)
                self.state = 853
                self.func_normal_functions_multi_arg()
                pass
            elif token in [156]:
                self.enterOuterAlt(localctx, 2)
                self.state = 854
                self.match(PSParser.CMD_OPERATORNAME)
                self.state = 855
                self.match(PSParser.L_BRACE)
                self.state = 856
                localctx.func_operator_name = self.func_operator_names_multi_arg()
                self.state = 857
                self.match(PSParser.R_BRACE)
                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 FuncContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.root = None # ExprContext
            self.base_d = None # Token
            self.base = None # ExprContext

        def func_normal_single_arg(self):
            return self.getTypedRuleContext(PSParser.Func_normal_single_argContext,0)


        def L_PAREN(self):
            return self.getToken(PSParser.L_PAREN, 0)

        def func_single_arg(self):
            return self.getTypedRuleContext(PSParser.Func_single_argContext,0)


        def R_PAREN(self):
            return self.getToken(PSParser.R_PAREN, 0)

        def func_single_arg_noparens(self):
            return self.getTypedRuleContext(PSParser.Func_single_arg_noparensContext,0)


        def subexpr(self):
            return self.getTypedRuleContext(PSParser.SubexprContext,0)


        def supexpr(self):
            return self.getTypedRuleContext(PSParser.SupexprContext,0)


        def L_LEFT(self):
            return self.getToken(PSParser.L_LEFT, 0)

        def R_RIGHT(self):
            return self.getToken(PSParser.R_RIGHT, 0)

        def ML_LEFT(self):
            return self.getToken(PSParser.ML_LEFT, 0)

        def MR_RIGHT(self):
            return self.getToken(PSParser.MR_RIGHT, 0)

        def func_normal_multi_arg(self):
            return self.getTypedRuleContext(PSParser.Func_normal_multi_argContext,0)


        def func_multi_arg(self):
            return self.getTypedRuleContext(PSParser.Func_multi_argContext,0)


        def func_multi_arg_noparens(self):
            return self.getTypedRuleContext(PSParser.Func_multi_arg_noparensContext,0)


        def atom_expr_no_supexpr(self):
            return self.getTypedRuleContext(PSParser.Atom_expr_no_supexprContext,0)


        def func_common_args(self):
            return self.getTypedRuleContext(PSParser.Func_common_argsContext,0)


        def L_BRACKET(self):
            return self.getToken(PSParser.L_BRACKET, 0)

        def R_BRACKET(self):
            return self.getToken(PSParser.R_BRACKET, 0)

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

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

        def FUNC_INT(self):
            return self.getToken(PSParser.FUNC_INT, 0)

        def DIFFERENTIAL(self):
            return self.getToken(PSParser.DIFFERENTIAL, 0)

        def frac(self):
            return self.getTypedRuleContext(PSParser.FracContext,0)


        def additive(self):
            return self.getTypedRuleContext(PSParser.AdditiveContext,0)


        def UNDERSCORE(self):
            return self.getToken(PSParser.UNDERSCORE, 0)

        def CARET(self):
            return self.getToken(PSParser.CARET, 0)

        def FUNC_SQRT(self):
            return self.getToken(PSParser.FUNC_SQRT, 0)

        def DIGIT(self):
            return self.getToken(PSParser.DIGIT, 0)

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


        def mp(self):
            return self.getTypedRuleContext(PSParser.MpContext,0)


        def FUNC_SUM(self):
            return self.getToken(PSParser.FUNC_SUM, 0)

        def FUNC_PROD(self):
            return self.getToken(PSParser.FUNC_PROD, 0)

        def subeq(self):
            return self.getTypedRuleContext(PSParser.SubeqContext,0)


        def FUNC_LIM(self):
            return self.getToken(PSParser.FUNC_LIM, 0)

        def limit_sub(self):
            return self.getTypedRuleContext(PSParser.Limit_subContext,0)


        def EXP_E(self):
            return self.getToken(PSParser.EXP_E, 0)

        def getRuleIndex(self):
            return PSParser.RULE_func

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

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




    def func(self):

        localctx = PSParser.FuncContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_func)
        self._la = 0 # Token type
        try:
            self.state = 1030
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,95,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 861
                self.func_normal_single_arg()
                self.state = 874
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,66,self._ctx)
                if la_ == 1:
                    self.state = 863
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==168:
                        self.state = 862
                        self.subexpr()


                    self.state = 866
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==169:
                        self.state = 865
                        self.supexpr()


                    pass

                elif la_ == 2:
                    self.state = 869
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==169:
                        self.state = 868
                        self.supexpr()


                    self.state = 872
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==168:
                        self.state = 871
                        self.subexpr()


                    pass


                self.state = 897
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,71,self._ctx)
                if la_ == 1:
                    self.state = 877
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==79:
                        self.state = 876
                        self.match(PSParser.L_LEFT)


                    self.state = 879
                    self.match(PSParser.L_PAREN)
                    self.state = 880
                    self.func_single_arg()
                    self.state = 882
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==80:
                        self.state = 881
                        self.match(PSParser.R_RIGHT)


                    self.state = 884
                    self.match(PSParser.R_PAREN)
                    pass

                elif la_ == 2:
                    self.state = 887
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==81:
                        self.state = 886
                        self.match(PSParser.ML_LEFT)


                    self.state = 889
                    self.match(PSParser.L_PAREN)
                    self.state = 890
                    self.func_single_arg()
                    self.state = 892
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==82:
                        self.state = 891
                        self.match(PSParser.MR_RIGHT)


                    self.state = 894
                    self.match(PSParser.R_PAREN)
                    pass

                elif la_ == 3:
                    self.state = 896
                    self.func_single_arg_noparens()
                    pass


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 899
                self.func_normal_multi_arg()
                self.state = 912
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,76,self._ctx)
                if la_ == 1:
                    self.state = 901
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==168:
                        self.state = 900
                        self.subexpr()


                    self.state = 904
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==169:
                        self.state = 903
                        self.supexpr()


                    pass

                elif la_ == 2:
                    self.state = 907
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==169:
                        self.state = 906
                        self.supexpr()


                    self.state = 910
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==168:
                        self.state = 909
                        self.subexpr()


                    pass


                self.state = 935
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,81,self._ctx)
                if la_ == 1:
                    self.state = 915
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==79:
                        self.state = 914
                        self.match(PSParser.L_LEFT)


                    self.state = 917
                    self.match(PSParser.L_PAREN)
                    self.state = 918
                    self.func_multi_arg()
                    self.state = 920
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==80:
                        self.state = 919
                        self.match(PSParser.R_RIGHT)


                    self.state = 922
                    self.match(PSParser.R_PAREN)
                    pass

                elif la_ == 2:
                    self.state = 925
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==81:
                        self.state = 924
                        self.match(PSParser.ML_LEFT)


                    self.state = 927
                    self.match(PSParser.L_PAREN)
                    self.state = 928
                    self.func_multi_arg()
                    self.state = 930
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==82:
                        self.state = 929
                        self.match(PSParser.MR_RIGHT)


                    self.state = 932
                    self.match(PSParser.R_PAREN)
                    pass

                elif la_ == 3:
                    self.state = 934
                    self.func_multi_arg_noparens()
                    pass


                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 937
                self.atom_expr_no_supexpr()
                self.state = 939
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==169:
                    self.state = 938
                    self.supexpr()


                self.state = 942
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==79:
                    self.state = 941
                    self.match(PSParser.L_LEFT)


                self.state = 944
                _la = self._input.LA(1)
                if not(_la==52 or _la==62):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 945
                self.func_common_args()
                self.state = 946
                _la = self._input.LA(1)
                if not(_la==53 or _la==63):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 948
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,84,self._ctx)
                if la_ == 1:
                    self.state = 947
                    self.match(PSParser.R_RIGHT)


                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 950
                self.atom_expr_no_supexpr()
                self.state = 952
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==169:
                    self.state = 951
                    self.supexpr()


                self.state = 954
                self.match(PSParser.L_BRACE)
                self.state = 956
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==79:
                    self.state = 955
                    self.match(PSParser.L_LEFT)


                self.state = 958
                _la = self._input.LA(1)
                if not(_la==52 or _la==62):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 959
                self.func_common_args()
                self.state = 960
                _la = self._input.LA(1)
                if not(_la==53 or _la==63):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 962
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 961
                    self.match(PSParser.R_RIGHT)


                self.state = 964
                self.match(PSParser.R_BRACE)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 966
                self.match(PSParser.FUNC_INT)
                self.state = 987
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,88,self._ctx)
                if la_ == 1:
                    self.state = 967
                    self.subexpr()
                    self.state = 968
                    self.supexpr()

                elif la_ == 2:
                    self.state = 970
                    self.supexpr()
                    self.state = 971
                    self.subexpr()

                elif la_ == 3:
                    self.state = 973
                    self.match(PSParser.UNDERSCORE)
                    self.state = 974
                    self.match(PSParser.L_BRACE)
                    self.state = 975
                    self.match(PSParser.R_BRACE)

                    self.state = 977
                    self.match(PSParser.CARET)
                    self.state = 978
                    self.match(PSParser.L_BRACE)
                    self.state = 979
                    self.match(PSParser.R_BRACE)

                elif la_ == 4:
                    self.state = 980
                    self.match(PSParser.CARET)
                    self.state = 981
                    self.match(PSParser.L_BRACE)
                    self.state = 982
                    self.match(PSParser.R_BRACE)

                    self.state = 984
                    self.match(PSParser.UNDERSCORE)
                    self.state = 985
                    self.match(PSParser.L_BRACE)
                    self.state = 986
                    self.match(PSParser.R_BRACE)


                self.state = 995
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,90,self._ctx)
                if la_ == 1:
                    self.state = 990
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,89,self._ctx)
                    if la_ == 1:
                        self.state = 989
                        self.additive(0)


                    self.state = 992
                    self.match(PSParser.DIFFERENTIAL)
                    pass

                elif la_ == 2:
                    self.state = 993
                    self.frac()
                    pass

                elif la_ == 3:
                    self.state = 994
                    self.additive(0)
                    pass


                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 997
                self.match(PSParser.FUNC_SQRT)
                self.state = 1002
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==62:
                    self.state = 998
                    self.match(PSParser.L_BRACKET)
                    self.state = 999
                    localctx.root = self.expr()
                    self.state = 1000
                    self.match(PSParser.R_BRACKET)


                self.state = 1009
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [178]:
                    self.state = 1004
                    localctx.base_d = self.match(PSParser.DIGIT)
                    pass
                elif token in [56]:
                    self.state = 1005
                    self.match(PSParser.L_BRACE)
                    self.state = 1006
                    localctx.base = self.expr()
                    self.state = 1007
                    self.match(PSParser.R_BRACE)
                    pass
                else:
                    raise NoViableAltException(self)

                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 1011
                _la = self._input.LA(1)
                if not(_la==86 or _la==87):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 1018
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [168]:
                    self.state = 1012
                    self.subeq()
                    self.state = 1013
                    self.supexpr()
                    pass
                elif token in [169]:
                    self.state = 1015
                    self.supexpr()
                    self.state = 1016
                    self.subeq()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 1020
                self.mp(0)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 1022
                self.match(PSParser.FUNC_LIM)
                self.state = 1023
                self.limit_sub()
                self.state = 1024
                self.mp(0)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 1026
                self.match(PSParser.EXP_E)
                self.state = 1028
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,94,self._ctx)
                if la_ == 1:
                    self.state = 1027
                    self.supexpr()


                pass


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


    class ArgsContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


        def COMMA(self):
            return self.getToken(PSParser.COMMA, 0)

        def args(self):
            return self.getTypedRuleContext(PSParser.ArgsContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_args

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

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




    def args(self):

        localctx = PSParser.ArgsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_args)
        try:
            self.state = 1037
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,96,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1032
                self.expr()
                self.state = 1033
                self.match(PSParser.COMMA)
                self.state = 1034
                self.args()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1036
                self.expr()
                pass


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


    class Func_common_argsContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


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


        def COMMA(self):
            return self.getToken(PSParser.COMMA, 0)

        def args(self):
            return self.getTypedRuleContext(PSParser.ArgsContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_func_common_args

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

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




    def func_common_args(self):

        localctx = PSParser.Func_common_argsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_func_common_args)
        try:
            self.state = 1047
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,97,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1039
                self.atom()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1040
                self.expr()
                self.state = 1041
                self.match(PSParser.COMMA)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1043
                self.expr()
                self.state = 1044
                self.match(PSParser.COMMA)
                self.state = 1045
                self.args()
                pass


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


    class Limit_subContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def UNDERSCORE(self):
            return self.getToken(PSParser.UNDERSCORE, 0)

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

        def LIM_APPROACH_SYM(self):
            return self.getToken(PSParser.LIM_APPROACH_SYM, 0)

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


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

        def LETTER_NO_E(self):
            return self.getToken(PSParser.LETTER_NO_E, 0)

        def GREEK_CMD(self):
            return self.getToken(PSParser.GREEK_CMD, 0)

        def OTHER_SYMBOL_CMD(self):
            return self.getToken(PSParser.OTHER_SYMBOL_CMD, 0)

        def CARET(self):
            return self.getToken(PSParser.CARET, 0)

        def ADD(self):
            return self.getToken(PSParser.ADD, 0)

        def SUB(self):
            return self.getToken(PSParser.SUB, 0)

        def getRuleIndex(self):
            return PSParser.RULE_limit_sub

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

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




    def limit_sub(self):

        localctx = PSParser.Limit_subContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_limit_sub)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1049
            self.match(PSParser.UNDERSCORE)
            self.state = 1050
            self.match(PSParser.L_BRACE)
            self.state = 1051
            _la = self._input.LA(1)
            if not((((_la - 177)) & ~0x3f) == 0 and ((1 << (_la - 177)) & 49153) != 0):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 1052
            self.match(PSParser.LIM_APPROACH_SYM)
            self.state = 1053
            self.expr()
            self.state = 1058
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==169:
                self.state = 1054
                self.match(PSParser.CARET)
                self.state = 1055
                self.match(PSParser.L_BRACE)
                self.state = 1056
                _la = self._input.LA(1)
                if not(_la==48 or _la==49):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 1057
                self.match(PSParser.R_BRACE)


            self.state = 1060
            self.match(PSParser.R_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Func_single_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


        def getRuleIndex(self):
            return PSParser.RULE_func_single_arg

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

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




    def func_single_arg(self):

        localctx = PSParser.Func_single_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_func_single_arg)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1062
            self.expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Func_single_arg_noparensContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def mp_nofunc(self):
            return self.getTypedRuleContext(PSParser.Mp_nofuncContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_func_single_arg_noparens

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

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




    def func_single_arg_noparens(self):

        localctx = PSParser.Func_single_arg_noparensContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_func_single_arg_noparens)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1064
            self.mp_nofunc(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Func_multi_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


        def COMMA(self):
            return self.getToken(PSParser.COMMA, 0)

        def func_multi_arg(self):
            return self.getTypedRuleContext(PSParser.Func_multi_argContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_func_multi_arg

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

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




    def func_multi_arg(self):

        localctx = PSParser.Func_multi_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_func_multi_arg)
        try:
            self.state = 1071
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,99,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1066
                self.expr()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1067
                self.expr()
                self.state = 1068
                self.match(PSParser.COMMA)
                self.state = 1069
                self.func_multi_arg()
                pass


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


    class Func_multi_arg_noparensContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def mp_nofunc(self):
            return self.getTypedRuleContext(PSParser.Mp_nofuncContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_func_multi_arg_noparens

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

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




    def func_multi_arg_noparens(self):

        localctx = PSParser.Func_multi_arg_noparensContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_func_multi_arg_noparens)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1073
            self.mp_nofunc(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SubexprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def UNDERSCORE(self):
            return self.getToken(PSParser.UNDERSCORE, 0)

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


        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

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


        def args(self):
            return self.getTypedRuleContext(PSParser.ArgsContext,0)


        def getRuleIndex(self):
            return PSParser.RULE_subexpr

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

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




    def subexpr(self):

        localctx = PSParser.SubexprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_subexpr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1075
            self.match(PSParser.UNDERSCORE)
            self.state = 1084
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 151, 155, 173, 174, 177, 178, 191, 192, 193, 194]:
                self.state = 1076
                self.atom()
                pass
            elif token in [56]:
                self.state = 1077
                self.match(PSParser.L_BRACE)
                self.state = 1080
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,100,self._ctx)
                if la_ == 1:
                    self.state = 1078
                    self.expr()
                    pass

                elif la_ == 2:
                    self.state = 1079
                    self.args()
                    pass


                self.state = 1082
                self.match(PSParser.R_BRACE)
                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 SupexprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CARET(self):
            return self.getToken(PSParser.CARET, 0)

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


        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

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


        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def getRuleIndex(self):
            return PSParser.RULE_supexpr

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

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




    def supexpr(self):

        localctx = PSParser.SupexprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_supexpr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1086
            self.match(PSParser.CARET)
            self.state = 1092
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 151, 155, 173, 174, 177, 178, 191, 192, 193, 194]:
                self.state = 1087
                self.atom()
                pass
            elif token in [56]:
                self.state = 1088
                self.match(PSParser.L_BRACE)
                self.state = 1089
                self.expr()
                self.state = 1090
                self.match(PSParser.R_BRACE)
                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 SubeqContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def UNDERSCORE(self):
            return self.getToken(PSParser.UNDERSCORE, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def equality(self):
            return self.getTypedRuleContext(PSParser.EqualityContext,0)


        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def getRuleIndex(self):
            return PSParser.RULE_subeq

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

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




    def subeq(self):

        localctx = PSParser.SubeqContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_subeq)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1094
            self.match(PSParser.UNDERSCORE)
            self.state = 1095
            self.match(PSParser.L_BRACE)
            self.state = 1096
            self.equality()
            self.state = 1097
            self.match(PSParser.R_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SupeqContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def UNDERSCORE(self):
            return self.getToken(PSParser.UNDERSCORE, 0)

        def L_BRACE(self):
            return self.getToken(PSParser.L_BRACE, 0)

        def equality(self):
            return self.getTypedRuleContext(PSParser.EqualityContext,0)


        def R_BRACE(self):
            return self.getToken(PSParser.R_BRACE, 0)

        def getRuleIndex(self):
            return PSParser.RULE_supeq

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

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




    def supeq(self):

        localctx = PSParser.SupeqContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_supeq)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1099
            self.match(PSParser.UNDERSCORE)
            self.state = 1100
            self.match(PSParser.L_BRACE)
            self.state = 1101
            self.equality()
            self.state = 1102
            self.match(PSParser.R_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[15] = self.relation_sempred
        self._predicates[20] = self.additive_sempred
        self._predicates[21] = self.mp_sempred
        self._predicates[22] = self.mp_nofunc_sempred
        self._predicates[31] = self.exp_sempred
        self._predicates[32] = self.exp_nofunc_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def relation_sempred(self, localctx:RelationContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 2)
         

    def additive_sempred(self, localctx:AdditiveContext, predIndex:int):
            if predIndex == 1:
                return self.precpred(self._ctx, 2)
         

    def mp_sempred(self, localctx:MpContext, predIndex:int):
            if predIndex == 2:
                return self.precpred(self._ctx, 2)
         

    def mp_nofunc_sempred(self, localctx:Mp_nofuncContext, predIndex:int):
            if predIndex == 3:
                return self.precpred(self._ctx, 2)
         

    def exp_sempred(self, localctx:ExpContext, predIndex:int):
            if predIndex == 4:
                return self.precpred(self._ctx, 2)
         

    def exp_nofunc_sempred(self, localctx:Exp_nofuncContext, predIndex:int):
            if predIndex == 5:
                return self.precpred(self._ctx, 2)
         




