# Generated from grammars/LDPython.g4 by ANTLR 4.10.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


from ldpy.rewriter import MultiChannelTokenStream
from antlr4.error import Errors

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

class LDPythonParser ( Parser ):

    grammarFileName = "LDPython.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'^^'", "'f{'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "'def'", "'return'", "'raise'", "'from'", 
                     "'import'", "'as'", "'global'", "'nonlocal'", "'assert'", 
                     "'if'", "'elif'", "'else'", "'while'", "'for'", "'in'", 
                     "'try'", "'finally'", "'with'", "'except'", "'lambda'", 
                     "'or'", "'and'", "'not'", "'is'", "'None'", "'True'", 
                     "'False'", "'class'", "'yield'", "'del'", "'pass'", 
                     "'continue'", "'break'", "'async'", "'await'", "'@base'", 
                     "'@prefix'", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "'.'", "'...'", 
                     "'*'", "'('", "')'", "','", "':'", "';'", "'**'", "'='", 
                     "'['", "']'", "'|'", "'^'", "'&'", "'<<'", "'>>'", 
                     "'+'", "'-'", "'/'", "'%'", "'//'", "'~'", "'{'", "'}'", 
                     "'g{'", "'<'", "'>'", "'=='", "'>='", "'<='", "'<>'", 
                     "'!='", "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", 
                     "'/='", "'%='", "'&='", "'|='", "'^='", "'<<='", "'>>='", 
                     "'**='", "'//='" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "IRIREF", "FIRIREF_START", 
                      "FIRIREF_SUB", "FIRIREF_END", "STRING", "NUMBER", 
                      "INTEGER", "DEF", "RETURN", "RAISE", "FROM", "IMPORT", 
                      "AS", "GLOBAL", "NONLOCAL", "ASSERT", "IF", "ELIF", 
                      "ELSE", "WHILE", "FOR", "IN", "TRY", "FINALLY", "WITH", 
                      "EXCEPT", "LAMBDA", "OR", "AND", "NOT", "IS", "NONE", 
                      "TRUE", "FALSE", "CLASS", "YIELD", "DEL", "PASS", 
                      "CONTINUE", "BREAK", "ASYNC", "AWAIT", "BASE", "PREFIX", 
                      "NEWLINE", "NAME", "STRING_LITERAL", "BYTES_LITERAL", 
                      "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", "BIN_INTEGER", 
                      "FLOAT_NUMBER", "IMAG_NUMBER", "BLANK_NODE_LABEL", 
                      "VAR1", "VAR2", "LANGTAG", "DOT", "ELLIPSIS", "STAR", 
                      "OPEN_PAREN", "CLOSE_PAREN", "COMMA", "COLON", "SEMI_COLON", 
                      "POWER", "ASSIGN", "OPEN_BRACK", "CLOSE_BRACK", "OR_OP", 
                      "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", 
                      "MINUS", "DIV", "MOD", "IDIV", "NOT_OP", "OPEN_BRACE", 
                      "CLOSE_BRACE", "OPEN_GRAPH", "LESS_THAN", "GREATER_THAN", 
                      "EQUALS", "GT_EQ", "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", 
                      "AT", "ARROW", "ADD_ASSIGN", "SUB_ASSIGN", "MULT_ASSIGN", 
                      "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "AND_ASSIGN", 
                      "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", 
                      "POWER_ASSIGN", "IDIV_ASSIGN", "SKIP_", "UNKNOWN_CHAR", 
                      "INDENT", "DEDENT" ]

    RULE_single_input = 0
    RULE_file_input = 1
    RULE_eval_input = 2
    RULE_decorator = 3
    RULE_decorators = 4
    RULE_decorated = 5
    RULE_base_stmt = 6
    RULE_prefix_stmt = 7
    RULE_async_funcdef = 8
    RULE_funcdef = 9
    RULE_parameters = 10
    RULE_typedargslist = 11
    RULE_tfpdef = 12
    RULE_varargslist = 13
    RULE_vfpdef = 14
    RULE_stmt = 15
    RULE_simple_stmt = 16
    RULE_small_stmt = 17
    RULE_expr_stmt = 18
    RULE_testlist_star_expr = 19
    RULE_augassign = 20
    RULE_del_stmt = 21
    RULE_pass_stmt = 22
    RULE_flow_stmt = 23
    RULE_break_stmt = 24
    RULE_continue_stmt = 25
    RULE_return_stmt = 26
    RULE_yield_stmt = 27
    RULE_raise_stmt = 28
    RULE_import_stmt = 29
    RULE_import_name = 30
    RULE_import_from = 31
    RULE_import_as_name = 32
    RULE_dotted_as_name = 33
    RULE_import_as_names = 34
    RULE_dotted_as_names = 35
    RULE_dotted_name = 36
    RULE_global_stmt = 37
    RULE_nonlocal_stmt = 38
    RULE_assert_stmt = 39
    RULE_compound_stmt = 40
    RULE_async_stmt = 41
    RULE_if_stmt = 42
    RULE_while_stmt = 43
    RULE_for_stmt = 44
    RULE_try_stmt = 45
    RULE_with_stmt = 46
    RULE_with_item = 47
    RULE_except_clause = 48
    RULE_suite = 49
    RULE_test = 50
    RULE_test_nocond = 51
    RULE_lambdef = 52
    RULE_lambdef_nocond = 53
    RULE_or_test = 54
    RULE_and_test = 55
    RULE_not_test = 56
    RULE_comparison = 57
    RULE_comp_op = 58
    RULE_star_expr = 59
    RULE_expr = 60
    RULE_xor_expr = 61
    RULE_and_expr = 62
    RULE_shift_expr = 63
    RULE_arith_expr = 64
    RULE_term = 65
    RULE_factor = 66
    RULE_power = 67
    RULE_atom_expr = 68
    RULE_atom = 69
    RULE_testlist_comp = 70
    RULE_trailer = 71
    RULE_subscriptlist = 72
    RULE_subscript = 73
    RULE_sliceop = 74
    RULE_exprlist = 75
    RULE_testlist = 76
    RULE_dictorsetmaker = 77
    RULE_classdef = 78
    RULE_arglist = 79
    RULE_argument = 80
    RULE_comp_iter = 81
    RULE_comp_for = 82
    RULE_comp_if = 83
    RULE_encoding_decl = 84
    RULE_yield_expr = 85
    RULE_yield_arg = 86
    RULE_construct_template = 87
    RULE_construct_triples = 88
    RULE_triples_same_subject = 89
    RULE_property_list = 90
    RULE_property_list_not_empty = 91
    RULE_verb = 92
    RULE_object_list = 93
    RULE_object_ = 94
    RULE_triples_node = 95
    RULE_blank_node_property_list = 96
    RULE_collection = 97
    RULE_graph_node = 98
    RULE_var_or_term = 99
    RULE_var_or_iri = 100
    RULE_var = 101
    RULE_graph_term = 102
    RULE_rdf_literal = 103
    RULE_iri = 104
    RULE_prefixed_name = 105
    RULE_all_names = 106
    RULE_blank_node = 107
    RULE_nil = 108
    RULE_anon = 109
    RULE_firi = 110
    RULE_fnode = 111

    ruleNames =  [ "single_input", "file_input", "eval_input", "decorator", 
                   "decorators", "decorated", "base_stmt", "prefix_stmt", 
                   "async_funcdef", "funcdef", "parameters", "typedargslist", 
                   "tfpdef", "varargslist", "vfpdef", "stmt", "simple_stmt", 
                   "small_stmt", "expr_stmt", "testlist_star_expr", "augassign", 
                   "del_stmt", "pass_stmt", "flow_stmt", "break_stmt", "continue_stmt", 
                   "return_stmt", "yield_stmt", "raise_stmt", "import_stmt", 
                   "import_name", "import_from", "import_as_name", "dotted_as_name", 
                   "import_as_names", "dotted_as_names", "dotted_name", 
                   "global_stmt", "nonlocal_stmt", "assert_stmt", "compound_stmt", 
                   "async_stmt", "if_stmt", "while_stmt", "for_stmt", "try_stmt", 
                   "with_stmt", "with_item", "except_clause", "suite", "test", 
                   "test_nocond", "lambdef", "lambdef_nocond", "or_test", 
                   "and_test", "not_test", "comparison", "comp_op", "star_expr", 
                   "expr", "xor_expr", "and_expr", "shift_expr", "arith_expr", 
                   "term", "factor", "power", "atom_expr", "atom", "testlist_comp", 
                   "trailer", "subscriptlist", "subscript", "sliceop", "exprlist", 
                   "testlist", "dictorsetmaker", "classdef", "arglist", 
                   "argument", "comp_iter", "comp_for", "comp_if", "encoding_decl", 
                   "yield_expr", "yield_arg", "construct_template", "construct_triples", 
                   "triples_same_subject", "property_list", "property_list_not_empty", 
                   "verb", "object_list", "object_", "triples_node", "blank_node_property_list", 
                   "collection", "graph_node", "var_or_term", "var_or_iri", 
                   "var", "graph_term", "rdf_literal", "iri", "prefixed_name", 
                   "all_names", "blank_node", "nil", "anon", "firi", "fnode" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    IRIREF=3
    FIRIREF_START=4
    FIRIREF_SUB=5
    FIRIREF_END=6
    STRING=7
    NUMBER=8
    INTEGER=9
    DEF=10
    RETURN=11
    RAISE=12
    FROM=13
    IMPORT=14
    AS=15
    GLOBAL=16
    NONLOCAL=17
    ASSERT=18
    IF=19
    ELIF=20
    ELSE=21
    WHILE=22
    FOR=23
    IN=24
    TRY=25
    FINALLY=26
    WITH=27
    EXCEPT=28
    LAMBDA=29
    OR=30
    AND=31
    NOT=32
    IS=33
    NONE=34
    TRUE=35
    FALSE=36
    CLASS=37
    YIELD=38
    DEL=39
    PASS=40
    CONTINUE=41
    BREAK=42
    ASYNC=43
    AWAIT=44
    BASE=45
    PREFIX=46
    NEWLINE=47
    NAME=48
    STRING_LITERAL=49
    BYTES_LITERAL=50
    DECIMAL_INTEGER=51
    OCT_INTEGER=52
    HEX_INTEGER=53
    BIN_INTEGER=54
    FLOAT_NUMBER=55
    IMAG_NUMBER=56
    BLANK_NODE_LABEL=57
    VAR1=58
    VAR2=59
    LANGTAG=60
    DOT=61
    ELLIPSIS=62
    STAR=63
    OPEN_PAREN=64
    CLOSE_PAREN=65
    COMMA=66
    COLON=67
    SEMI_COLON=68
    POWER=69
    ASSIGN=70
    OPEN_BRACK=71
    CLOSE_BRACK=72
    OR_OP=73
    XOR=74
    AND_OP=75
    LEFT_SHIFT=76
    RIGHT_SHIFT=77
    ADD=78
    MINUS=79
    DIV=80
    MOD=81
    IDIV=82
    NOT_OP=83
    OPEN_BRACE=84
    CLOSE_BRACE=85
    OPEN_GRAPH=86
    LESS_THAN=87
    GREATER_THAN=88
    EQUALS=89
    GT_EQ=90
    LT_EQ=91
    NOT_EQ_1=92
    NOT_EQ_2=93
    AT=94
    ARROW=95
    ADD_ASSIGN=96
    SUB_ASSIGN=97
    MULT_ASSIGN=98
    AT_ASSIGN=99
    DIV_ASSIGN=100
    MOD_ASSIGN=101
    AND_ASSIGN=102
    OR_ASSIGN=103
    XOR_ASSIGN=104
    LEFT_SHIFT_ASSIGN=105
    RIGHT_SHIFT_ASSIGN=106
    POWER_ASSIGN=107
    IDIV_ASSIGN=108
    SKIP_=109
    UNKNOWN_CHAR=110
    INDENT=111
    DEDENT=112

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



        
    def enableWs(self):
        if isinstance(self._input, MultiChannelTokenStream):
            self._input.enable(Token.HIDDEN_CHANNEL)

    def disableWs(self):
        if isinstance(self._input, MultiChannelTokenStream):
            self._input.disable(Token.HIDDEN_CHANNEL)

    def checkIsA(self):
        if self.getCurrentToken().text != 'a':
            raise Errors.FailedPredicateException(self)




    class Single_inputContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NEWLINE(self):
            return self.getToken(LDPythonParser.NEWLINE, 0)

        def simple_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Simple_stmtContext,0)


        def compound_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Compound_stmtContext,0)


        def base_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Base_stmtContext,0)


        def prefix_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Prefix_stmtContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_single_input

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




    def single_input(self):

        localctx = LDPythonParser.Single_inputContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_single_input)
        try:
            self.state = 231
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 224
                self.match(LDPythonParser.NEWLINE)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 225
                self.simple_stmt()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 226
                self.compound_stmt()
                self.state = 227
                self.match(LDPythonParser.NEWLINE)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 229
                self.base_stmt()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 230
                self.prefix_stmt()
                pass


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


    class File_inputContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.StmtContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.StmtContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_file_input

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




    def file_input(self):

        localctx = LDPythonParser.File_inputContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_file_input)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 237
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.BASE) | (1 << LDPythonParser.PREFIX) | (1 << LDPythonParser.NEWLINE) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS) | (1 << LDPythonParser.STAR))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)) | (1 << (LDPythonParser.AT - 64)))) != 0):
                self.state = 235
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [LDPythonParser.NEWLINE]:
                    self.state = 233
                    self.match(LDPythonParser.NEWLINE)
                    pass
                elif token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.BASE, LDPythonParser.PREFIX, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.STAR, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH, LDPythonParser.AT]:
                    self.state = 234
                    self.stmt()
                    pass
                else:
                    raise NoViableAltException(self)

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

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


    class Eval_inputContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def testlist(self):
            return self.getTypedRuleContext(LDPythonParser.TestlistContext,0)


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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_eval_input

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




    def eval_input(self):

        localctx = LDPythonParser.Eval_inputContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_eval_input)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 242
            self.testlist()
            self.state = 246
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.NEWLINE:
                self.state = 243
                self.match(LDPythonParser.NEWLINE)
                self.state = 248
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class DecoratorContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def dotted_name(self):
            return self.getTypedRuleContext(LDPythonParser.Dotted_nameContext,0)


        def NEWLINE(self):
            return self.getToken(LDPythonParser.NEWLINE, 0)

        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

        def arglist(self):
            return self.getTypedRuleContext(LDPythonParser.ArglistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_decorator

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




    def decorator(self):

        localctx = LDPythonParser.DecoratorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_decorator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 251
            self.match(LDPythonParser.AT)
            self.state = 252
            self.dotted_name()
            self.state = 258
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.OPEN_PAREN:
                self.state = 253
                self.match(LDPythonParser.OPEN_PAREN)
                self.state = 255
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS) | (1 << LDPythonParser.STAR))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.POWER - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                    self.state = 254
                    self.arglist()


                self.state = 257
                self.match(LDPythonParser.CLOSE_PAREN)


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


    class DecoratorsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def decorator(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.DecoratorContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.DecoratorContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_decorators

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




    def decorators(self):

        localctx = LDPythonParser.DecoratorsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_decorators)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 263 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 262
                self.decorator()
                self.state = 265 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==LDPythonParser.AT):
                    break

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


    class DecoratedContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def decorators(self):
            return self.getTypedRuleContext(LDPythonParser.DecoratorsContext,0)


        def classdef(self):
            return self.getTypedRuleContext(LDPythonParser.ClassdefContext,0)


        def funcdef(self):
            return self.getTypedRuleContext(LDPythonParser.FuncdefContext,0)


        def async_funcdef(self):
            return self.getTypedRuleContext(LDPythonParser.Async_funcdefContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_decorated

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




    def decorated(self):

        localctx = LDPythonParser.DecoratedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_decorated)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 267
            self.decorators()
            self.state = 271
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.CLASS]:
                self.state = 268
                self.classdef()
                pass
            elif token in [LDPythonParser.DEF]:
                self.state = 269
                self.funcdef()
                pass
            elif token in [LDPythonParser.ASYNC]:
                self.state = 270
                self.async_funcdef()
                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 Base_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BASE(self):
            return self.getToken(LDPythonParser.BASE, 0)

        def IRIREF(self):
            return self.getToken(LDPythonParser.IRIREF, 0)

        def NEWLINE(self):
            return self.getToken(LDPythonParser.NEWLINE, 0)

        def SEMI_COLON(self):
            return self.getToken(LDPythonParser.SEMI_COLON, 0)

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_base_stmt

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




    def base_stmt(self):

        localctx = LDPythonParser.Base_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_base_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 273
            self.match(LDPythonParser.BASE)
            self.state = 274
            self.match(LDPythonParser.IRIREF)
            self.state = 276
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.DOT or _la==LDPythonParser.SEMI_COLON:
                self.state = 275
                _la = self._input.LA(1)
                if not(_la==LDPythonParser.DOT or _la==LDPythonParser.SEMI_COLON):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 278
            self.match(LDPythonParser.NEWLINE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Prefix_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PREFIX(self):
            return self.getToken(LDPythonParser.PREFIX, 0)

        def IRIREF(self):
            return self.getToken(LDPythonParser.IRIREF, 0)

        def NEWLINE(self):
            return self.getToken(LDPythonParser.NEWLINE, 0)

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

        def SEMI_COLON(self):
            return self.getToken(LDPythonParser.SEMI_COLON, 0)

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

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_prefix_stmt

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




    def prefix_stmt(self):

        localctx = LDPythonParser.Prefix_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_prefix_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 280
            self.match(LDPythonParser.PREFIX)

            self.state = 282
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.NAME:
                self.state = 281
                self.match(LDPythonParser.NAME)


            self.state = 284
            self.match(LDPythonParser.COLON)
            self.state = 286
            self.match(LDPythonParser.IRIREF)
            self.state = 288
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.DOT or _la==LDPythonParser.SEMI_COLON:
                self.state = 287
                _la = self._input.LA(1)
                if not(_la==LDPythonParser.DOT or _la==LDPythonParser.SEMI_COLON):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 290
            self.match(LDPythonParser.NEWLINE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Async_funcdefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ASYNC(self):
            return self.getToken(LDPythonParser.ASYNC, 0)

        def funcdef(self):
            return self.getTypedRuleContext(LDPythonParser.FuncdefContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_async_funcdef

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




    def async_funcdef(self):

        localctx = LDPythonParser.Async_funcdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_async_funcdef)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 292
            self.match(LDPythonParser.ASYNC)
            self.state = 293
            self.funcdef()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FuncdefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEF(self):
            return self.getToken(LDPythonParser.DEF, 0)

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def parameters(self):
            return self.getTypedRuleContext(LDPythonParser.ParametersContext,0)


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

        def suite(self):
            return self.getTypedRuleContext(LDPythonParser.SuiteContext,0)


        def ARROW(self):
            return self.getToken(LDPythonParser.ARROW, 0)

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_funcdef

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




    def funcdef(self):

        localctx = LDPythonParser.FuncdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_funcdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 295
            self.match(LDPythonParser.DEF)
            self.state = 296
            self.match(LDPythonParser.NAME)
            self.state = 297
            self.parameters()
            self.state = 300
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.ARROW:
                self.state = 298
                self.match(LDPythonParser.ARROW)
                self.state = 299
                self.test()


            self.state = 302
            self.match(LDPythonParser.COLON)
            self.state = 303
            self.suite()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ParametersContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

        def typedargslist(self):
            return self.getTypedRuleContext(LDPythonParser.TypedargslistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_parameters

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




    def parameters(self):

        localctx = LDPythonParser.ParametersContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_parameters)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 305
            self.match(LDPythonParser.OPEN_PAREN)
            self.state = 307
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 48)) & ~0x3f) == 0 and ((1 << (_la - 48)) & ((1 << (LDPythonParser.NAME - 48)) | (1 << (LDPythonParser.STAR - 48)) | (1 << (LDPythonParser.POWER - 48)))) != 0):
                self.state = 306
                self.typedargslist()


            self.state = 309
            self.match(LDPythonParser.CLOSE_PAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TypedargslistContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def tfpdef(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TfpdefContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TfpdefContext,i)


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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

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

        def POWER(self):
            return self.getToken(LDPythonParser.POWER, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_typedargslist

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




    def typedargslist(self):

        localctx = LDPythonParser.TypedargslistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_typedargslist)
        self._la = 0 # Token type
        try:
            self.state = 376
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.NAME]:
                self.enterOuterAlt(localctx, 1)
                self.state = 311
                self.tfpdef()
                self.state = 314
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.ASSIGN:
                    self.state = 312
                    self.match(LDPythonParser.ASSIGN)
                    self.state = 313
                    self.test()


                self.state = 324
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,15,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 316
                        self.match(LDPythonParser.COMMA)
                        self.state = 317
                        self.tfpdef()
                        self.state = 320
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.ASSIGN:
                            self.state = 318
                            self.match(LDPythonParser.ASSIGN)
                            self.state = 319
                            self.test()

                 
                    self.state = 326
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,15,self._ctx)

                self.state = 352
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COMMA:
                    self.state = 327
                    self.match(LDPythonParser.COMMA)
                    self.state = 350
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [LDPythonParser.STAR]:
                        self.state = 328
                        self.match(LDPythonParser.STAR)
                        self.state = 330
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.NAME:
                            self.state = 329
                            self.tfpdef()


                        self.state = 340
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,18,self._ctx)
                        while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                            if _alt==1:
                                self.state = 332
                                self.match(LDPythonParser.COMMA)
                                self.state = 333
                                self.tfpdef()
                                self.state = 336
                                self._errHandler.sync(self)
                                _la = self._input.LA(1)
                                if _la==LDPythonParser.ASSIGN:
                                    self.state = 334
                                    self.match(LDPythonParser.ASSIGN)
                                    self.state = 335
                                    self.test()

                         
                            self.state = 342
                            self._errHandler.sync(self)
                            _alt = self._interp.adaptivePredict(self._input,18,self._ctx)

                        self.state = 346
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.COMMA:
                            self.state = 343
                            self.match(LDPythonParser.COMMA)
                            self.state = 344
                            self.match(LDPythonParser.POWER)
                            self.state = 345
                            self.tfpdef()


                        pass
                    elif token in [LDPythonParser.POWER]:
                        self.state = 348
                        self.match(LDPythonParser.POWER)
                        self.state = 349
                        self.tfpdef()
                        pass
                    elif token in [LDPythonParser.CLOSE_PAREN]:
                        pass
                    else:
                        pass


                pass
            elif token in [LDPythonParser.STAR]:
                self.enterOuterAlt(localctx, 2)
                self.state = 354
                self.match(LDPythonParser.STAR)
                self.state = 356
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.NAME:
                    self.state = 355
                    self.tfpdef()


                self.state = 366
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,24,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 358
                        self.match(LDPythonParser.COMMA)
                        self.state = 359
                        self.tfpdef()
                        self.state = 362
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.ASSIGN:
                            self.state = 360
                            self.match(LDPythonParser.ASSIGN)
                            self.state = 361
                            self.test()

                 
                    self.state = 368
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,24,self._ctx)

                self.state = 372
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COMMA:
                    self.state = 369
                    self.match(LDPythonParser.COMMA)
                    self.state = 370
                    self.match(LDPythonParser.POWER)
                    self.state = 371
                    self.tfpdef()


                pass
            elif token in [LDPythonParser.POWER]:
                self.enterOuterAlt(localctx, 3)
                self.state = 374
                self.match(LDPythonParser.POWER)
                self.state = 375
                self.tfpdef()
                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 TfpdefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

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

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_tfpdef

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




    def tfpdef(self):

        localctx = LDPythonParser.TfpdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_tfpdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 378
            self.match(LDPythonParser.NAME)
            self.state = 381
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.COLON:
                self.state = 379
                self.match(LDPythonParser.COLON)
                self.state = 380
                self.test()


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


    class VarargslistContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def vfpdef(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.VfpdefContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.VfpdefContext,i)


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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

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

        def POWER(self):
            return self.getToken(LDPythonParser.POWER, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_varargslist

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




    def varargslist(self):

        localctx = LDPythonParser.VarargslistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_varargslist)
        self._la = 0 # Token type
        try:
            self.state = 448
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.NAME]:
                self.enterOuterAlt(localctx, 1)
                self.state = 383
                self.vfpdef()
                self.state = 386
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.ASSIGN:
                    self.state = 384
                    self.match(LDPythonParser.ASSIGN)
                    self.state = 385
                    self.test()


                self.state = 396
                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 = 388
                        self.match(LDPythonParser.COMMA)
                        self.state = 389
                        self.vfpdef()
                        self.state = 392
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.ASSIGN:
                            self.state = 390
                            self.match(LDPythonParser.ASSIGN)
                            self.state = 391
                            self.test()

                 
                    self.state = 398
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,30,self._ctx)

                self.state = 424
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COMMA:
                    self.state = 399
                    self.match(LDPythonParser.COMMA)
                    self.state = 422
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [LDPythonParser.STAR]:
                        self.state = 400
                        self.match(LDPythonParser.STAR)
                        self.state = 402
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.NAME:
                            self.state = 401
                            self.vfpdef()


                        self.state = 412
                        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 = 404
                                self.match(LDPythonParser.COMMA)
                                self.state = 405
                                self.vfpdef()
                                self.state = 408
                                self._errHandler.sync(self)
                                _la = self._input.LA(1)
                                if _la==LDPythonParser.ASSIGN:
                                    self.state = 406
                                    self.match(LDPythonParser.ASSIGN)
                                    self.state = 407
                                    self.test()

                         
                            self.state = 414
                            self._errHandler.sync(self)
                            _alt = self._interp.adaptivePredict(self._input,33,self._ctx)

                        self.state = 418
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.COMMA:
                            self.state = 415
                            self.match(LDPythonParser.COMMA)
                            self.state = 416
                            self.match(LDPythonParser.POWER)
                            self.state = 417
                            self.vfpdef()


                        pass
                    elif token in [LDPythonParser.POWER]:
                        self.state = 420
                        self.match(LDPythonParser.POWER)
                        self.state = 421
                        self.vfpdef()
                        pass
                    elif token in [LDPythonParser.COLON]:
                        pass
                    else:
                        pass


                pass
            elif token in [LDPythonParser.STAR]:
                self.enterOuterAlt(localctx, 2)
                self.state = 426
                self.match(LDPythonParser.STAR)
                self.state = 428
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.NAME:
                    self.state = 427
                    self.vfpdef()


                self.state = 438
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,39,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 430
                        self.match(LDPythonParser.COMMA)
                        self.state = 431
                        self.vfpdef()
                        self.state = 434
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==LDPythonParser.ASSIGN:
                            self.state = 432
                            self.match(LDPythonParser.ASSIGN)
                            self.state = 433
                            self.test()

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

                self.state = 444
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COMMA:
                    self.state = 441
                    self.match(LDPythonParser.COMMA)
                    self.state = 442
                    self.match(LDPythonParser.POWER)
                    self.state = 443
                    self.vfpdef()


                pass
            elif token in [LDPythonParser.POWER]:
                self.enterOuterAlt(localctx, 3)
                self.state = 446
                self.match(LDPythonParser.POWER)
                self.state = 447
                self.vfpdef()
                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 VfpdefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_vfpdef

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




    def vfpdef(self):

        localctx = LDPythonParser.VfpdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_vfpdef)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 450
            self.match(LDPythonParser.NAME)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def compound_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Compound_stmtContext,0)


        def simple_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Simple_stmtContext,0)


        def base_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Base_stmtContext,0)


        def prefix_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Prefix_stmtContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_stmt

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




    def stmt(self):

        localctx = LDPythonParser.StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_stmt)
        try:
            self.state = 456
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,42,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 452
                self.compound_stmt()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 453
                self.simple_stmt()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 454
                self.base_stmt()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 455
                self.prefix_stmt()
                pass


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


    class Simple_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def small_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Small_stmtContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Small_stmtContext,i)


        def NEWLINE(self):
            return self.getToken(LDPythonParser.NEWLINE, 0)

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_simple_stmt

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




    def simple_stmt(self):

        localctx = LDPythonParser.Simple_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_simple_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 458
            self.small_stmt()
            self.state = 463
            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:
                    self.state = 459
                    self.match(LDPythonParser.SEMI_COLON)
                    self.state = 460
                    self.small_stmt() 
                self.state = 465
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,43,self._ctx)

            self.state = 467
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.SEMI_COLON:
                self.state = 466
                self.match(LDPythonParser.SEMI_COLON)


            self.state = 469
            self.match(LDPythonParser.NEWLINE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Small_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def expr_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Expr_stmtContext,0)


        def del_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Del_stmtContext,0)


        def pass_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Pass_stmtContext,0)


        def flow_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Flow_stmtContext,0)


        def import_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Import_stmtContext,0)


        def global_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Global_stmtContext,0)


        def nonlocal_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Nonlocal_stmtContext,0)


        def assert_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Assert_stmtContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_small_stmt

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




    def small_stmt(self):

        localctx = LDPythonParser.Small_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_small_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 479
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,45,self._ctx)
            if la_ == 1:
                self.state = 471
                self.expr_stmt()
                pass

            elif la_ == 2:
                self.state = 472
                self.del_stmt()
                pass

            elif la_ == 3:
                self.state = 473
                self.pass_stmt()
                pass

            elif la_ == 4:
                self.state = 474
                self.flow_stmt()
                pass

            elif la_ == 5:
                self.state = 475
                self.import_stmt()
                pass

            elif la_ == 6:
                self.state = 476
                self.global_stmt()
                pass

            elif la_ == 7:
                self.state = 477
                self.nonlocal_stmt()
                pass

            elif la_ == 8:
                self.state = 478
                self.assert_stmt()
                pass


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


    class Expr_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def testlist_star_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Testlist_star_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Testlist_star_exprContext,i)


        def augassign(self):
            return self.getTypedRuleContext(LDPythonParser.AugassignContext,0)


        def yield_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Yield_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Yield_exprContext,i)


        def testlist(self):
            return self.getTypedRuleContext(LDPythonParser.TestlistContext,0)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_expr_stmt

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




    def expr_stmt(self):

        localctx = LDPythonParser.Expr_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_expr_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 481
            self.testlist_star_expr()
            self.state = 497
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.ADD_ASSIGN, LDPythonParser.SUB_ASSIGN, LDPythonParser.MULT_ASSIGN, LDPythonParser.AT_ASSIGN, LDPythonParser.DIV_ASSIGN, LDPythonParser.MOD_ASSIGN, LDPythonParser.AND_ASSIGN, LDPythonParser.OR_ASSIGN, LDPythonParser.XOR_ASSIGN, LDPythonParser.LEFT_SHIFT_ASSIGN, LDPythonParser.RIGHT_SHIFT_ASSIGN, LDPythonParser.POWER_ASSIGN, LDPythonParser.IDIV_ASSIGN]:
                self.state = 482
                self.augassign()
                self.state = 485
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,46,self._ctx)
                if la_ == 1:
                    self.state = 483
                    self.yield_expr()
                    pass

                elif la_ == 2:
                    self.state = 484
                    self.testlist()
                    pass


                pass
            elif token in [LDPythonParser.NEWLINE, LDPythonParser.SEMI_COLON, LDPythonParser.ASSIGN]:
                self.state = 494
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==LDPythonParser.ASSIGN:
                    self.state = 487
                    self.match(LDPythonParser.ASSIGN)
                    self.state = 490
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,47,self._ctx)
                    if la_ == 1:
                        self.state = 488
                        self.yield_expr()
                        pass

                    elif la_ == 2:
                        self.state = 489
                        self.testlist_star_expr()
                        pass


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

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

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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


        def star_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Star_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Star_exprContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_testlist_star_expr

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




    def testlist_star_expr(self):

        localctx = LDPythonParser.Testlist_star_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_testlist_star_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 501
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                self.state = 499
                self.test()
                pass
            elif token in [LDPythonParser.STAR]:
                self.state = 500
                self.star_expr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 510
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,52,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 503
                    self.match(LDPythonParser.COMMA)
                    self.state = 506
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                        self.state = 504
                        self.test()
                        pass
                    elif token in [LDPythonParser.STAR]:
                        self.state = 505
                        self.star_expr()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 512
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,52,self._ctx)

            self.state = 514
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.COMMA:
                self.state = 513
                self.match(LDPythonParser.COMMA)


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


    class AugassignContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ADD_ASSIGN(self):
            return self.getToken(LDPythonParser.ADD_ASSIGN, 0)

        def SUB_ASSIGN(self):
            return self.getToken(LDPythonParser.SUB_ASSIGN, 0)

        def MULT_ASSIGN(self):
            return self.getToken(LDPythonParser.MULT_ASSIGN, 0)

        def AT_ASSIGN(self):
            return self.getToken(LDPythonParser.AT_ASSIGN, 0)

        def DIV_ASSIGN(self):
            return self.getToken(LDPythonParser.DIV_ASSIGN, 0)

        def MOD_ASSIGN(self):
            return self.getToken(LDPythonParser.MOD_ASSIGN, 0)

        def AND_ASSIGN(self):
            return self.getToken(LDPythonParser.AND_ASSIGN, 0)

        def OR_ASSIGN(self):
            return self.getToken(LDPythonParser.OR_ASSIGN, 0)

        def XOR_ASSIGN(self):
            return self.getToken(LDPythonParser.XOR_ASSIGN, 0)

        def LEFT_SHIFT_ASSIGN(self):
            return self.getToken(LDPythonParser.LEFT_SHIFT_ASSIGN, 0)

        def RIGHT_SHIFT_ASSIGN(self):
            return self.getToken(LDPythonParser.RIGHT_SHIFT_ASSIGN, 0)

        def POWER_ASSIGN(self):
            return self.getToken(LDPythonParser.POWER_ASSIGN, 0)

        def IDIV_ASSIGN(self):
            return self.getToken(LDPythonParser.IDIV_ASSIGN, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_augassign

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




    def augassign(self):

        localctx = LDPythonParser.AugassignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_augassign)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 516
            _la = self._input.LA(1)
            if not(((((_la - 96)) & ~0x3f) == 0 and ((1 << (_la - 96)) & ((1 << (LDPythonParser.ADD_ASSIGN - 96)) | (1 << (LDPythonParser.SUB_ASSIGN - 96)) | (1 << (LDPythonParser.MULT_ASSIGN - 96)) | (1 << (LDPythonParser.AT_ASSIGN - 96)) | (1 << (LDPythonParser.DIV_ASSIGN - 96)) | (1 << (LDPythonParser.MOD_ASSIGN - 96)) | (1 << (LDPythonParser.AND_ASSIGN - 96)) | (1 << (LDPythonParser.OR_ASSIGN - 96)) | (1 << (LDPythonParser.XOR_ASSIGN - 96)) | (1 << (LDPythonParser.LEFT_SHIFT_ASSIGN - 96)) | (1 << (LDPythonParser.RIGHT_SHIFT_ASSIGN - 96)) | (1 << (LDPythonParser.POWER_ASSIGN - 96)) | (1 << (LDPythonParser.IDIV_ASSIGN - 96)))) != 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 Del_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEL(self):
            return self.getToken(LDPythonParser.DEL, 0)

        def exprlist(self):
            return self.getTypedRuleContext(LDPythonParser.ExprlistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_del_stmt

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




    def del_stmt(self):

        localctx = LDPythonParser.Del_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_del_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 518
            self.match(LDPythonParser.DEL)
            self.state = 519
            self.exprlist()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Pass_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PASS(self):
            return self.getToken(LDPythonParser.PASS, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_pass_stmt

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




    def pass_stmt(self):

        localctx = LDPythonParser.Pass_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_pass_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 521
            self.match(LDPythonParser.PASS)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Flow_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def break_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Break_stmtContext,0)


        def continue_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Continue_stmtContext,0)


        def return_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Return_stmtContext,0)


        def raise_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Raise_stmtContext,0)


        def yield_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Yield_stmtContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_flow_stmt

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




    def flow_stmt(self):

        localctx = LDPythonParser.Flow_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_flow_stmt)
        try:
            self.state = 528
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.BREAK]:
                self.enterOuterAlt(localctx, 1)
                self.state = 523
                self.break_stmt()
                pass
            elif token in [LDPythonParser.CONTINUE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 524
                self.continue_stmt()
                pass
            elif token in [LDPythonParser.RETURN]:
                self.enterOuterAlt(localctx, 3)
                self.state = 525
                self.return_stmt()
                pass
            elif token in [LDPythonParser.RAISE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 526
                self.raise_stmt()
                pass
            elif token in [LDPythonParser.YIELD]:
                self.enterOuterAlt(localctx, 5)
                self.state = 527
                self.yield_stmt()
                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 Break_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BREAK(self):
            return self.getToken(LDPythonParser.BREAK, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_break_stmt

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




    def break_stmt(self):

        localctx = LDPythonParser.Break_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_break_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 530
            self.match(LDPythonParser.BREAK)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Continue_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CONTINUE(self):
            return self.getToken(LDPythonParser.CONTINUE, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_continue_stmt

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




    def continue_stmt(self):

        localctx = LDPythonParser.Continue_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_continue_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 532
            self.match(LDPythonParser.CONTINUE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Return_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def RETURN(self):
            return self.getToken(LDPythonParser.RETURN, 0)

        def testlist(self):
            return self.getTypedRuleContext(LDPythonParser.TestlistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_return_stmt

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




    def return_stmt(self):

        localctx = LDPythonParser.Return_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_return_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 534
            self.match(LDPythonParser.RETURN)
            self.state = 536
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                self.state = 535
                self.testlist()


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


    class Yield_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def yield_expr(self):
            return self.getTypedRuleContext(LDPythonParser.Yield_exprContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_yield_stmt

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




    def yield_stmt(self):

        localctx = LDPythonParser.Yield_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_yield_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 538
            self.yield_expr()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Raise_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def RAISE(self):
            return self.getToken(LDPythonParser.RAISE, 0)

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


        def FROM(self):
            return self.getToken(LDPythonParser.FROM, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_raise_stmt

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




    def raise_stmt(self):

        localctx = LDPythonParser.Raise_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_raise_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 540
            self.match(LDPythonParser.RAISE)
            self.state = 546
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                self.state = 541
                self.test()
                self.state = 544
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.FROM:
                    self.state = 542
                    self.match(LDPythonParser.FROM)
                    self.state = 543
                    self.test()




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


    class Import_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def import_name(self):
            return self.getTypedRuleContext(LDPythonParser.Import_nameContext,0)


        def import_from(self):
            return self.getTypedRuleContext(LDPythonParser.Import_fromContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_import_stmt

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




    def import_stmt(self):

        localctx = LDPythonParser.Import_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_import_stmt)
        try:
            self.state = 550
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IMPORT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 548
                self.import_name()
                pass
            elif token in [LDPythonParser.FROM]:
                self.enterOuterAlt(localctx, 2)
                self.state = 549
                self.import_from()
                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 Import_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def dotted_as_names(self):
            return self.getTypedRuleContext(LDPythonParser.Dotted_as_namesContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_import_name

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




    def import_name(self):

        localctx = LDPythonParser.Import_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_import_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 552
            self.match(LDPythonParser.IMPORT)
            self.state = 553
            self.dotted_as_names()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Import_fromContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FROM(self):
            return self.getToken(LDPythonParser.FROM, 0)

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

        def dotted_name(self):
            return self.getTypedRuleContext(LDPythonParser.Dotted_nameContext,0)


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

        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def import_as_names(self):
            return self.getTypedRuleContext(LDPythonParser.Import_as_namesContext,0)


        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_import_from

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




    def import_from(self):

        localctx = LDPythonParser.Import_fromContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_import_from)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 555
            self.match(LDPythonParser.FROM)
            self.state = 568
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,61,self._ctx)
            if la_ == 1:
                self.state = 559
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==LDPythonParser.DOT or _la==LDPythonParser.ELLIPSIS:
                    self.state = 556
                    _la = self._input.LA(1)
                    if not(_la==LDPythonParser.DOT or _la==LDPythonParser.ELLIPSIS):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 561
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 562
                self.dotted_name()
                pass

            elif la_ == 2:
                self.state = 564 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 563
                    _la = self._input.LA(1)
                    if not(_la==LDPythonParser.DOT or _la==LDPythonParser.ELLIPSIS):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 566 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==LDPythonParser.DOT or _la==LDPythonParser.ELLIPSIS):
                        break

                pass


            self.state = 570
            self.match(LDPythonParser.IMPORT)
            self.state = 577
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.STAR]:
                self.state = 571
                self.match(LDPythonParser.STAR)
                pass
            elif token in [LDPythonParser.OPEN_PAREN]:
                self.state = 572
                self.match(LDPythonParser.OPEN_PAREN)
                self.state = 573
                self.import_as_names()
                self.state = 574
                self.match(LDPythonParser.CLOSE_PAREN)
                pass
            elif token in [LDPythonParser.NAME]:
                self.state = 576
                self.import_as_names()
                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 Import_as_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def AS(self):
            return self.getToken(LDPythonParser.AS, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_import_as_name

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




    def import_as_name(self):

        localctx = LDPythonParser.Import_as_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_import_as_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 579
            self.match(LDPythonParser.NAME)
            self.state = 582
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.AS:
                self.state = 580
                self.match(LDPythonParser.AS)
                self.state = 581
                self.match(LDPythonParser.NAME)


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


    class Dotted_as_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def dotted_name(self):
            return self.getTypedRuleContext(LDPythonParser.Dotted_nameContext,0)


        def AS(self):
            return self.getToken(LDPythonParser.AS, 0)

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_dotted_as_name

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




    def dotted_as_name(self):

        localctx = LDPythonParser.Dotted_as_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_dotted_as_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 584
            self.dotted_name()
            self.state = 587
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.AS:
                self.state = 585
                self.match(LDPythonParser.AS)
                self.state = 586
                self.match(LDPythonParser.NAME)


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


    class Import_as_namesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def import_as_name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Import_as_nameContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Import_as_nameContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_import_as_names

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




    def import_as_names(self):

        localctx = LDPythonParser.Import_as_namesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_import_as_names)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 589
            self.import_as_name()
            self.state = 594
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,65,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 590
                    self.match(LDPythonParser.COMMA)
                    self.state = 591
                    self.import_as_name() 
                self.state = 596
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,65,self._ctx)

            self.state = 598
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.COMMA:
                self.state = 597
                self.match(LDPythonParser.COMMA)


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


    class Dotted_as_namesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def dotted_as_name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Dotted_as_nameContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Dotted_as_nameContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_dotted_as_names

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




    def dotted_as_names(self):

        localctx = LDPythonParser.Dotted_as_namesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_dotted_as_names)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 600
            self.dotted_as_name()
            self.state = 605
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.COMMA:
                self.state = 601
                self.match(LDPythonParser.COMMA)
                self.state = 602
                self.dotted_as_name()
                self.state = 607
                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 Dotted_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_dotted_name

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




    def dotted_name(self):

        localctx = LDPythonParser.Dotted_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_dotted_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 608
            self.match(LDPythonParser.NAME)
            self.state = 613
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.DOT:
                self.state = 609
                self.match(LDPythonParser.DOT)
                self.state = 610
                self.match(LDPythonParser.NAME)
                self.state = 615
                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 Global_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GLOBAL(self):
            return self.getToken(LDPythonParser.GLOBAL, 0)

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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_global_stmt

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




    def global_stmt(self):

        localctx = LDPythonParser.Global_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_global_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 616
            self.match(LDPythonParser.GLOBAL)
            self.state = 617
            self.match(LDPythonParser.NAME)
            self.state = 622
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.COMMA:
                self.state = 618
                self.match(LDPythonParser.COMMA)
                self.state = 619
                self.match(LDPythonParser.NAME)
                self.state = 624
                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 Nonlocal_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NONLOCAL(self):
            return self.getToken(LDPythonParser.NONLOCAL, 0)

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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_nonlocal_stmt

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




    def nonlocal_stmt(self):

        localctx = LDPythonParser.Nonlocal_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_nonlocal_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 625
            self.match(LDPythonParser.NONLOCAL)
            self.state = 626
            self.match(LDPythonParser.NAME)
            self.state = 631
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.COMMA:
                self.state = 627
                self.match(LDPythonParser.COMMA)
                self.state = 628
                self.match(LDPythonParser.NAME)
                self.state = 633
                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 Assert_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ASSERT(self):
            return self.getToken(LDPythonParser.ASSERT, 0)

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_assert_stmt

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




    def assert_stmt(self):

        localctx = LDPythonParser.Assert_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_assert_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 634
            self.match(LDPythonParser.ASSERT)
            self.state = 635
            self.test()
            self.state = 638
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.COMMA:
                self.state = 636
                self.match(LDPythonParser.COMMA)
                self.state = 637
                self.test()


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


    class Compound_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def if_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.If_stmtContext,0)


        def while_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.While_stmtContext,0)


        def for_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.For_stmtContext,0)


        def try_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Try_stmtContext,0)


        def with_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.With_stmtContext,0)


        def funcdef(self):
            return self.getTypedRuleContext(LDPythonParser.FuncdefContext,0)


        def classdef(self):
            return self.getTypedRuleContext(LDPythonParser.ClassdefContext,0)


        def decorated(self):
            return self.getTypedRuleContext(LDPythonParser.DecoratedContext,0)


        def async_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Async_stmtContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_compound_stmt

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




    def compound_stmt(self):

        localctx = LDPythonParser.Compound_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_compound_stmt)
        try:
            self.state = 649
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IF]:
                self.enterOuterAlt(localctx, 1)
                self.state = 640
                self.if_stmt()
                pass
            elif token in [LDPythonParser.WHILE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 641
                self.while_stmt()
                pass
            elif token in [LDPythonParser.FOR]:
                self.enterOuterAlt(localctx, 3)
                self.state = 642
                self.for_stmt()
                pass
            elif token in [LDPythonParser.TRY]:
                self.enterOuterAlt(localctx, 4)
                self.state = 643
                self.try_stmt()
                pass
            elif token in [LDPythonParser.WITH]:
                self.enterOuterAlt(localctx, 5)
                self.state = 644
                self.with_stmt()
                pass
            elif token in [LDPythonParser.DEF]:
                self.enterOuterAlt(localctx, 6)
                self.state = 645
                self.funcdef()
                pass
            elif token in [LDPythonParser.CLASS]:
                self.enterOuterAlt(localctx, 7)
                self.state = 646
                self.classdef()
                pass
            elif token in [LDPythonParser.AT]:
                self.enterOuterAlt(localctx, 8)
                self.state = 647
                self.decorated()
                pass
            elif token in [LDPythonParser.ASYNC]:
                self.enterOuterAlt(localctx, 9)
                self.state = 648
                self.async_stmt()
                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 Async_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ASYNC(self):
            return self.getToken(LDPythonParser.ASYNC, 0)

        def funcdef(self):
            return self.getTypedRuleContext(LDPythonParser.FuncdefContext,0)


        def with_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.With_stmtContext,0)


        def for_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.For_stmtContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_async_stmt

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




    def async_stmt(self):

        localctx = LDPythonParser.Async_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_async_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 651
            self.match(LDPythonParser.ASYNC)
            self.state = 655
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.DEF]:
                self.state = 652
                self.funcdef()
                pass
            elif token in [LDPythonParser.WITH]:
                self.state = 653
                self.with_stmt()
                pass
            elif token in [LDPythonParser.FOR]:
                self.state = 654
                self.for_stmt()
                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 If_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IF(self):
            return self.getToken(LDPythonParser.IF, 0)

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

        def suite(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.SuiteContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.SuiteContext,i)


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

        def ELSE(self):
            return self.getToken(LDPythonParser.ELSE, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_if_stmt

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




    def if_stmt(self):

        localctx = LDPythonParser.If_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_if_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 657
            self.match(LDPythonParser.IF)
            self.state = 658
            self.test()
            self.state = 659
            self.match(LDPythonParser.COLON)
            self.state = 660
            self.suite()
            self.state = 668
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,74,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 661
                    self.match(LDPythonParser.ELIF)
                    self.state = 662
                    self.test()
                    self.state = 663
                    self.match(LDPythonParser.COLON)
                    self.state = 664
                    self.suite() 
                self.state = 670
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,74,self._ctx)

            self.state = 674
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,75,self._ctx)
            if la_ == 1:
                self.state = 671
                self.match(LDPythonParser.ELSE)
                self.state = 672
                self.match(LDPythonParser.COLON)
                self.state = 673
                self.suite()


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


    class While_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def WHILE(self):
            return self.getToken(LDPythonParser.WHILE, 0)

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


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

        def suite(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.SuiteContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.SuiteContext,i)


        def ELSE(self):
            return self.getToken(LDPythonParser.ELSE, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_while_stmt

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




    def while_stmt(self):

        localctx = LDPythonParser.While_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_while_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 676
            self.match(LDPythonParser.WHILE)
            self.state = 677
            self.test()
            self.state = 678
            self.match(LDPythonParser.COLON)
            self.state = 679
            self.suite()
            self.state = 683
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,76,self._ctx)
            if la_ == 1:
                self.state = 680
                self.match(LDPythonParser.ELSE)
                self.state = 681
                self.match(LDPythonParser.COLON)
                self.state = 682
                self.suite()


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


    class For_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FOR(self):
            return self.getToken(LDPythonParser.FOR, 0)

        def exprlist(self):
            return self.getTypedRuleContext(LDPythonParser.ExprlistContext,0)


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

        def testlist(self):
            return self.getTypedRuleContext(LDPythonParser.TestlistContext,0)


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

        def suite(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.SuiteContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.SuiteContext,i)


        def ELSE(self):
            return self.getToken(LDPythonParser.ELSE, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_for_stmt

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




    def for_stmt(self):

        localctx = LDPythonParser.For_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_for_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 685
            self.match(LDPythonParser.FOR)
            self.state = 686
            self.exprlist()
            self.state = 687
            self.match(LDPythonParser.IN)
            self.state = 688
            self.testlist()
            self.state = 689
            self.match(LDPythonParser.COLON)
            self.state = 690
            self.suite()
            self.state = 694
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,77,self._ctx)
            if la_ == 1:
                self.state = 691
                self.match(LDPythonParser.ELSE)
                self.state = 692
                self.match(LDPythonParser.COLON)
                self.state = 693
                self.suite()


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


    class Try_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def TRY(self):
            return self.getToken(LDPythonParser.TRY, 0)

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

        def suite(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.SuiteContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.SuiteContext,i)


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

        def except_clause(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Except_clauseContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Except_clauseContext,i)


        def ELSE(self):
            return self.getToken(LDPythonParser.ELSE, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_try_stmt

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




    def try_stmt(self):

        localctx = LDPythonParser.Try_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_try_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 696
            self.match(LDPythonParser.TRY)
            self.state = 697
            self.match(LDPythonParser.COLON)
            self.state = 698
            self.suite()
            self.state = 720
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.EXCEPT]:
                self.state = 703 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 699
                        self.except_clause()
                        self.state = 700
                        self.match(LDPythonParser.COLON)
                        self.state = 701
                        self.suite()

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

                self.state = 710
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,79,self._ctx)
                if la_ == 1:
                    self.state = 707
                    self.match(LDPythonParser.ELSE)
                    self.state = 708
                    self.match(LDPythonParser.COLON)
                    self.state = 709
                    self.suite()


                self.state = 715
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,80,self._ctx)
                if la_ == 1:
                    self.state = 712
                    self.match(LDPythonParser.FINALLY)
                    self.state = 713
                    self.match(LDPythonParser.COLON)
                    self.state = 714
                    self.suite()


                pass
            elif token in [LDPythonParser.FINALLY]:
                self.state = 717
                self.match(LDPythonParser.FINALLY)
                self.state = 718
                self.match(LDPythonParser.COLON)
                self.state = 719
                self.suite()
                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 With_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def WITH(self):
            return self.getToken(LDPythonParser.WITH, 0)

        def with_item(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.With_itemContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.With_itemContext,i)


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

        def suite(self):
            return self.getTypedRuleContext(LDPythonParser.SuiteContext,0)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_with_stmt

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




    def with_stmt(self):

        localctx = LDPythonParser.With_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_with_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 722
            self.match(LDPythonParser.WITH)
            self.state = 723
            self.with_item()
            self.state = 728
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.COMMA:
                self.state = 724
                self.match(LDPythonParser.COMMA)
                self.state = 725
                self.with_item()
                self.state = 730
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 731
            self.match(LDPythonParser.COLON)
            self.state = 732
            self.suite()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class With_itemContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def AS(self):
            return self.getToken(LDPythonParser.AS, 0)

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


        def getRuleIndex(self):
            return LDPythonParser.RULE_with_item

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




    def with_item(self):

        localctx = LDPythonParser.With_itemContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_with_item)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 734
            self.test()
            self.state = 737
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.AS:
                self.state = 735
                self.match(LDPythonParser.AS)
                self.state = 736
                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 Except_clauseContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def EXCEPT(self):
            return self.getToken(LDPythonParser.EXCEPT, 0)

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def AS(self):
            return self.getToken(LDPythonParser.AS, 0)

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_except_clause

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




    def except_clause(self):

        localctx = LDPythonParser.Except_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_except_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 739
            self.match(LDPythonParser.EXCEPT)
            self.state = 745
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,85,self._ctx)
            if la_ == 1:
                self.state = 740
                self.test()
                self.state = 743
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.AS:
                    self.state = 741
                    self.match(LDPythonParser.AS)
                    self.state = 742
                    self.match(LDPythonParser.NAME)




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


    class SuiteContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def simple_stmt(self):
            return self.getTypedRuleContext(LDPythonParser.Simple_stmtContext,0)


        def NEWLINE(self):
            return self.getToken(LDPythonParser.NEWLINE, 0)

        def INDENT(self):
            return self.getToken(LDPythonParser.INDENT, 0)

        def DEDENT(self):
            return self.getToken(LDPythonParser.DEDENT, 0)

        def stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.StmtContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.StmtContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_suite

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




    def suite(self):

        localctx = LDPythonParser.SuiteContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_suite)
        self._la = 0 # Token type
        try:
            self.state = 757
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.STAR, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                self.enterOuterAlt(localctx, 1)
                self.state = 747
                self.simple_stmt()
                pass
            elif token in [LDPythonParser.NEWLINE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 748
                self.match(LDPythonParser.NEWLINE)
                self.state = 749
                self.match(LDPythonParser.INDENT)
                self.state = 751 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 750
                    self.stmt()
                    self.state = 753 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.BASE) | (1 << LDPythonParser.PREFIX) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS) | (1 << LDPythonParser.STAR))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)) | (1 << (LDPythonParser.AT - 64)))) != 0)):
                        break

                self.state = 755
                self.match(LDPythonParser.DEDENT)
                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 TestContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def or_test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Or_testContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Or_testContext,i)


        def IF(self):
            return self.getToken(LDPythonParser.IF, 0)

        def ELSE(self):
            return self.getToken(LDPythonParser.ELSE, 0)

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def lambdef(self):
            return self.getTypedRuleContext(LDPythonParser.LambdefContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_test

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




    def test(self):

        localctx = LDPythonParser.TestContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_test)
        self._la = 0 # Token type
        try:
            self.state = 768
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,89,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 759
                self.or_test()
                self.state = 765
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.IF:
                    self.state = 760
                    self.match(LDPythonParser.IF)
                    self.state = 761
                    self.or_test()
                    self.state = 762
                    self.match(LDPythonParser.ELSE)
                    self.state = 763
                    self.test()


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 767
                self.lambdef()
                pass


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


    class Test_nocondContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def or_test(self):
            return self.getTypedRuleContext(LDPythonParser.Or_testContext,0)


        def lambdef_nocond(self):
            return self.getTypedRuleContext(LDPythonParser.Lambdef_nocondContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_test_nocond

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




    def test_nocond(self):

        localctx = LDPythonParser.Test_nocondContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_test_nocond)
        try:
            self.state = 772
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,90,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 770
                self.or_test()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 771
                self.lambdef_nocond()
                pass


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


    class LambdefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LAMBDA(self):
            return self.getToken(LDPythonParser.LAMBDA, 0)

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

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def varargslist(self):
            return self.getTypedRuleContext(LDPythonParser.VarargslistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_lambdef

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




    def lambdef(self):

        localctx = LDPythonParser.LambdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_lambdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 774
            self.match(LDPythonParser.LAMBDA)
            self.state = 776
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 48)) & ~0x3f) == 0 and ((1 << (_la - 48)) & ((1 << (LDPythonParser.NAME - 48)) | (1 << (LDPythonParser.STAR - 48)) | (1 << (LDPythonParser.POWER - 48)))) != 0):
                self.state = 775
                self.varargslist()


            self.state = 778
            self.match(LDPythonParser.COLON)
            self.state = 779
            self.test()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Lambdef_nocondContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LAMBDA(self):
            return self.getToken(LDPythonParser.LAMBDA, 0)

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

        def test_nocond(self):
            return self.getTypedRuleContext(LDPythonParser.Test_nocondContext,0)


        def varargslist(self):
            return self.getTypedRuleContext(LDPythonParser.VarargslistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_lambdef_nocond

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




    def lambdef_nocond(self):

        localctx = LDPythonParser.Lambdef_nocondContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_lambdef_nocond)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 781
            self.match(LDPythonParser.LAMBDA)
            self.state = 783
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 48)) & ~0x3f) == 0 and ((1 << (_la - 48)) & ((1 << (LDPythonParser.NAME - 48)) | (1 << (LDPythonParser.STAR - 48)) | (1 << (LDPythonParser.POWER - 48)))) != 0):
                self.state = 782
                self.varargslist()


            self.state = 785
            self.match(LDPythonParser.COLON)
            self.state = 786
            self.test_nocond()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Or_testContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def and_test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.And_testContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.And_testContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_or_test

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




    def or_test(self):

        localctx = LDPythonParser.Or_testContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_or_test)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 788
            self.and_test()
            self.state = 793
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.OR:
                self.state = 789
                self.match(LDPythonParser.OR)
                self.state = 790
                self.and_test()
                self.state = 795
                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 And_testContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def not_test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Not_testContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Not_testContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_and_test

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




    def and_test(self):

        localctx = LDPythonParser.And_testContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_and_test)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 796
            self.not_test()
            self.state = 801
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.AND:
                self.state = 797
                self.match(LDPythonParser.AND)
                self.state = 798
                self.not_test()
                self.state = 803
                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 Not_testContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def not_test(self):
            return self.getTypedRuleContext(LDPythonParser.Not_testContext,0)


        def comparison(self):
            return self.getTypedRuleContext(LDPythonParser.ComparisonContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_not_test

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




    def not_test(self):

        localctx = LDPythonParser.Not_testContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_not_test)
        try:
            self.state = 807
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,95,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 804
                self.match(LDPythonParser.NOT)
                self.state = 805
                self.not_test()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 806
                self.comparison()
                pass


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


    class ComparisonContext(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(LDPythonParser.ExprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.ExprContext,i)


        def comp_op(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Comp_opContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Comp_opContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_comparison

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




    def comparison(self):

        localctx = LDPythonParser.ComparisonContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_comparison)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 809
            self.expr()
            self.state = 815
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IN) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS))) != 0) or ((((_la - 87)) & ~0x3f) == 0 and ((1 << (_la - 87)) & ((1 << (LDPythonParser.LESS_THAN - 87)) | (1 << (LDPythonParser.GREATER_THAN - 87)) | (1 << (LDPythonParser.EQUALS - 87)) | (1 << (LDPythonParser.GT_EQ - 87)) | (1 << (LDPythonParser.LT_EQ - 87)) | (1 << (LDPythonParser.NOT_EQ_2 - 87)))) != 0):
                self.state = 810
                self.comp_op()
                self.state = 811
                self.expr()
                self.state = 817
                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 Comp_opContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LESS_THAN(self):
            return self.getToken(LDPythonParser.LESS_THAN, 0)

        def GREATER_THAN(self):
            return self.getToken(LDPythonParser.GREATER_THAN, 0)

        def EQUALS(self):
            return self.getToken(LDPythonParser.EQUALS, 0)

        def GT_EQ(self):
            return self.getToken(LDPythonParser.GT_EQ, 0)

        def LT_EQ(self):
            return self.getToken(LDPythonParser.LT_EQ, 0)

        def NOT_EQ_2(self):
            return self.getToken(LDPythonParser.NOT_EQ_2, 0)

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

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

        def IS(self):
            return self.getToken(LDPythonParser.IS, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_comp_op

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




    def comp_op(self):

        localctx = LDPythonParser.Comp_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_comp_op)
        try:
            self.state = 830
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,97,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 818
                self.match(LDPythonParser.LESS_THAN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 819
                self.match(LDPythonParser.GREATER_THAN)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 820
                self.match(LDPythonParser.EQUALS)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 821
                self.match(LDPythonParser.GT_EQ)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 822
                self.match(LDPythonParser.LT_EQ)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 823
                self.match(LDPythonParser.NOT_EQ_2)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 824
                self.match(LDPythonParser.IN)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 825
                self.match(LDPythonParser.NOT)
                self.state = 826
                self.match(LDPythonParser.IN)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 827
                self.match(LDPythonParser.IS)
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 828
                self.match(LDPythonParser.IS)
                self.state = 829
                self.match(LDPythonParser.NOT)
                pass


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


    class Star_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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


        def getRuleIndex(self):
            return LDPythonParser.RULE_star_expr

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




    def star_expr(self):

        localctx = LDPythonParser.Star_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_star_expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 832
            self.match(LDPythonParser.STAR)
            self.state = 833
            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 xor_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Xor_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Xor_exprContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_expr

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




    def expr(self):

        localctx = LDPythonParser.ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 835
            self.xor_expr()
            self.state = 840
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.OR_OP:
                self.state = 836
                self.match(LDPythonParser.OR_OP)
                self.state = 837
                self.xor_expr()
                self.state = 842
                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 Xor_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def and_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.And_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.And_exprContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_xor_expr

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




    def xor_expr(self):

        localctx = LDPythonParser.Xor_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_xor_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 843
            self.and_expr()
            self.state = 848
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.XOR:
                self.state = 844
                self.match(LDPythonParser.XOR)
                self.state = 845
                self.and_expr()
                self.state = 850
                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 And_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def shift_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Shift_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Shift_exprContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_and_expr

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




    def and_expr(self):

        localctx = LDPythonParser.And_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_and_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 851
            self.shift_expr()
            self.state = 856
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.AND_OP:
                self.state = 852
                self.match(LDPythonParser.AND_OP)
                self.state = 853
                self.shift_expr()
                self.state = 858
                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 Shift_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def arith_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Arith_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Arith_exprContext,i)


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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_shift_expr

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




    def shift_expr(self):

        localctx = LDPythonParser.Shift_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_shift_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 859
            self.arith_expr()
            self.state = 864
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.LEFT_SHIFT or _la==LDPythonParser.RIGHT_SHIFT:
                self.state = 860
                _la = self._input.LA(1)
                if not(_la==LDPythonParser.LEFT_SHIFT or _la==LDPythonParser.RIGHT_SHIFT):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 861
                self.arith_expr()
                self.state = 866
                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 Arith_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def term(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TermContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TermContext,i)


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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_arith_expr

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




    def arith_expr(self):

        localctx = LDPythonParser.Arith_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_arith_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 867
            self.term()
            self.state = 872
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.ADD or _la==LDPythonParser.MINUS:
                self.state = 868
                _la = self._input.LA(1)
                if not(_la==LDPythonParser.ADD or _la==LDPythonParser.MINUS):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 869
                self.term()
                self.state = 874
                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 TermContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def factor(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.FactorContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.FactorContext,i)


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

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

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

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

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_term

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




    def term(self):

        localctx = LDPythonParser.TermContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_term)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 875
            self.factor()
            self.state = 880
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 63)) & ~0x3f) == 0 and ((1 << (_la - 63)) & ((1 << (LDPythonParser.STAR - 63)) | (1 << (LDPythonParser.DIV - 63)) | (1 << (LDPythonParser.MOD - 63)) | (1 << (LDPythonParser.IDIV - 63)) | (1 << (LDPythonParser.AT - 63)))) != 0):
                self.state = 876
                _la = self._input.LA(1)
                if not(((((_la - 63)) & ~0x3f) == 0 and ((1 << (_la - 63)) & ((1 << (LDPythonParser.STAR - 63)) | (1 << (LDPythonParser.DIV - 63)) | (1 << (LDPythonParser.MOD - 63)) | (1 << (LDPythonParser.IDIV - 63)) | (1 << (LDPythonParser.AT - 63)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 877
                self.factor()
                self.state = 882
                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 FactorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def factor(self):
            return self.getTypedRuleContext(LDPythonParser.FactorContext,0)


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

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

        def NOT_OP(self):
            return self.getToken(LDPythonParser.NOT_OP, 0)

        def power(self):
            return self.getTypedRuleContext(LDPythonParser.PowerContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_factor

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




    def factor(self):

        localctx = LDPythonParser.FactorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_factor)
        self._la = 0 # Token type
        try:
            self.state = 886
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP]:
                self.enterOuterAlt(localctx, 1)
                self.state = 883
                _la = self._input.LA(1)
                if not(((((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & ((1 << (LDPythonParser.ADD - 78)) | (1 << (LDPythonParser.MINUS - 78)) | (1 << (LDPythonParser.NOT_OP - 78)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 884
                self.factor()
                pass
            elif token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                self.enterOuterAlt(localctx, 2)
                self.state = 885
                self.power()
                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 PowerContext(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(LDPythonParser.Atom_exprContext,0)


        def POWER(self):
            return self.getToken(LDPythonParser.POWER, 0)

        def factor(self):
            return self.getTypedRuleContext(LDPythonParser.FactorContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_power

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




    def power(self):

        localctx = LDPythonParser.PowerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_power)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 888
            self.atom_expr()
            self.state = 891
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.POWER:
                self.state = 889
                self.match(LDPythonParser.POWER)
                self.state = 890
                self.factor()


        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 atom(self):
            return self.getTypedRuleContext(LDPythonParser.AtomContext,0)


        def AWAIT(self):
            return self.getToken(LDPythonParser.AWAIT, 0)

        def trailer(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TrailerContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TrailerContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_atom_expr

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




    def atom_expr(self):

        localctx = LDPythonParser.Atom_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_atom_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 894
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,106,self._ctx)
            if la_ == 1:
                self.state = 893
                self.match(LDPythonParser.AWAIT)


            self.state = 896
            self.atom()
            self.state = 900
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((((_la - 61)) & ~0x3f) == 0 and ((1 << (_la - 61)) & ((1 << (LDPythonParser.DOT - 61)) | (1 << (LDPythonParser.OPEN_PAREN - 61)) | (1 << (LDPythonParser.OPEN_BRACK - 61)))) != 0):
                self.state = 897
                self.trailer()
                self.state = 902
                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 AtomContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

        def OPEN_BRACK(self):
            return self.getToken(LDPythonParser.OPEN_BRACK, 0)

        def CLOSE_BRACK(self):
            return self.getToken(LDPythonParser.CLOSE_BRACK, 0)

        def OPEN_BRACE(self):
            return self.getToken(LDPythonParser.OPEN_BRACE, 0)

        def CLOSE_BRACE(self):
            return self.getToken(LDPythonParser.CLOSE_BRACE, 0)

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

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

        def ELLIPSIS(self):
            return self.getToken(LDPythonParser.ELLIPSIS, 0)

        def NONE(self):
            return self.getToken(LDPythonParser.NONE, 0)

        def TRUE(self):
            return self.getToken(LDPythonParser.TRUE, 0)

        def FALSE(self):
            return self.getToken(LDPythonParser.FALSE, 0)

        def iri(self):
            return self.getTypedRuleContext(LDPythonParser.IriContext,0)


        def var(self):
            return self.getTypedRuleContext(LDPythonParser.VarContext,0)


        def firi(self):
            return self.getTypedRuleContext(LDPythonParser.FiriContext,0)


        def construct_template(self):
            return self.getTypedRuleContext(LDPythonParser.Construct_templateContext,0)


        def yield_expr(self):
            return self.getTypedRuleContext(LDPythonParser.Yield_exprContext,0)


        def testlist_comp(self):
            return self.getTypedRuleContext(LDPythonParser.Testlist_compContext,0)


        def dictorsetmaker(self):
            return self.getTypedRuleContext(LDPythonParser.DictorsetmakerContext,0)


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

        def rdf_literal(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Rdf_literalContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Rdf_literalContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_atom

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




    def atom(self):

        localctx = LDPythonParser.AtomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_atom)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 939
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,113,self._ctx)
            if la_ == 1:
                self.state = 903
                self.match(LDPythonParser.OPEN_PAREN)
                self.state = 906
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,108,self._ctx)
                if la_ == 1:
                    self.state = 904
                    self.yield_expr()

                elif la_ == 2:
                    self.state = 905
                    self.testlist_comp()


                self.state = 908
                self.match(LDPythonParser.CLOSE_PAREN)
                pass

            elif la_ == 2:
                self.state = 909
                self.match(LDPythonParser.OPEN_BRACK)
                self.state = 911
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS) | (1 << LDPythonParser.STAR))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                    self.state = 910
                    self.testlist_comp()


                self.state = 913
                self.match(LDPythonParser.CLOSE_BRACK)
                pass

            elif la_ == 3:
                self.state = 914
                self.match(LDPythonParser.OPEN_BRACE)
                self.state = 916
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                    self.state = 915
                    self.dictorsetmaker()


                self.state = 918
                self.match(LDPythonParser.CLOSE_BRACE)
                pass

            elif la_ == 4:
                self.state = 919
                self.match(LDPythonParser.NAME)
                pass

            elif la_ == 5:
                self.state = 920
                self.match(LDPythonParser.NUMBER)
                pass

            elif la_ == 6:
                self.state = 922 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 921
                    self.match(LDPythonParser.STRING)
                    self.state = 924 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==LDPythonParser.STRING):
                        break

                pass

            elif la_ == 7:
                self.state = 927 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 926
                    self.rdf_literal()
                    self.state = 929 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==LDPythonParser.STRING):
                        break

                pass

            elif la_ == 8:
                self.state = 931
                self.match(LDPythonParser.ELLIPSIS)
                pass

            elif la_ == 9:
                self.state = 932
                self.match(LDPythonParser.NONE)
                pass

            elif la_ == 10:
                self.state = 933
                self.match(LDPythonParser.TRUE)
                pass

            elif la_ == 11:
                self.state = 934
                self.match(LDPythonParser.FALSE)
                pass

            elif la_ == 12:
                self.state = 935
                self.iri()
                pass

            elif la_ == 13:
                self.state = 936
                self.var()
                pass

            elif la_ == 14:
                self.state = 937
                self.firi()
                pass

            elif la_ == 15:
                self.state = 938
                self.construct_template()
                pass


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


    class Testlist_compContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


        def star_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Star_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Star_exprContext,i)


        def comp_for(self):
            return self.getTypedRuleContext(LDPythonParser.Comp_forContext,0)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_testlist_comp

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




    def testlist_comp(self):

        localctx = LDPythonParser.Testlist_compContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_testlist_comp)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 943
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                self.state = 941
                self.test()
                pass
            elif token in [LDPythonParser.STAR]:
                self.state = 942
                self.star_expr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 959
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.FOR]:
                self.state = 945
                self.comp_for()
                pass
            elif token in [LDPythonParser.CLOSE_PAREN, LDPythonParser.COMMA, LDPythonParser.CLOSE_BRACK]:
                self.state = 953
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,116,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 946
                        self.match(LDPythonParser.COMMA)
                        self.state = 949
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                            self.state = 947
                            self.test()
                            pass
                        elif token in [LDPythonParser.STAR]:
                            self.state = 948
                            self.star_expr()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 955
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,116,self._ctx)

                self.state = 957
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COMMA:
                    self.state = 956
                    self.match(LDPythonParser.COMMA)


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

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

        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

        def arglist(self):
            return self.getTypedRuleContext(LDPythonParser.ArglistContext,0)


        def OPEN_BRACK(self):
            return self.getToken(LDPythonParser.OPEN_BRACK, 0)

        def subscriptlist(self):
            return self.getTypedRuleContext(LDPythonParser.SubscriptlistContext,0)


        def CLOSE_BRACK(self):
            return self.getToken(LDPythonParser.CLOSE_BRACK, 0)

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

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_trailer

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




    def trailer(self):

        localctx = LDPythonParser.TrailerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_trailer)
        self._la = 0 # Token type
        try:
            self.state = 972
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.OPEN_PAREN]:
                self.enterOuterAlt(localctx, 1)
                self.state = 961
                self.match(LDPythonParser.OPEN_PAREN)
                self.state = 963
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS) | (1 << LDPythonParser.STAR))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.POWER - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                    self.state = 962
                    self.arglist()


                self.state = 965
                self.match(LDPythonParser.CLOSE_PAREN)
                pass
            elif token in [LDPythonParser.OPEN_BRACK]:
                self.enterOuterAlt(localctx, 2)
                self.state = 966
                self.match(LDPythonParser.OPEN_BRACK)
                self.state = 967
                self.subscriptlist()
                self.state = 968
                self.match(LDPythonParser.CLOSE_BRACK)
                pass
            elif token in [LDPythonParser.DOT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 970
                self.match(LDPythonParser.DOT)
                self.state = 971
                self.match(LDPythonParser.NAME)
                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 SubscriptlistContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def subscript(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.SubscriptContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.SubscriptContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_subscriptlist

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




    def subscriptlist(self):

        localctx = LDPythonParser.SubscriptlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_subscriptlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 974
            self.subscript()
            self.state = 979
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,121,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 975
                    self.match(LDPythonParser.COMMA)
                    self.state = 976
                    self.subscript() 
                self.state = 981
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,121,self._ctx)

            self.state = 983
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.COMMA:
                self.state = 982
                self.match(LDPythonParser.COMMA)


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


    class SubscriptContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

        def sliceop(self):
            return self.getTypedRuleContext(LDPythonParser.SliceopContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_subscript

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




    def subscript(self):

        localctx = LDPythonParser.SubscriptContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_subscript)
        self._la = 0 # Token type
        try:
            self.state = 996
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,126,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 985
                self.test()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 987
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,123,self._ctx)
                if la_ == 1:
                    self.state = 986
                    self.test()


                self.state = 989
                self.match(LDPythonParser.COLON)
                self.state = 991
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,124,self._ctx)
                if la_ == 1:
                    self.state = 990
                    self.test()


                self.state = 994
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COLON:
                    self.state = 993
                    self.sliceop()


                pass


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


    class SliceopContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_sliceop

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




    def sliceop(self):

        localctx = LDPythonParser.SliceopContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_sliceop)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 998
            self.match(LDPythonParser.COLON)
            self.state = 1000
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                self.state = 999
                self.test()


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


    class ExprlistContext(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(LDPythonParser.ExprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.ExprContext,i)


        def star_expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Star_exprContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Star_exprContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_exprlist

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




    def exprlist(self):

        localctx = LDPythonParser.ExprlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_exprlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1004
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                self.state = 1002
                self.expr()
                pass
            elif token in [LDPythonParser.STAR]:
                self.state = 1003
                self.star_expr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 1013
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,130,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1006
                    self.match(LDPythonParser.COMMA)
                    self.state = 1009
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                        self.state = 1007
                        self.expr()
                        pass
                    elif token in [LDPythonParser.STAR]:
                        self.state = 1008
                        self.star_expr()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 1015
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,130,self._ctx)

            self.state = 1017
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.COMMA:
                self.state = 1016
                self.match(LDPythonParser.COMMA)


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


    class TestlistContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_testlist

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




    def testlist(self):

        localctx = LDPythonParser.TestlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_testlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1019
            self.test()
            self.state = 1024
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,132,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1020
                    self.match(LDPythonParser.COMMA)
                    self.state = 1021
                    self.test() 
                self.state = 1026
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,132,self._ctx)

            self.state = 1028
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.COMMA:
                self.state = 1027
                self.match(LDPythonParser.COMMA)


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


    class DictorsetmakerContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

        def comp_for(self):
            return self.getTypedRuleContext(LDPythonParser.Comp_forContext,0)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_dictorsetmaker

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




    def dictorsetmaker(self):

        localctx = LDPythonParser.DictorsetmakerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_dictorsetmaker)
        self._la = 0 # Token type
        try:
            self.state = 1063
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,140,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1030
                self.test()
                self.state = 1031
                self.match(LDPythonParser.COLON)
                self.state = 1032
                self.test()
                self.state = 1047
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [LDPythonParser.FOR]:
                    self.state = 1033
                    self.comp_for()
                    pass
                elif token in [LDPythonParser.COMMA, LDPythonParser.CLOSE_BRACE]:
                    self.state = 1041
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,134,self._ctx)
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt==1:
                            self.state = 1034
                            self.match(LDPythonParser.COMMA)
                            self.state = 1035
                            self.test()
                            self.state = 1036
                            self.match(LDPythonParser.COLON)
                            self.state = 1037
                            self.test() 
                        self.state = 1043
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,134,self._ctx)

                    self.state = 1045
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==LDPythonParser.COMMA:
                        self.state = 1044
                        self.match(LDPythonParser.COMMA)


                    pass
                else:
                    raise NoViableAltException(self)

                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1049
                self.test()
                self.state = 1061
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [LDPythonParser.FOR]:
                    self.state = 1050
                    self.comp_for()
                    pass
                elif token in [LDPythonParser.COMMA, LDPythonParser.CLOSE_BRACE]:
                    self.state = 1055
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,137,self._ctx)
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt==1:
                            self.state = 1051
                            self.match(LDPythonParser.COMMA)
                            self.state = 1052
                            self.test() 
                        self.state = 1057
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,137,self._ctx)

                    self.state = 1059
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==LDPythonParser.COMMA:
                        self.state = 1058
                        self.match(LDPythonParser.COMMA)


                    pass
                else:
                    raise NoViableAltException(self)

                pass


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


    class ClassdefContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CLASS(self):
            return self.getToken(LDPythonParser.CLASS, 0)

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

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

        def suite(self):
            return self.getTypedRuleContext(LDPythonParser.SuiteContext,0)


        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

        def arglist(self):
            return self.getTypedRuleContext(LDPythonParser.ArglistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_classdef

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




    def classdef(self):

        localctx = LDPythonParser.ClassdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_classdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1065
            self.match(LDPythonParser.CLASS)
            self.state = 1066
            self.match(LDPythonParser.NAME)
            self.state = 1072
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.OPEN_PAREN:
                self.state = 1067
                self.match(LDPythonParser.OPEN_PAREN)
                self.state = 1069
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS) | (1 << LDPythonParser.STAR))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.POWER - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                    self.state = 1068
                    self.arglist()


                self.state = 1071
                self.match(LDPythonParser.CLOSE_PAREN)


            self.state = 1074
            self.match(LDPythonParser.COLON)
            self.state = 1075
            self.suite()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ArglistContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def argument(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.ArgumentContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.ArgumentContext,i)


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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


        def POWER(self):
            return self.getToken(LDPythonParser.POWER, 0)

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_arglist

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




    def arglist(self):

        localctx = LDPythonParser.ArglistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_arglist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1082
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,143,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1077
                    self.argument()
                    self.state = 1078
                    self.match(LDPythonParser.COMMA) 
                self.state = 1084
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,143,self._ctx)

            self.state = 1105
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IRIREF, LDPythonParser.FIRIREF_START, LDPythonParser.STRING, LDPythonParser.NUMBER, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.VAR1, LDPythonParser.VAR2, LDPythonParser.ELLIPSIS, LDPythonParser.OPEN_PAREN, LDPythonParser.COLON, LDPythonParser.OPEN_BRACK, LDPythonParser.ADD, LDPythonParser.MINUS, LDPythonParser.NOT_OP, LDPythonParser.OPEN_BRACE, LDPythonParser.OPEN_GRAPH]:
                self.state = 1085
                self.argument()
                self.state = 1087
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COMMA:
                    self.state = 1086
                    self.match(LDPythonParser.COMMA)


                pass
            elif token in [LDPythonParser.STAR]:
                self.state = 1089
                self.match(LDPythonParser.STAR)
                self.state = 1090
                self.test()
                self.state = 1095
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,145,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 1091
                        self.match(LDPythonParser.COMMA)
                        self.state = 1092
                        self.argument() 
                    self.state = 1097
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,145,self._ctx)

                self.state = 1101
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.COMMA:
                    self.state = 1098
                    self.match(LDPythonParser.COMMA)
                    self.state = 1099
                    self.match(LDPythonParser.POWER)
                    self.state = 1100
                    self.test()


                pass
            elif token in [LDPythonParser.POWER]:
                self.state = 1103
                self.match(LDPythonParser.POWER)
                self.state = 1104
                self.test()
                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 ArgumentContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


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

        def comp_for(self):
            return self.getTypedRuleContext(LDPythonParser.Comp_forContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_argument

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




    def argument(self):

        localctx = LDPythonParser.ArgumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_argument)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1115
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,149,self._ctx)
            if la_ == 1:
                self.state = 1107
                self.test()
                self.state = 1109
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LDPythonParser.FOR:
                    self.state = 1108
                    self.comp_for()


                pass

            elif la_ == 2:
                self.state = 1111
                self.test()
                self.state = 1112
                self.match(LDPythonParser.ASSIGN)
                self.state = 1113
                self.test()
                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_iterContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def comp_for(self):
            return self.getTypedRuleContext(LDPythonParser.Comp_forContext,0)


        def comp_if(self):
            return self.getTypedRuleContext(LDPythonParser.Comp_ifContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_comp_iter

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




    def comp_iter(self):

        localctx = LDPythonParser.Comp_iterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_comp_iter)
        try:
            self.state = 1119
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.FOR]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1117
                self.comp_for()
                pass
            elif token in [LDPythonParser.IF]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1118
                self.comp_if()
                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 Comp_forContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FOR(self):
            return self.getToken(LDPythonParser.FOR, 0)

        def exprlist(self):
            return self.getTypedRuleContext(LDPythonParser.ExprlistContext,0)


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

        def or_test(self):
            return self.getTypedRuleContext(LDPythonParser.Or_testContext,0)


        def comp_iter(self):
            return self.getTypedRuleContext(LDPythonParser.Comp_iterContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_comp_for

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




    def comp_for(self):

        localctx = LDPythonParser.Comp_forContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_comp_for)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1121
            self.match(LDPythonParser.FOR)
            self.state = 1122
            self.exprlist()
            self.state = 1123
            self.match(LDPythonParser.IN)
            self.state = 1124
            self.or_test()
            self.state = 1126
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.IF or _la==LDPythonParser.FOR:
                self.state = 1125
                self.comp_iter()


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


    class Comp_ifContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IF(self):
            return self.getToken(LDPythonParser.IF, 0)

        def test_nocond(self):
            return self.getTypedRuleContext(LDPythonParser.Test_nocondContext,0)


        def comp_iter(self):
            return self.getTypedRuleContext(LDPythonParser.Comp_iterContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_comp_if

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




    def comp_if(self):

        localctx = LDPythonParser.Comp_ifContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_comp_if)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1128
            self.match(LDPythonParser.IF)
            self.state = 1129
            self.test_nocond()
            self.state = 1131
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.IF or _la==LDPythonParser.FOR:
                self.state = 1130
                self.comp_iter()


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


    class Encoding_declContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_encoding_decl

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




    def encoding_decl(self):

        localctx = LDPythonParser.Encoding_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_encoding_decl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1133
            self.match(LDPythonParser.NAME)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Yield_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def YIELD(self):
            return self.getToken(LDPythonParser.YIELD, 0)

        def yield_arg(self):
            return self.getTypedRuleContext(LDPythonParser.Yield_argContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_yield_expr

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




    def yield_expr(self):

        localctx = LDPythonParser.Yield_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 170, self.RULE_yield_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1135
            self.match(LDPythonParser.YIELD)
            self.state = 1137
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2) | (1 << LDPythonParser.ELLIPSIS))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)) | (1 << (LDPythonParser.ADD - 64)) | (1 << (LDPythonParser.MINUS - 64)) | (1 << (LDPythonParser.NOT_OP - 64)) | (1 << (LDPythonParser.OPEN_BRACE - 64)) | (1 << (LDPythonParser.OPEN_GRAPH - 64)))) != 0):
                self.state = 1136
                self.yield_arg()


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


    class Yield_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FROM(self):
            return self.getToken(LDPythonParser.FROM, 0)

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def testlist(self):
            return self.getTypedRuleContext(LDPythonParser.TestlistContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_yield_arg

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




    def yield_arg(self):

        localctx = LDPythonParser.Yield_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_yield_arg)
        try:
            self.state = 1142
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,154,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1139
                self.match(LDPythonParser.FROM)
                self.state = 1140
                self.test()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1141
                self.testlist()
                pass


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


    class Construct_templateContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_GRAPH(self):
            return self.getToken(LDPythonParser.OPEN_GRAPH, 0)

        def CLOSE_BRACE(self):
            return self.getToken(LDPythonParser.CLOSE_BRACE, 0)

        def construct_triples(self):
            return self.getTypedRuleContext(LDPythonParser.Construct_triplesContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_construct_template

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




    def construct_template(self):

        localctx = LDPythonParser.Construct_templateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 174, self.RULE_construct_template)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1144
            self.match(LDPythonParser.OPEN_GRAPH)
            self.state = 1146
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.T__1) | (1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.BLANK_NODE_LABEL) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)))) != 0):
                self.state = 1145
                self.construct_triples()


            self.state = 1148
            self.match(LDPythonParser.CLOSE_BRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Construct_triplesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def triples_same_subject(self):
            return self.getTypedRuleContext(LDPythonParser.Triples_same_subjectContext,0)


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

        def construct_triples(self):
            return self.getTypedRuleContext(LDPythonParser.Construct_triplesContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_construct_triples

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




    def construct_triples(self):

        localctx = LDPythonParser.Construct_triplesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 176, self.RULE_construct_triples)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1150
            self.triples_same_subject()
            self.state = 1155
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LDPythonParser.DOT:
                self.state = 1151
                self.match(LDPythonParser.DOT)
                self.state = 1153
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.T__1) | (1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.BLANK_NODE_LABEL) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)))) != 0):
                    self.state = 1152
                    self.construct_triples()




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


    class Triples_same_subjectContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var_or_term(self):
            return self.getTypedRuleContext(LDPythonParser.Var_or_termContext,0)


        def property_list_not_empty(self):
            return self.getTypedRuleContext(LDPythonParser.Property_list_not_emptyContext,0)


        def triples_node(self):
            return self.getTypedRuleContext(LDPythonParser.Triples_nodeContext,0)


        def property_list(self):
            return self.getTypedRuleContext(LDPythonParser.Property_listContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_triples_same_subject

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




    def triples_same_subject(self):

        localctx = LDPythonParser.Triples_same_subjectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 178, self.RULE_triples_same_subject)
        try:
            self.state = 1163
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,158,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1157
                self.var_or_term()
                self.state = 1158
                self.property_list_not_empty()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1160
                self.triples_node()
                self.state = 1161
                self.property_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 Property_listContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def property_list_not_empty(self):
            return self.getTypedRuleContext(LDPythonParser.Property_list_not_emptyContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_property_list

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




    def property_list(self):

        localctx = LDPythonParser.Property_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 180, self.RULE_property_list)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1166
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,159,self._ctx)
            if la_ == 1:
                self.state = 1165
                self.property_list_not_empty()


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


    class Property_list_not_emptyContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def verb(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.VerbContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.VerbContext,i)


        def object_list(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Object_listContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Object_listContext,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_property_list_not_empty

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




    def property_list_not_empty(self):

        localctx = LDPythonParser.Property_list_not_emptyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 182, self.RULE_property_list_not_empty)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1168
            self.verb()
            self.state = 1169
            self.object_list()
            self.state = 1178
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.SEMI_COLON:
                self.state = 1170
                self.match(LDPythonParser.SEMI_COLON)
                self.state = 1174
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,160,self._ctx)
                if la_ == 1:
                    self.state = 1171
                    self.verb()
                    self.state = 1172
                    self.object_list()


                self.state = 1180
                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 VerbContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def var_or_iri(self):
            return self.getTypedRuleContext(LDPythonParser.Var_or_iriContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_verb

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




    def verb(self):

        localctx = LDPythonParser.VerbContext(self, self._ctx, self.state)
        self.enterRule(localctx, 184, self.RULE_verb)
        try:
            self.state = 1184
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,162,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1181
                if not self._input.LT(1).text == 'a':
                    from antlr4.error.Errors import FailedPredicateException
                    raise FailedPredicateException(self, "self._input.LT(1).text == 'a'")
                self.state = 1182
                self.match(LDPythonParser.NAME)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1183
                self.var_or_iri()
                pass


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


    class Object_listContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def object_(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Object_Context)
            else:
                return self.getTypedRuleContext(LDPythonParser.Object_Context,i)


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

        def getRuleIndex(self):
            return LDPythonParser.RULE_object_list

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




    def object_list(self):

        localctx = LDPythonParser.Object_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 186, self.RULE_object_list)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1186
            self.object_()
            self.state = 1191
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.COMMA:
                self.state = 1187
                self.match(LDPythonParser.COMMA)
                self.state = 1188
                self.object_()
                self.state = 1193
                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 Object_Context(ParserRuleContext):
        __slots__ = 'parser'

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

        def graph_node(self):
            return self.getTypedRuleContext(LDPythonParser.Graph_nodeContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_object_

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




    def object_(self):

        localctx = LDPythonParser.Object_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 188, self.RULE_object_)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1194
            self.graph_node()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Triples_nodeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def collection(self):
            return self.getTypedRuleContext(LDPythonParser.CollectionContext,0)


        def blank_node_property_list(self):
            return self.getTypedRuleContext(LDPythonParser.Blank_node_property_listContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_triples_node

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




    def triples_node(self):

        localctx = LDPythonParser.Triples_nodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 190, self.RULE_triples_node)
        try:
            self.state = 1198
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.OPEN_PAREN]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1196
                self.collection()
                pass
            elif token in [LDPythonParser.OPEN_BRACK]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1197
                self.blank_node_property_list()
                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 Blank_node_property_listContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACK(self):
            return self.getToken(LDPythonParser.OPEN_BRACK, 0)

        def property_list_not_empty(self):
            return self.getTypedRuleContext(LDPythonParser.Property_list_not_emptyContext,0)


        def CLOSE_BRACK(self):
            return self.getToken(LDPythonParser.CLOSE_BRACK, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_blank_node_property_list

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




    def blank_node_property_list(self):

        localctx = LDPythonParser.Blank_node_property_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 192, self.RULE_blank_node_property_list)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1200
            self.match(LDPythonParser.OPEN_BRACK)
            self.state = 1201
            self.property_list_not_empty()
            self.state = 1202
            self.match(LDPythonParser.CLOSE_BRACK)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CollectionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

        def graph_node(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.Graph_nodeContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.Graph_nodeContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_collection

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




    def collection(self):

        localctx = LDPythonParser.CollectionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 194, self.RULE_collection)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1204
            self.match(LDPythonParser.OPEN_PAREN)
            self.state = 1206 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 1205
                self.graph_node()
                self.state = 1208 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.T__1) | (1 << LDPythonParser.IRIREF) | (1 << LDPythonParser.FIRIREF_START) | (1 << LDPythonParser.STRING) | (1 << LDPythonParser.NUMBER) | (1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME) | (1 << LDPythonParser.BLANK_NODE_LABEL) | (1 << LDPythonParser.VAR1) | (1 << LDPythonParser.VAR2))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (LDPythonParser.OPEN_PAREN - 64)) | (1 << (LDPythonParser.COLON - 64)) | (1 << (LDPythonParser.OPEN_BRACK - 64)))) != 0)):
                    break

            self.state = 1210
            self.match(LDPythonParser.CLOSE_PAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Graph_nodeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def var_or_term(self):
            return self.getTypedRuleContext(LDPythonParser.Var_or_termContext,0)


        def triples_node(self):
            return self.getTypedRuleContext(LDPythonParser.Triples_nodeContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_graph_node

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




    def graph_node(self):

        localctx = LDPythonParser.Graph_nodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 196, self.RULE_graph_node)
        try:
            self.state = 1214
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,166,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1212
                self.var_or_term()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1213
                self.triples_node()
                pass


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


    class Var_or_termContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def graph_term(self):
            return self.getTypedRuleContext(LDPythonParser.Graph_termContext,0)


        def var(self):
            return self.getTypedRuleContext(LDPythonParser.VarContext,0)


        def firi(self):
            return self.getTypedRuleContext(LDPythonParser.FiriContext,0)


        def fnode(self):
            return self.getTypedRuleContext(LDPythonParser.FnodeContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_var_or_term

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




    def var_or_term(self):

        localctx = LDPythonParser.Var_or_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 198, self.RULE_var_or_term)
        try:
            self.state = 1220
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,167,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1216
                self.graph_term()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1217
                self.var()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1218
                self.firi()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1219
                self.fnode()
                pass


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


    class Var_or_iriContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(LDPythonParser.IriContext,0)


        def var(self):
            return self.getTypedRuleContext(LDPythonParser.VarContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_var_or_iri

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




    def var_or_iri(self):

        localctx = LDPythonParser.Var_or_iriContext(self, self._ctx, self.state)
        self.enterRule(localctx, 200, self.RULE_var_or_iri)
        try:
            self.state = 1224
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IRIREF, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.COLON]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1222
                self.iri()
                pass
            elif token in [LDPythonParser.VAR1, LDPythonParser.VAR2]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1223
                self.var()
                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 VarContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def VAR1(self):
            return self.getToken(LDPythonParser.VAR1, 0)

        def VAR2(self):
            return self.getToken(LDPythonParser.VAR2, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_var

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




    def var(self):

        localctx = LDPythonParser.VarContext(self, self._ctx, self.state)
        self.enterRule(localctx, 202, self.RULE_var)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1226
            _la = self._input.LA(1)
            if not(_la==LDPythonParser.VAR1 or _la==LDPythonParser.VAR2):
                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 Graph_termContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def iri(self):
            return self.getTypedRuleContext(LDPythonParser.IriContext,0)


        def rdf_literal(self):
            return self.getTypedRuleContext(LDPythonParser.Rdf_literalContext,0)


        def var(self):
            return self.getTypedRuleContext(LDPythonParser.VarContext,0)


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

        def TRUE(self):
            return self.getToken(LDPythonParser.TRUE, 0)

        def FALSE(self):
            return self.getToken(LDPythonParser.FALSE, 0)

        def blank_node(self):
            return self.getTypedRuleContext(LDPythonParser.Blank_nodeContext,0)


        def nil(self):
            return self.getTypedRuleContext(LDPythonParser.NilContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_graph_term

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




    def graph_term(self):

        localctx = LDPythonParser.Graph_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 204, self.RULE_graph_term)
        try:
            self.state = 1236
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,169,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1228
                self.iri()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1229
                self.rdf_literal()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1230
                self.var()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1231
                self.match(LDPythonParser.NUMBER)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 1232
                self.match(LDPythonParser.TRUE)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 1233
                self.match(LDPythonParser.FALSE)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 1234
                self.blank_node()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 1235
                self.nil()
                pass


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


    class Rdf_literalContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def LANGTAG(self):
            return self.getToken(LDPythonParser.LANGTAG, 0)

        def iri(self):
            return self.getTypedRuleContext(LDPythonParser.IriContext,0)


        def firi(self):
            return self.getTypedRuleContext(LDPythonParser.FiriContext,0)


        def fnode(self):
            return self.getTypedRuleContext(LDPythonParser.FnodeContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_rdf_literal

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




    def rdf_literal(self):

        localctx = LDPythonParser.Rdf_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 206, self.RULE_rdf_literal)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1238
            self.match(LDPythonParser.STRING)
            self.state = 1246
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,171,self._ctx)
            if la_ == 1:
                self.state = 1239
                self.match(LDPythonParser.LANGTAG)

            elif la_ == 2:
                self.state = 1240
                self.match(LDPythonParser.T__0)
                self.state = 1244
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [LDPythonParser.IRIREF, LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.COLON]:
                    self.state = 1241
                    self.iri()
                    pass
                elif token in [LDPythonParser.FIRIREF_START]:
                    self.state = 1242
                    self.firi()
                    pass
                elif token in [LDPythonParser.T__1]:
                    self.state = 1243
                    self.fnode()
                    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 IriContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IRIREF(self):
            return self.getToken(LDPythonParser.IRIREF, 0)

        def prefixed_name(self):
            return self.getTypedRuleContext(LDPythonParser.Prefixed_nameContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_iri

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




    def iri(self):

        localctx = LDPythonParser.IriContext(self, self._ctx, self.state)
        self.enterRule(localctx, 208, self.RULE_iri)
        try:
            self.state = 1250
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.IRIREF]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1248
                self.match(LDPythonParser.IRIREF)
                pass
            elif token in [LDPythonParser.DEF, LDPythonParser.RETURN, LDPythonParser.RAISE, LDPythonParser.FROM, LDPythonParser.IMPORT, LDPythonParser.AS, LDPythonParser.GLOBAL, LDPythonParser.NONLOCAL, LDPythonParser.ASSERT, LDPythonParser.IF, LDPythonParser.ELIF, LDPythonParser.ELSE, LDPythonParser.WHILE, LDPythonParser.FOR, LDPythonParser.IN, LDPythonParser.TRY, LDPythonParser.FINALLY, LDPythonParser.WITH, LDPythonParser.EXCEPT, LDPythonParser.LAMBDA, LDPythonParser.OR, LDPythonParser.AND, LDPythonParser.NOT, LDPythonParser.IS, LDPythonParser.NONE, LDPythonParser.TRUE, LDPythonParser.FALSE, LDPythonParser.CLASS, LDPythonParser.YIELD, LDPythonParser.DEL, LDPythonParser.PASS, LDPythonParser.CONTINUE, LDPythonParser.BREAK, LDPythonParser.ASYNC, LDPythonParser.AWAIT, LDPythonParser.NAME, LDPythonParser.COLON]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1249
                self.prefixed_name()
                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 Prefixed_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def all_names(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.All_namesContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.All_namesContext,i)


        def getRuleIndex(self):
            return LDPythonParser.RULE_prefixed_name

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




    def prefixed_name(self):

        localctx = LDPythonParser.Prefixed_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 210, self.RULE_prefixed_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.enableWs();
            self.state = 1254
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME))) != 0):
                self.state = 1253
                self.all_names()


            self.state = 1256
            self.match(LDPythonParser.COLON)
            self.state = 1258
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,174,self._ctx)
            if la_ == 1:
                self.state = 1257
                self.all_names()


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


    class All_namesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEF(self):
            return self.getToken(LDPythonParser.DEF, 0)

        def RETURN(self):
            return self.getToken(LDPythonParser.RETURN, 0)

        def RAISE(self):
            return self.getToken(LDPythonParser.RAISE, 0)

        def FROM(self):
            return self.getToken(LDPythonParser.FROM, 0)

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

        def AS(self):
            return self.getToken(LDPythonParser.AS, 0)

        def GLOBAL(self):
            return self.getToken(LDPythonParser.GLOBAL, 0)

        def NONLOCAL(self):
            return self.getToken(LDPythonParser.NONLOCAL, 0)

        def ASSERT(self):
            return self.getToken(LDPythonParser.ASSERT, 0)

        def IF(self):
            return self.getToken(LDPythonParser.IF, 0)

        def ELIF(self):
            return self.getToken(LDPythonParser.ELIF, 0)

        def ELSE(self):
            return self.getToken(LDPythonParser.ELSE, 0)

        def WHILE(self):
            return self.getToken(LDPythonParser.WHILE, 0)

        def FOR(self):
            return self.getToken(LDPythonParser.FOR, 0)

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

        def TRY(self):
            return self.getToken(LDPythonParser.TRY, 0)

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

        def WITH(self):
            return self.getToken(LDPythonParser.WITH, 0)

        def EXCEPT(self):
            return self.getToken(LDPythonParser.EXCEPT, 0)

        def LAMBDA(self):
            return self.getToken(LDPythonParser.LAMBDA, 0)

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

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

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

        def IS(self):
            return self.getToken(LDPythonParser.IS, 0)

        def NONE(self):
            return self.getToken(LDPythonParser.NONE, 0)

        def TRUE(self):
            return self.getToken(LDPythonParser.TRUE, 0)

        def FALSE(self):
            return self.getToken(LDPythonParser.FALSE, 0)

        def CLASS(self):
            return self.getToken(LDPythonParser.CLASS, 0)

        def YIELD(self):
            return self.getToken(LDPythonParser.YIELD, 0)

        def DEL(self):
            return self.getToken(LDPythonParser.DEL, 0)

        def PASS(self):
            return self.getToken(LDPythonParser.PASS, 0)

        def CONTINUE(self):
            return self.getToken(LDPythonParser.CONTINUE, 0)

        def BREAK(self):
            return self.getToken(LDPythonParser.BREAK, 0)

        def ASYNC(self):
            return self.getToken(LDPythonParser.ASYNC, 0)

        def AWAIT(self):
            return self.getToken(LDPythonParser.AWAIT, 0)

        def NAME(self):
            return self.getToken(LDPythonParser.NAME, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_all_names

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




    def all_names(self):

        localctx = LDPythonParser.All_namesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 212, self.RULE_all_names)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1262
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LDPythonParser.DEF) | (1 << LDPythonParser.RETURN) | (1 << LDPythonParser.RAISE) | (1 << LDPythonParser.FROM) | (1 << LDPythonParser.IMPORT) | (1 << LDPythonParser.AS) | (1 << LDPythonParser.GLOBAL) | (1 << LDPythonParser.NONLOCAL) | (1 << LDPythonParser.ASSERT) | (1 << LDPythonParser.IF) | (1 << LDPythonParser.ELIF) | (1 << LDPythonParser.ELSE) | (1 << LDPythonParser.WHILE) | (1 << LDPythonParser.FOR) | (1 << LDPythonParser.IN) | (1 << LDPythonParser.TRY) | (1 << LDPythonParser.FINALLY) | (1 << LDPythonParser.WITH) | (1 << LDPythonParser.EXCEPT) | (1 << LDPythonParser.LAMBDA) | (1 << LDPythonParser.OR) | (1 << LDPythonParser.AND) | (1 << LDPythonParser.NOT) | (1 << LDPythonParser.IS) | (1 << LDPythonParser.NONE) | (1 << LDPythonParser.TRUE) | (1 << LDPythonParser.FALSE) | (1 << LDPythonParser.CLASS) | (1 << LDPythonParser.YIELD) | (1 << LDPythonParser.DEL) | (1 << LDPythonParser.PASS) | (1 << LDPythonParser.CONTINUE) | (1 << LDPythonParser.BREAK) | (1 << LDPythonParser.ASYNC) | (1 << LDPythonParser.AWAIT) | (1 << LDPythonParser.NAME))) != 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 Blank_nodeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BLANK_NODE_LABEL(self):
            return self.getToken(LDPythonParser.BLANK_NODE_LABEL, 0)

        def anon(self):
            return self.getTypedRuleContext(LDPythonParser.AnonContext,0)


        def getRuleIndex(self):
            return LDPythonParser.RULE_blank_node

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




    def blank_node(self):

        localctx = LDPythonParser.Blank_nodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 214, self.RULE_blank_node)
        try:
            self.state = 1266
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LDPythonParser.BLANK_NODE_LABEL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1264
                self.match(LDPythonParser.BLANK_NODE_LABEL)
                pass
            elif token in [LDPythonParser.OPEN_BRACK]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1265
                self.anon()
                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 NilContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_PAREN(self):
            return self.getToken(LDPythonParser.OPEN_PAREN, 0)

        def CLOSE_PAREN(self):
            return self.getToken(LDPythonParser.CLOSE_PAREN, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_nil

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




    def nil(self):

        localctx = LDPythonParser.NilContext(self, self._ctx, self.state)
        self.enterRule(localctx, 216, self.RULE_nil)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1268
            self.match(LDPythonParser.OPEN_PAREN)
            self.state = 1269
            self.match(LDPythonParser.CLOSE_PAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AnonContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPEN_BRACK(self):
            return self.getToken(LDPythonParser.OPEN_BRACK, 0)

        def CLOSE_BRACK(self):
            return self.getToken(LDPythonParser.CLOSE_BRACK, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_anon

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




    def anon(self):

        localctx = LDPythonParser.AnonContext(self, self._ctx, self.state)
        self.enterRule(localctx, 218, self.RULE_anon)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1271
            self.match(LDPythonParser.OPEN_BRACK)
            self.state = 1272
            self.match(LDPythonParser.CLOSE_BRACK)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FiriContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def FIRIREF_START(self):
            return self.getToken(LDPythonParser.FIRIREF_START, 0)

        def test(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LDPythonParser.TestContext)
            else:
                return self.getTypedRuleContext(LDPythonParser.TestContext,i)


        def FIRIREF_END(self):
            return self.getToken(LDPythonParser.FIRIREF_END, 0)

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

        def getRuleIndex(self):
            return LDPythonParser.RULE_firi

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




    def firi(self):

        localctx = LDPythonParser.FiriContext(self, self._ctx, self.state)
        self.enterRule(localctx, 220, self.RULE_firi)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1274
            self.match(LDPythonParser.FIRIREF_START)
            self.state = 1275
            self.test()
            self.state = 1280
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LDPythonParser.FIRIREF_SUB:
                self.state = 1276
                self.match(LDPythonParser.FIRIREF_SUB)
                self.state = 1277
                self.test()
                self.state = 1282
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 1283
            self.match(LDPythonParser.FIRIREF_END)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FnodeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def test(self):
            return self.getTypedRuleContext(LDPythonParser.TestContext,0)


        def CLOSE_BRACE(self):
            return self.getToken(LDPythonParser.CLOSE_BRACE, 0)

        def getRuleIndex(self):
            return LDPythonParser.RULE_fnode

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




    def fnode(self):

        localctx = LDPythonParser.FnodeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 222, self.RULE_fnode)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1285
            self.match(LDPythonParser.T__1)
            self.state = 1286
            self.test()
            self.state = 1287
            self.match(LDPythonParser.CLOSE_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[92] = self.verb_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 verb_sempred(self, localctx:VerbContext, predIndex:int):
            if predIndex == 0:
                return self._input.LT(1).text == 'a'
         




