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

if __name__ is not None and "." in __name__:
    from pyutplugins.ioplugins.python.Python3ParserBase import Python3ParserBase
else:
    from pyutplugins.ioplugins.python.Python3ParserBase import Python3ParserBase

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

class Python3Parser ( Python3ParserBase ):

    grammarFileName = "Python3Parser.g4"

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

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

    sharedContextCache = PredictionContextCache()

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

    symbolicNames = [ "<INVALID>", "INDENT", "DEDENT", "STRING", "NUMBER", 
                      "INTEGER", "AND", "AS", "ASSERT", "ASYNC", "AWAIT", 
                      "BREAK", "CASE", "CLASS", "CONTINUE", "DEF", "DEL", 
                      "ELIF", "ELSE", "EXCEPT", "FALSE", "FINALLY", "FOR", 
                      "FROM", "GLOBAL", "IF", "IMPORT", "IN", "IS", "LAMBDA", 
                      "MATCH", "NONE", "NONLOCAL", "NOT", "OR", "PASS", 
                      "RAISE", "RETURN", "TRUE", "TRY", "UNDERSCORE", "WHILE", 
                      "WITH", "YIELD", "NEWLINE", "NAME", "STRING_LITERAL", 
                      "BYTES_LITERAL", "DECIMAL_INTEGER", "OCT_INTEGER", 
                      "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "IMAG_NUMBER", 
                      "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", 
                      "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" ]

    RULE_single_input = 0
    RULE_file_input = 1
    RULE_eval_input = 2
    RULE_decorator = 3
    RULE_decorators = 4
    RULE_decorated = 5
    RULE_async_funcdef = 6
    RULE_funcdef = 7
    RULE_parameters = 8
    RULE_typedargslist = 9
    RULE_tfpdef = 10
    RULE_varargslist = 11
    RULE_vfpdef = 12
    RULE_stmt = 13
    RULE_simple_stmts = 14
    RULE_simple_stmt = 15
    RULE_expr_stmt = 16
    RULE_annassign = 17
    RULE_testlist_star_expr = 18
    RULE_augassign = 19
    RULE_del_stmt = 20
    RULE_pass_stmt = 21
    RULE_flow_stmt = 22
    RULE_break_stmt = 23
    RULE_continue_stmt = 24
    RULE_return_stmt = 25
    RULE_yield_stmt = 26
    RULE_raise_stmt = 27
    RULE_import_stmt = 28
    RULE_import_name = 29
    RULE_import_from = 30
    RULE_import_as_name = 31
    RULE_dotted_as_name = 32
    RULE_import_as_names = 33
    RULE_dotted_as_names = 34
    RULE_dotted_name = 35
    RULE_global_stmt = 36
    RULE_nonlocal_stmt = 37
    RULE_assert_stmt = 38
    RULE_compound_stmt = 39
    RULE_async_stmt = 40
    RULE_if_stmt = 41
    RULE_while_stmt = 42
    RULE_for_stmt = 43
    RULE_try_stmt = 44
    RULE_with_stmt = 45
    RULE_with_item = 46
    RULE_except_clause = 47
    RULE_block = 48
    RULE_match_stmt = 49
    RULE_subject_expr = 50
    RULE_star_named_expressions = 51
    RULE_star_named_expression = 52
    RULE_case_block = 53
    RULE_guard = 54
    RULE_patterns = 55
    RULE_pattern = 56
    RULE_as_pattern = 57
    RULE_or_pattern = 58
    RULE_closed_pattern = 59
    RULE_literal_pattern = 60
    RULE_literal_expr = 61
    RULE_complex_number = 62
    RULE_signed_number = 63
    RULE_signed_real_number = 64
    RULE_real_number = 65
    RULE_imaginary_number = 66
    RULE_capture_pattern = 67
    RULE_pattern_capture_target = 68
    RULE_wildcard_pattern = 69
    RULE_value_pattern = 70
    RULE_attr = 71
    RULE_name_or_attr = 72
    RULE_group_pattern = 73
    RULE_sequence_pattern = 74
    RULE_open_sequence_pattern = 75
    RULE_maybe_sequence_pattern = 76
    RULE_maybe_star_pattern = 77
    RULE_star_pattern = 78
    RULE_mapping_pattern = 79
    RULE_items_pattern = 80
    RULE_key_value_pattern = 81
    RULE_double_star_pattern = 82
    RULE_class_pattern = 83
    RULE_positional_patterns = 84
    RULE_keyword_patterns = 85
    RULE_keyword_pattern = 86
    RULE_test = 87
    RULE_test_nocond = 88
    RULE_lambdef = 89
    RULE_lambdef_nocond = 90
    RULE_or_test = 91
    RULE_and_test = 92
    RULE_not_test = 93
    RULE_comparison = 94
    RULE_comp_op = 95
    RULE_star_expr = 96
    RULE_expr = 97
    RULE_xor_expr = 98
    RULE_and_expr = 99
    RULE_shift_expr = 100
    RULE_arith_expr = 101
    RULE_term = 102
    RULE_factor = 103
    RULE_power = 104
    RULE_atom_expr = 105
    RULE_atom = 106
    RULE_name = 107
    RULE_testlist_comp = 108
    RULE_trailer = 109
    RULE_subscriptlist = 110
    RULE_subscript_ = 111
    RULE_sliceop = 112
    RULE_exprlist = 113
    RULE_testlist = 114
    RULE_dictorsetmaker = 115
    RULE_classdef = 116
    RULE_arglist = 117
    RULE_argument = 118
    RULE_comp_iter = 119
    RULE_comp_for = 120
    RULE_comp_if = 121
    RULE_encoding_decl = 122
    RULE_yield_expr = 123
    RULE_yield_arg = 124
    RULE_strings = 125

    ruleNames =  [ "single_input", "file_input", "eval_input", "decorator", 
                   "decorators", "decorated", "async_funcdef", "funcdef", 
                   "parameters", "typedargslist", "tfpdef", "varargslist", 
                   "vfpdef", "stmt", "simple_stmts", "simple_stmt", "expr_stmt", 
                   "annassign", "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", "block", "match_stmt", 
                   "subject_expr", "star_named_expressions", "star_named_expression", 
                   "case_block", "guard", "patterns", "pattern", "as_pattern", 
                   "or_pattern", "closed_pattern", "literal_pattern", "literal_expr", 
                   "complex_number", "signed_number", "signed_real_number", 
                   "real_number", "imaginary_number", "capture_pattern", 
                   "pattern_capture_target", "wildcard_pattern", "value_pattern", 
                   "attr", "name_or_attr", "group_pattern", "sequence_pattern", 
                   "open_sequence_pattern", "maybe_sequence_pattern", "maybe_star_pattern", 
                   "star_pattern", "mapping_pattern", "items_pattern", "key_value_pattern", 
                   "double_star_pattern", "class_pattern", "positional_patterns", 
                   "keyword_patterns", "keyword_pattern", "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", "name", "testlist_comp", 
                   "trailer", "subscriptlist", "subscript_", "sliceop", 
                   "exprlist", "testlist", "dictorsetmaker", "classdef", 
                   "arglist", "argument", "comp_iter", "comp_for", "comp_if", 
                   "encoding_decl", "yield_expr", "yield_arg", "strings" ]

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

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




    class 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(Python3Parser.NEWLINE, 0)

        def simple_stmts(self):
            return self.getTypedRuleContext(Python3Parser.Simple_stmtsContext,0)


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


        def getRuleIndex(self):
            return Python3Parser.RULE_single_input

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

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

        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 = Python3Parser.Single_inputContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_single_input)
        try:
            self.state = 257
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 252
                self.match(Python3Parser.NEWLINE)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 253
                self.simple_stmts()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 254
                self.compound_stmt()
                self.state = 255
                self.match(Python3Parser.NEWLINE)
                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(Python3Parser.EOF, 0)

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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_file_input

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

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

        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 = Python3Parser.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 = 263
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while ((_la) & ~0x3f) == 0 and ((1 << _la) & 252271930291384088) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 4206977) != 0:
                self.state = 261
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [44]:
                    self.state = 259
                    self.match(Python3Parser.NEWLINE)
                    pass
                elif token in [3, 4, 8, 9, 10, 11, 13, 14, 15, 16, 20, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 55, 56, 57, 64, 71, 72, 76, 77, 86]:
                    self.state = 260
                    self.stmt()
                    pass
                else:
                    raise NoViableAltException(self)

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

            self.state = 266
            self.match(Python3Parser.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(Python3Parser.TestlistContext,0)


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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_eval_input

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

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

        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 = Python3Parser.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 = 268
            self.testlist()
            self.state = 272
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==44:
                self.state = 269
                self.match(Python3Parser.NEWLINE)
                self.state = 274
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 275
            self.match(Python3Parser.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(Python3Parser.AT, 0)

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


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

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

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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_decorator

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

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

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




    def decorator(self):

        localctx = Python3Parser.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 = 277
            self.match(Python3Parser.AT)
            self.state = 278
            self.dotted_name()
            self.state = 284
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==57:
                self.state = 279
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 281
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                    self.state = 280
                    self.arglist()


                self.state = 283
                self.match(Python3Parser.CLOSE_PAREN)


            self.state = 286
            self.match(Python3Parser.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(Python3Parser.DecoratorContext)
            else:
                return self.getTypedRuleContext(Python3Parser.DecoratorContext,i)


        def getRuleIndex(self):
            return Python3Parser.RULE_decorators

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

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

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




    def decorators(self):

        localctx = Python3Parser.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 = 289 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 288
                self.decorator()
                self.state = 291 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==86):
                    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(Python3Parser.DecoratorsContext,0)


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


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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_decorated

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

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

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




    def decorated(self):

        localctx = Python3Parser.DecoratedContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_decorated)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 293
            self.decorators()
            self.state = 297
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [13]:
                self.state = 294
                self.classdef()
                pass
            elif token in [15]:
                self.state = 295
                self.funcdef()
                pass
            elif token in [9]:
                self.state = 296
                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 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(Python3Parser.ASYNC, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_async_funcdef

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

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

        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 = Python3Parser.Async_funcdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_async_funcdef)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 299
            self.match(Python3Parser.ASYNC)
            self.state = 300
            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(Python3Parser.DEF, 0)

        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


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


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

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


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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_funcdef

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

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

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




    def funcdef(self):

        localctx = Python3Parser.FuncdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_funcdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 302
            self.match(Python3Parser.DEF)
            self.state = 303
            self.name()
            self.state = 304
            self.parameters()
            self.state = 307
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==87:
                self.state = 305
                self.match(Python3Parser.ARROW)
                self.state = 306
                self.test()


            self.state = 309
            self.match(Python3Parser.COLON)
            self.state = 310
            self.block()
        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(Python3Parser.OPEN_PAREN, 0)

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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_parameters

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

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

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




    def parameters(self):

        localctx = Python3Parser.ParametersContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_parameters)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 312
            self.match(Python3Parser.OPEN_PAREN)
            self.state = 314
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 4683779897422774272) != 0:
                self.state = 313
                self.typedargslist()


            self.state = 316
            self.match(Python3Parser.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(Python3Parser.TfpdefContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TfpdefContext,i)


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

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

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

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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_typedargslist

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

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

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




    def typedargslist(self):

        localctx = Python3Parser.TypedargslistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_typedargslist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 399
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [30, 40, 45]:
                self.state = 318
                self.tfpdef()
                self.state = 321
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==63:
                    self.state = 319
                    self.match(Python3Parser.ASSIGN)
                    self.state = 320
                    self.test()


                self.state = 331
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,12,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 323
                        self.match(Python3Parser.COMMA)
                        self.state = 324
                        self.tfpdef()
                        self.state = 327
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==63:
                            self.state = 325
                            self.match(Python3Parser.ASSIGN)
                            self.state = 326
                            self.test()

                 
                    self.state = 333
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,12,self._ctx)

                self.state = 367
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 334
                    self.match(Python3Parser.COMMA)
                    self.state = 365
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [56]:
                        self.state = 335
                        self.match(Python3Parser.STAR)
                        self.state = 337
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if ((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0:
                            self.state = 336
                            self.tfpdef()


                        self.state = 347
                        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 = 339
                                self.match(Python3Parser.COMMA)
                                self.state = 340
                                self.tfpdef()
                                self.state = 343
                                self._errHandler.sync(self)
                                _la = self._input.LA(1)
                                if _la==63:
                                    self.state = 341
                                    self.match(Python3Parser.ASSIGN)
                                    self.state = 342
                                    self.test()

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

                        self.state = 358
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 350
                            self.match(Python3Parser.COMMA)
                            self.state = 356
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)
                            if _la==62:
                                self.state = 351
                                self.match(Python3Parser.POWER)
                                self.state = 352
                                self.tfpdef()
                                self.state = 354
                                self._errHandler.sync(self)
                                _la = self._input.LA(1)
                                if _la==59:
                                    self.state = 353
                                    self.match(Python3Parser.COMMA)






                        pass
                    elif token in [62]:
                        self.state = 360
                        self.match(Python3Parser.POWER)
                        self.state = 361
                        self.tfpdef()
                        self.state = 363
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 362
                            self.match(Python3Parser.COMMA)


                        pass
                    elif token in [58]:
                        pass
                    else:
                        pass


                pass
            elif token in [56]:
                self.state = 369
                self.match(Python3Parser.STAR)
                self.state = 371
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0:
                    self.state = 370
                    self.tfpdef()


                self.state = 381
                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 = 373
                        self.match(Python3Parser.COMMA)
                        self.state = 374
                        self.tfpdef()
                        self.state = 377
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==63:
                            self.state = 375
                            self.match(Python3Parser.ASSIGN)
                            self.state = 376
                            self.test()

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

                self.state = 392
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 384
                    self.match(Python3Parser.COMMA)
                    self.state = 390
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==62:
                        self.state = 385
                        self.match(Python3Parser.POWER)
                        self.state = 386
                        self.tfpdef()
                        self.state = 388
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 387
                            self.match(Python3Parser.COMMA)






                pass
            elif token in [62]:
                self.state = 394
                self.match(Python3Parser.POWER)
                self.state = 395
                self.tfpdef()
                self.state = 397
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 396
                    self.match(Python3Parser.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 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.getTypedRuleContext(Python3Parser.NameContext,0)


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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_tfpdef

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

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

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




    def tfpdef(self):

        localctx = Python3Parser.TfpdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_tfpdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 401
            self.name()
            self.state = 404
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==60:
                self.state = 402
                self.match(Python3Parser.COLON)
                self.state = 403
                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(Python3Parser.VfpdefContext)
            else:
                return self.getTypedRuleContext(Python3Parser.VfpdefContext,i)


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

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

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

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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_varargslist

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

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

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




    def varargslist(self):

        localctx = Python3Parser.VarargslistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_varargslist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 487
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [30, 40, 45]:
                self.state = 406
                self.vfpdef()
                self.state = 409
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==63:
                    self.state = 407
                    self.match(Python3Parser.ASSIGN)
                    self.state = 408
                    self.test()


                self.state = 419
                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 = 411
                        self.match(Python3Parser.COMMA)
                        self.state = 412
                        self.vfpdef()
                        self.state = 415
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==63:
                            self.state = 413
                            self.match(Python3Parser.ASSIGN)
                            self.state = 414
                            self.test()

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

                self.state = 455
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 422
                    self.match(Python3Parser.COMMA)
                    self.state = 453
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [56]:
                        self.state = 423
                        self.match(Python3Parser.STAR)
                        self.state = 425
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if ((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0:
                            self.state = 424
                            self.vfpdef()


                        self.state = 435
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,36,self._ctx)
                        while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                            if _alt==1:
                                self.state = 427
                                self.match(Python3Parser.COMMA)
                                self.state = 428
                                self.vfpdef()
                                self.state = 431
                                self._errHandler.sync(self)
                                _la = self._input.LA(1)
                                if _la==63:
                                    self.state = 429
                                    self.match(Python3Parser.ASSIGN)
                                    self.state = 430
                                    self.test()

                         
                            self.state = 437
                            self._errHandler.sync(self)
                            _alt = self._interp.adaptivePredict(self._input,36,self._ctx)

                        self.state = 446
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 438
                            self.match(Python3Parser.COMMA)
                            self.state = 444
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)
                            if _la==62:
                                self.state = 439
                                self.match(Python3Parser.POWER)
                                self.state = 440
                                self.vfpdef()
                                self.state = 442
                                self._errHandler.sync(self)
                                _la = self._input.LA(1)
                                if _la==59:
                                    self.state = 441
                                    self.match(Python3Parser.COMMA)






                        pass
                    elif token in [62]:
                        self.state = 448
                        self.match(Python3Parser.POWER)
                        self.state = 449
                        self.vfpdef()
                        self.state = 451
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 450
                            self.match(Python3Parser.COMMA)


                        pass
                    elif token in [60]:
                        pass
                    else:
                        pass


                pass
            elif token in [56]:
                self.state = 457
                self.match(Python3Parser.STAR)
                self.state = 459
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0:
                    self.state = 458
                    self.vfpdef()


                self.state = 469
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,45,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 461
                        self.match(Python3Parser.COMMA)
                        self.state = 462
                        self.vfpdef()
                        self.state = 465
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==63:
                            self.state = 463
                            self.match(Python3Parser.ASSIGN)
                            self.state = 464
                            self.test()

                 
                    self.state = 471
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,45,self._ctx)

                self.state = 480
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 472
                    self.match(Python3Parser.COMMA)
                    self.state = 478
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==62:
                        self.state = 473
                        self.match(Python3Parser.POWER)
                        self.state = 474
                        self.vfpdef()
                        self.state = 476
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==59:
                            self.state = 475
                            self.match(Python3Parser.COMMA)






                pass
            elif token in [62]:
                self.state = 482
                self.match(Python3Parser.POWER)
                self.state = 483
                self.vfpdef()
                self.state = 485
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 484
                    self.match(Python3Parser.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 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.getTypedRuleContext(Python3Parser.NameContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_vfpdef

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

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

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




    def vfpdef(self):

        localctx = Python3Parser.VfpdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_vfpdef)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 489
            self.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 simple_stmts(self):
            return self.getTypedRuleContext(Python3Parser.Simple_stmtsContext,0)


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


        def getRuleIndex(self):
            return Python3Parser.RULE_stmt

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

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

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




    def stmt(self):

        localctx = Python3Parser.StmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_stmt)
        try:
            self.state = 493
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,51,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 491
                self.simple_stmts()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 492
                self.compound_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_stmtsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def simple_stmt(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.Simple_stmtContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Simple_stmtContext,i)


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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_simple_stmts

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

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

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




    def simple_stmts(self):

        localctx = Python3Parser.Simple_stmtsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_simple_stmts)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 495
            self.simple_stmt()
            self.state = 500
            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 = 496
                    self.match(Python3Parser.SEMI_COLON)
                    self.state = 497
                    self.simple_stmt() 
                self.state = 502
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,52,self._ctx)

            self.state = 504
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==61:
                self.state = 503
                self.match(Python3Parser.SEMI_COLON)


            self.state = 506
            self.match(Python3Parser.NEWLINE)
        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 expr_stmt(self):
            return self.getTypedRuleContext(Python3Parser.Expr_stmtContext,0)


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


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


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


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


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


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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_simple_stmt

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

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

        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 = Python3Parser.Simple_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_simple_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 516
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 56, 57, 64, 71, 72, 76, 77]:
                self.state = 508
                self.expr_stmt()
                pass
            elif token in [16]:
                self.state = 509
                self.del_stmt()
                pass
            elif token in [35]:
                self.state = 510
                self.pass_stmt()
                pass
            elif token in [11, 14, 36, 37, 43]:
                self.state = 511
                self.flow_stmt()
                pass
            elif token in [23, 26]:
                self.state = 512
                self.import_stmt()
                pass
            elif token in [24]:
                self.state = 513
                self.global_stmt()
                pass
            elif token in [32]:
                self.state = 514
                self.nonlocal_stmt()
                pass
            elif token in [8]:
                self.state = 515
                self.assert_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 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(Python3Parser.Testlist_star_exprContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Testlist_star_exprContext,i)


        def annassign(self):
            return self.getTypedRuleContext(Python3Parser.AnnassignContext,0)


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


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


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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_expr_stmt

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

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

        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 = Python3Parser.Expr_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_expr_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 518
            self.testlist_star_expr()
            self.state = 535
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [60]:
                self.state = 519
                self.annassign()
                pass
            elif token in [88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]:
                self.state = 520
                self.augassign()
                self.state = 523
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [43]:
                    self.state = 521
                    self.yield_expr()
                    pass
                elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                    self.state = 522
                    self.testlist()
                    pass
                else:
                    raise NoViableAltException(self)

                pass
            elif token in [44, 61, 63]:
                self.state = 532
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==63:
                    self.state = 525
                    self.match(Python3Parser.ASSIGN)
                    self.state = 528
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [43]:
                        self.state = 526
                        self.yield_expr()
                        pass
                    elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 56, 57, 64, 71, 72, 76, 77]:
                        self.state = 527
                        self.testlist_star_expr()
                        pass
                    else:
                        raise NoViableAltException(self)

                    self.state = 534
                    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 AnnassignContext(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(Python3Parser.COLON, 0)

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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_annassign

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

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

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




    def annassign(self):

        localctx = Python3Parser.AnnassignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_annassign)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 537
            self.match(Python3Parser.COLON)
            self.state = 538
            self.test()
            self.state = 541
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==63:
                self.state = 539
                self.match(Python3Parser.ASSIGN)
                self.state = 540
                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 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(Python3Parser.TestContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TestContext,i)


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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_testlist_star_expr

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

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

        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 = Python3Parser.Testlist_star_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_testlist_star_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 545
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.state = 543
                self.test()
                pass
            elif token in [56]:
                self.state = 544
                self.star_expr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 554
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,62,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 547
                    self.match(Python3Parser.COMMA)
                    self.state = 550
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                        self.state = 548
                        self.test()
                        pass
                    elif token in [56]:
                        self.state = 549
                        self.star_expr()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 556
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,62,self._ctx)

            self.state = 558
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 557
                self.match(Python3Parser.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(Python3Parser.ADD_ASSIGN, 0)

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

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

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

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

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

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_augassign

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

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

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




    def augassign(self):

        localctx = Python3Parser.AugassignContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_augassign)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 560
            _la = self._input.LA(1)
            if not((((_la - 88)) & ~0x3f) == 0 and ((1 << (_la - 88)) & 8191) != 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(Python3Parser.DEL, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_del_stmt

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

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

        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 = Python3Parser.Del_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_del_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 562
            self.match(Python3Parser.DEL)
            self.state = 563
            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(Python3Parser.PASS, 0)

        def getRuleIndex(self):
            return Python3Parser.RULE_pass_stmt

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

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

        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 = Python3Parser.Pass_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_pass_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 565
            self.match(Python3Parser.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(Python3Parser.Break_stmtContext,0)


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


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


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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_flow_stmt

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

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

        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 = Python3Parser.Flow_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_flow_stmt)
        try:
            self.state = 572
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [11]:
                self.enterOuterAlt(localctx, 1)
                self.state = 567
                self.break_stmt()
                pass
            elif token in [14]:
                self.enterOuterAlt(localctx, 2)
                self.state = 568
                self.continue_stmt()
                pass
            elif token in [37]:
                self.enterOuterAlt(localctx, 3)
                self.state = 569
                self.return_stmt()
                pass
            elif token in [36]:
                self.enterOuterAlt(localctx, 4)
                self.state = 570
                self.raise_stmt()
                pass
            elif token in [43]:
                self.enterOuterAlt(localctx, 5)
                self.state = 571
                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(Python3Parser.BREAK, 0)

        def getRuleIndex(self):
            return Python3Parser.RULE_break_stmt

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

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

        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 = Python3Parser.Break_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_break_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 574
            self.match(Python3Parser.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(Python3Parser.CONTINUE, 0)

        def getRuleIndex(self):
            return Python3Parser.RULE_continue_stmt

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

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

        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 = Python3Parser.Continue_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_continue_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 576
            self.match(Python3Parser.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(Python3Parser.RETURN, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_return_stmt

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

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

        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 = Python3Parser.Return_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_return_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 578
            self.match(Python3Parser.RETURN)
            self.state = 580
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                self.state = 579
                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(Python3Parser.Yield_exprContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_yield_stmt

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

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

        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 = Python3Parser.Yield_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_yield_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 582
            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(Python3Parser.RAISE, 0)

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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_raise_stmt

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

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

        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 = Python3Parser.Raise_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_raise_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 584
            self.match(Python3Parser.RAISE)
            self.state = 590
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                self.state = 585
                self.test()
                self.state = 588
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==23:
                    self.state = 586
                    self.match(Python3Parser.FROM)
                    self.state = 587
                    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(Python3Parser.Import_nameContext,0)


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


        def getRuleIndex(self):
            return Python3Parser.RULE_import_stmt

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

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

        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 = Python3Parser.Import_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_import_stmt)
        try:
            self.state = 594
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [26]:
                self.enterOuterAlt(localctx, 1)
                self.state = 592
                self.import_name()
                pass
            elif token in [23]:
                self.enterOuterAlt(localctx, 2)
                self.state = 593
                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(Python3Parser.IMPORT, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_import_name

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

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

        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 = Python3Parser.Import_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_import_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 596
            self.match(Python3Parser.IMPORT)
            self.state = 597
            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(Python3Parser.FROM, 0)

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

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


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

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

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


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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_import_from

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

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

        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 = Python3Parser.Import_fromContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_import_from)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 599
            self.match(Python3Parser.FROM)
            self.state = 612
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,71,self._ctx)
            if la_ == 1:
                self.state = 603
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==54 or _la==55:
                    self.state = 600
                    _la = self._input.LA(1)
                    if not(_la==54 or _la==55):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 605
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 606
                self.dotted_name()
                pass

            elif la_ == 2:
                self.state = 608 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 607
                    _la = self._input.LA(1)
                    if not(_la==54 or _la==55):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 610 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==54 or _la==55):
                        break

                pass


            self.state = 614
            self.match(Python3Parser.IMPORT)
            self.state = 621
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [56]:
                self.state = 615
                self.match(Python3Parser.STAR)
                pass
            elif token in [57]:
                self.state = 616
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 617
                self.import_as_names()
                self.state = 618
                self.match(Python3Parser.CLOSE_PAREN)
                pass
            elif token in [30, 40, 45]:
                self.state = 620
                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.getTypedRuleContexts(Python3Parser.NameContext)
            else:
                return self.getTypedRuleContext(Python3Parser.NameContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_import_as_name

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

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

        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 = Python3Parser.Import_as_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_import_as_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 623
            self.name()
            self.state = 626
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 624
                self.match(Python3Parser.AS)
                self.state = 625
                self.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(Python3Parser.Dotted_nameContext,0)


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

        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_dotted_as_name

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

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

        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 = Python3Parser.Dotted_as_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_dotted_as_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 628
            self.dotted_name()
            self.state = 631
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 629
                self.match(Python3Parser.AS)
                self.state = 630
                self.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(Python3Parser.Import_as_nameContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Import_as_nameContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_import_as_names

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

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

        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 = Python3Parser.Import_as_namesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_import_as_names)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 633
            self.import_as_name()
            self.state = 638
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,75,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 634
                    self.match(Python3Parser.COMMA)
                    self.state = 635
                    self.import_as_name() 
                self.state = 640
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,75,self._ctx)

            self.state = 642
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 641
                self.match(Python3Parser.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(Python3Parser.Dotted_as_nameContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Dotted_as_nameContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_dotted_as_names

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

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

        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 = Python3Parser.Dotted_as_namesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_dotted_as_names)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 644
            self.dotted_as_name()
            self.state = 649
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==59:
                self.state = 645
                self.match(Python3Parser.COMMA)
                self.state = 646
                self.dotted_as_name()
                self.state = 651
                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.getTypedRuleContexts(Python3Parser.NameContext)
            else:
                return self.getTypedRuleContext(Python3Parser.NameContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_dotted_name

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

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

        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 = Python3Parser.Dotted_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_dotted_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 652
            self.name()
            self.state = 657
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==54:
                self.state = 653
                self.match(Python3Parser.DOT)
                self.state = 654
                self.name()
                self.state = 659
                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(Python3Parser.GLOBAL, 0)

        def name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.NameContext)
            else:
                return self.getTypedRuleContext(Python3Parser.NameContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_global_stmt

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

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

        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 = Python3Parser.Global_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_global_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 660
            self.match(Python3Parser.GLOBAL)
            self.state = 661
            self.name()
            self.state = 666
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==59:
                self.state = 662
                self.match(Python3Parser.COMMA)
                self.state = 663
                self.name()
                self.state = 668
                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(Python3Parser.NONLOCAL, 0)

        def name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.NameContext)
            else:
                return self.getTypedRuleContext(Python3Parser.NameContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_nonlocal_stmt

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

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

        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 = Python3Parser.Nonlocal_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_nonlocal_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 669
            self.match(Python3Parser.NONLOCAL)
            self.state = 670
            self.name()
            self.state = 675
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==59:
                self.state = 671
                self.match(Python3Parser.COMMA)
                self.state = 672
                self.name()
                self.state = 677
                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(Python3Parser.ASSERT, 0)

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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_assert_stmt

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

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

        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 = Python3Parser.Assert_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_assert_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 678
            self.match(Python3Parser.ASSERT)
            self.state = 679
            self.test()
            self.state = 682
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 680
                self.match(Python3Parser.COMMA)
                self.state = 681
                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(Python3Parser.If_stmtContext,0)


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


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


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


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


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


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


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


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


        def match_stmt(self):
            return self.getTypedRuleContext(Python3Parser.Match_stmtContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_compound_stmt

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

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

        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 = Python3Parser.Compound_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_compound_stmt)
        try:
            self.state = 694
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [25]:
                self.enterOuterAlt(localctx, 1)
                self.state = 684
                self.if_stmt()
                pass
            elif token in [41]:
                self.enterOuterAlt(localctx, 2)
                self.state = 685
                self.while_stmt()
                pass
            elif token in [22]:
                self.enterOuterAlt(localctx, 3)
                self.state = 686
                self.for_stmt()
                pass
            elif token in [39]:
                self.enterOuterAlt(localctx, 4)
                self.state = 687
                self.try_stmt()
                pass
            elif token in [42]:
                self.enterOuterAlt(localctx, 5)
                self.state = 688
                self.with_stmt()
                pass
            elif token in [15]:
                self.enterOuterAlt(localctx, 6)
                self.state = 689
                self.funcdef()
                pass
            elif token in [13]:
                self.enterOuterAlt(localctx, 7)
                self.state = 690
                self.classdef()
                pass
            elif token in [86]:
                self.enterOuterAlt(localctx, 8)
                self.state = 691
                self.decorated()
                pass
            elif token in [9]:
                self.enterOuterAlt(localctx, 9)
                self.state = 692
                self.async_stmt()
                pass
            elif token in [30]:
                self.enterOuterAlt(localctx, 10)
                self.state = 693
                self.match_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(Python3Parser.ASYNC, 0)

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


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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_async_stmt

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

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

        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 = Python3Parser.Async_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_async_stmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 696
            self.match(Python3Parser.ASYNC)
            self.state = 700
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [15]:
                self.state = 697
                self.funcdef()
                pass
            elif token in [42]:
                self.state = 698
                self.with_stmt()
                pass
            elif token in [22]:
                self.state = 699
                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(Python3Parser.IF, 0)

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


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

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.BlockContext)
            else:
                return self.getTypedRuleContext(Python3Parser.BlockContext,i)


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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_if_stmt

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

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

        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 = Python3Parser.If_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_if_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 702
            self.match(Python3Parser.IF)
            self.state = 703
            self.test()
            self.state = 704
            self.match(Python3Parser.COLON)
            self.state = 705
            self.block()
            self.state = 713
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==17:
                self.state = 706
                self.match(Python3Parser.ELIF)
                self.state = 707
                self.test()
                self.state = 708
                self.match(Python3Parser.COLON)
                self.state = 709
                self.block()
                self.state = 715
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 719
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 716
                self.match(Python3Parser.ELSE)
                self.state = 717
                self.match(Python3Parser.COLON)
                self.state = 718
                self.block()


        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(Python3Parser.WHILE, 0)

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


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

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.BlockContext)
            else:
                return self.getTypedRuleContext(Python3Parser.BlockContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_while_stmt

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

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

        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 = Python3Parser.While_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_while_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 721
            self.match(Python3Parser.WHILE)
            self.state = 722
            self.test()
            self.state = 723
            self.match(Python3Parser.COLON)
            self.state = 724
            self.block()
            self.state = 728
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 725
                self.match(Python3Parser.ELSE)
                self.state = 726
                self.match(Python3Parser.COLON)
                self.state = 727
                self.block()


        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(Python3Parser.FOR, 0)

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


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

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


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

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.BlockContext)
            else:
                return self.getTypedRuleContext(Python3Parser.BlockContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_for_stmt

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

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

        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 = Python3Parser.For_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_for_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 730
            self.match(Python3Parser.FOR)
            self.state = 731
            self.exprlist()
            self.state = 732
            self.match(Python3Parser.IN)
            self.state = 733
            self.testlist()
            self.state = 734
            self.match(Python3Parser.COLON)
            self.state = 735
            self.block()
            self.state = 739
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==18:
                self.state = 736
                self.match(Python3Parser.ELSE)
                self.state = 737
                self.match(Python3Parser.COLON)
                self.state = 738
                self.block()


        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(Python3Parser.TRY, 0)

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

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.BlockContext)
            else:
                return self.getTypedRuleContext(Python3Parser.BlockContext,i)


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

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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_try_stmt

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

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

        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 = Python3Parser.Try_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_try_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 741
            self.match(Python3Parser.TRY)
            self.state = 742
            self.match(Python3Parser.COLON)
            self.state = 743
            self.block()
            self.state = 765
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [19]:
                self.state = 748 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 744
                    self.except_clause()
                    self.state = 745
                    self.match(Python3Parser.COLON)
                    self.state = 746
                    self.block()
                    self.state = 750 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==19):
                        break

                self.state = 755
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==18:
                    self.state = 752
                    self.match(Python3Parser.ELSE)
                    self.state = 753
                    self.match(Python3Parser.COLON)
                    self.state = 754
                    self.block()


                self.state = 760
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==21:
                    self.state = 757
                    self.match(Python3Parser.FINALLY)
                    self.state = 758
                    self.match(Python3Parser.COLON)
                    self.state = 759
                    self.block()


                pass
            elif token in [21]:
                self.state = 762
                self.match(Python3Parser.FINALLY)
                self.state = 763
                self.match(Python3Parser.COLON)
                self.state = 764
                self.block()
                pass
            else:
                raise NoViableAltException(self)

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


    class 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(Python3Parser.WITH, 0)

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


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

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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_with_stmt

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

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

        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 = Python3Parser.With_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_with_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 767
            self.match(Python3Parser.WITH)
            self.state = 768
            self.with_item()
            self.state = 773
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==59:
                self.state = 769
                self.match(Python3Parser.COMMA)
                self.state = 770
                self.with_item()
                self.state = 775
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 776
            self.match(Python3Parser.COLON)
            self.state = 777
            self.block()
        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(Python3Parser.TestContext,0)


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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_with_item

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

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

        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 = Python3Parser.With_itemContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_with_item)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 779
            self.test()
            self.state = 782
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==7:
                self.state = 780
                self.match(Python3Parser.AS)
                self.state = 781
                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(Python3Parser.EXCEPT, 0)

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


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

        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_except_clause

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

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

        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 = Python3Parser.Except_clauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_except_clause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 784
            self.match(Python3Parser.EXCEPT)
            self.state = 790
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                self.state = 785
                self.test()
                self.state = 788
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==7:
                    self.state = 786
                    self.match(Python3Parser.AS)
                    self.state = 787
                    self.name()




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


    class BlockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def simple_stmts(self):
            return self.getTypedRuleContext(Python3Parser.Simple_stmtsContext,0)


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

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

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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_block

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

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

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




    def block(self):

        localctx = Python3Parser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_block)
        self._la = 0 # Token type
        try:
            self.state = 802
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 8, 10, 11, 14, 16, 20, 23, 24, 26, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 43, 45, 55, 56, 57, 64, 71, 72, 76, 77]:
                self.enterOuterAlt(localctx, 1)
                self.state = 792
                self.simple_stmts()
                pass
            elif token in [44]:
                self.enterOuterAlt(localctx, 2)
                self.state = 793
                self.match(Python3Parser.NEWLINE)
                self.state = 794
                self.match(Python3Parser.INDENT)
                self.state = 796 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 795
                    self.stmt()
                    self.state = 798 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (((_la) & ~0x3f) == 0 and ((1 << _la) & 252254338105339672) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 4206977) != 0):
                        break

                self.state = 800
                self.match(Python3Parser.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 Match_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def MATCH(self):
            return self.getToken(Python3Parser.MATCH, 0)

        def subject_expr(self):
            return self.getTypedRuleContext(Python3Parser.Subject_exprContext,0)


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

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

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

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

        def case_block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.Case_blockContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Case_blockContext,i)


        def getRuleIndex(self):
            return Python3Parser.RULE_match_stmt

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

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

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




    def match_stmt(self):

        localctx = Python3Parser.Match_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_match_stmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 804
            self.match(Python3Parser.MATCH)
            self.state = 805
            self.subject_expr()
            self.state = 806
            self.match(Python3Parser.COLON)
            self.state = 807
            self.match(Python3Parser.NEWLINE)
            self.state = 808
            self.match(Python3Parser.INDENT)
            self.state = 810 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 809
                self.case_block()
                self.state = 812 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==12):
                    break

            self.state = 814
            self.match(Python3Parser.DEDENT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Subject_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def star_named_expression(self):
            return self.getTypedRuleContext(Python3Parser.Star_named_expressionContext,0)


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

        def star_named_expressions(self):
            return self.getTypedRuleContext(Python3Parser.Star_named_expressionsContext,0)


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


        def getRuleIndex(self):
            return Python3Parser.RULE_subject_expr

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

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

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




    def subject_expr(self):

        localctx = Python3Parser.Subject_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_subject_expr)
        self._la = 0 # Token type
        try:
            self.state = 822
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,100,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 816
                self.star_named_expression()
                self.state = 817
                self.match(Python3Parser.COMMA)
                self.state = 819
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 818
                    self.star_named_expressions()


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 821
                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 Star_named_expressionsContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def star_named_expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.Star_named_expressionContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Star_named_expressionContext,i)


        def getRuleIndex(self):
            return Python3Parser.RULE_star_named_expressions

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

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

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




    def star_named_expressions(self):

        localctx = Python3Parser.Star_named_expressionsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_star_named_expressions)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 824
            self.match(Python3Parser.COMMA)
            self.state = 826 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 825
                self.star_named_expression()
                self.state = 828 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (((_la) & ~0x3f) == 0 and ((1 << _la) & 252238150243451928) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0):
                    break

            self.state = 831
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 830
                self.match(Python3Parser.COMMA)


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


    class Star_named_expressionContext(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(Python3Parser.STAR, 0)

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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_star_named_expression

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

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

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




    def star_named_expression(self):

        localctx = Python3Parser.Star_named_expressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_star_named_expression)
        try:
            self.state = 836
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [56]:
                self.enterOuterAlt(localctx, 1)
                self.state = 833
                self.match(Python3Parser.STAR)
                self.state = 834
                self.expr()
                pass
            elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.enterOuterAlt(localctx, 2)
                self.state = 835
                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 Case_blockContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CASE(self):
            return self.getToken(Python3Parser.CASE, 0)

        def patterns(self):
            return self.getTypedRuleContext(Python3Parser.PatternsContext,0)


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

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


        def guard(self):
            return self.getTypedRuleContext(Python3Parser.GuardContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_case_block

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

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

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




    def case_block(self):

        localctx = Python3Parser.Case_blockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_case_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 838
            self.match(Python3Parser.CASE)
            self.state = 839
            self.patterns()
            self.state = 841
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==25:
                self.state = 840
                self.guard()


            self.state = 843
            self.match(Python3Parser.COLON)
            self.state = 844
            self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GuardContext(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(Python3Parser.IF, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_guard

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

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

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




    def guard(self):

        localctx = Python3Parser.GuardContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_guard)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 846
            self.match(Python3Parser.IF)
            self.state = 847
            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 PatternsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def open_sequence_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Open_sequence_patternContext,0)


        def pattern(self):
            return self.getTypedRuleContext(Python3Parser.PatternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_patterns

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

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

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




    def patterns(self):

        localctx = Python3Parser.PatternsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_patterns)
        try:
            self.state = 851
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,105,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 849
                self.open_sequence_pattern()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 850
                self.pattern()
                pass


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


    class PatternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def as_pattern(self):
            return self.getTypedRuleContext(Python3Parser.As_patternContext,0)


        def or_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Or_patternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_pattern

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

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

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




    def pattern(self):

        localctx = Python3Parser.PatternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_pattern)
        try:
            self.state = 855
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,106,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 853
                self.as_pattern()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 854
                self.or_pattern()
                pass


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


    class As_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def or_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Or_patternContext,0)


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

        def pattern_capture_target(self):
            return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_as_pattern

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

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

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




    def as_pattern(self):

        localctx = Python3Parser.As_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_as_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 857
            self.or_pattern()
            self.state = 858
            self.match(Python3Parser.AS)
            self.state = 859
            self.pattern_capture_target()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Or_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def closed_pattern(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.Closed_patternContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Closed_patternContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_or_pattern

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

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

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




    def or_pattern(self):

        localctx = Python3Parser.Or_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_or_pattern)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 861
            self.closed_pattern()
            self.state = 866
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==66:
                self.state = 862
                self.match(Python3Parser.OR_OP)
                self.state = 863
                self.closed_pattern()
                self.state = 868
                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 Closed_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def literal_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Literal_patternContext,0)


        def capture_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Capture_patternContext,0)


        def wildcard_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Wildcard_patternContext,0)


        def value_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Value_patternContext,0)


        def group_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Group_patternContext,0)


        def sequence_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Sequence_patternContext,0)


        def mapping_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Mapping_patternContext,0)


        def class_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Class_patternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_closed_pattern

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

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

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




    def closed_pattern(self):

        localctx = Python3Parser.Closed_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_closed_pattern)
        try:
            self.state = 877
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,108,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 869
                self.literal_pattern()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 870
                self.capture_pattern()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 871
                self.wildcard_pattern()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 872
                self.value_pattern()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 873
                self.group_pattern()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 874
                self.sequence_pattern()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 875
                self.mapping_pattern()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 876
                self.class_pattern()
                pass


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


    class Literal_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def signed_number(self):
            return self.getTypedRuleContext(Python3Parser.Signed_numberContext,0)


        def complex_number(self):
            return self.getTypedRuleContext(Python3Parser.Complex_numberContext,0)


        def strings(self):
            return self.getTypedRuleContext(Python3Parser.StringsContext,0)


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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_literal_pattern

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

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

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




    def literal_pattern(self):

        localctx = Python3Parser.Literal_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_literal_pattern)
        try:
            self.state = 887
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,109,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 879
                self.signed_number()
                self.state = 880
                if not  self.CannotBePlusMinus() :
                    from antlr4.error.Errors import FailedPredicateException
                    raise FailedPredicateException(self, " self.CannotBePlusMinus() ")
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 882
                self.complex_number()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 883
                self.strings()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 884
                self.match(Python3Parser.NONE)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 885
                self.match(Python3Parser.TRUE)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 886
                self.match(Python3Parser.FALSE)
                pass


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


    class Literal_exprContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def signed_number(self):
            return self.getTypedRuleContext(Python3Parser.Signed_numberContext,0)


        def complex_number(self):
            return self.getTypedRuleContext(Python3Parser.Complex_numberContext,0)


        def strings(self):
            return self.getTypedRuleContext(Python3Parser.StringsContext,0)


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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_literal_expr

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

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

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




    def literal_expr(self):

        localctx = Python3Parser.Literal_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_literal_expr)
        try:
            self.state = 897
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,110,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 889
                self.signed_number()
                self.state = 890
                if not  self.CannotBePlusMinus() :
                    from antlr4.error.Errors import FailedPredicateException
                    raise FailedPredicateException(self, " self.CannotBePlusMinus() ")
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 892
                self.complex_number()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 893
                self.strings()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 894
                self.match(Python3Parser.NONE)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 895
                self.match(Python3Parser.TRUE)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 896
                self.match(Python3Parser.FALSE)
                pass


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


    class Complex_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def signed_real_number(self):
            return self.getTypedRuleContext(Python3Parser.Signed_real_numberContext,0)


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

        def imaginary_number(self):
            return self.getTypedRuleContext(Python3Parser.Imaginary_numberContext,0)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_complex_number

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

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

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




    def complex_number(self):

        localctx = Python3Parser.Complex_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_complex_number)
        try:
            self.state = 907
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,111,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 899
                self.signed_real_number()
                self.state = 900
                self.match(Python3Parser.ADD)
                self.state = 901
                self.imaginary_number()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 903
                self.signed_real_number()
                self.state = 904
                self.match(Python3Parser.MINUS)
                self.state = 905
                self.imaginary_number()
                pass


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


    class Signed_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_signed_number

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

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

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




    def signed_number(self):

        localctx = Python3Parser.Signed_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_signed_number)
        try:
            self.state = 912
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [4]:
                self.enterOuterAlt(localctx, 1)
                self.state = 909
                self.match(Python3Parser.NUMBER)
                pass
            elif token in [72]:
                self.enterOuterAlt(localctx, 2)
                self.state = 910
                self.match(Python3Parser.MINUS)
                self.state = 911
                self.match(Python3Parser.NUMBER)
                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 Signed_real_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def real_number(self):
            return self.getTypedRuleContext(Python3Parser.Real_numberContext,0)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_signed_real_number

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

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

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




    def signed_real_number(self):

        localctx = Python3Parser.Signed_real_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_signed_real_number)
        try:
            self.state = 917
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [4]:
                self.enterOuterAlt(localctx, 1)
                self.state = 914
                self.real_number()
                pass
            elif token in [72]:
                self.enterOuterAlt(localctx, 2)
                self.state = 915
                self.match(Python3Parser.MINUS)
                self.state = 916
                self.real_number()
                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 Real_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_real_number

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

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

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




    def real_number(self):

        localctx = Python3Parser.Real_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_real_number)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 919
            self.match(Python3Parser.NUMBER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Imaginary_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_imaginary_number

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

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

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




    def imaginary_number(self):

        localctx = Python3Parser.Imaginary_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_imaginary_number)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 921
            self.match(Python3Parser.NUMBER)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Capture_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pattern_capture_target(self):
            return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_capture_pattern

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

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

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




    def capture_pattern(self):

        localctx = Python3Parser.Capture_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_capture_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 923
            self.pattern_capture_target()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Pattern_capture_targetContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_pattern_capture_target

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

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

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




    def pattern_capture_target(self):

        localctx = Python3Parser.Pattern_capture_targetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_pattern_capture_target)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 925
            self.name()
            self.state = 926
            if not  self.CannotBeDotLpEq() :
                from antlr4.error.Errors import FailedPredicateException
                raise FailedPredicateException(self, " self.CannotBeDotLpEq() ")
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Wildcard_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_wildcard_pattern

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

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

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




    def wildcard_pattern(self):

        localctx = Python3Parser.Wildcard_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_wildcard_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 928
            self.match(Python3Parser.UNDERSCORE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Value_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def attr(self):
            return self.getTypedRuleContext(Python3Parser.AttrContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_value_pattern

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

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

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




    def value_pattern(self):

        localctx = Python3Parser.Value_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_value_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 930
            self.attr()
            self.state = 931
            if not  self.CannotBeDotLpEq() :
                from antlr4.error.Errors import FailedPredicateException
                raise FailedPredicateException(self, " self.CannotBeDotLpEq() ")
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AttrContext(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.getTypedRuleContexts(Python3Parser.NameContext)
            else:
                return self.getTypedRuleContext(Python3Parser.NameContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_attr

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

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

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




    def attr(self):

        localctx = Python3Parser.AttrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_attr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 933
            self.name()
            self.state = 936 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 934
                    self.match(Python3Parser.DOT)
                    self.state = 935
                    self.name()

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

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


    class Name_or_attrContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def attr(self):
            return self.getTypedRuleContext(Python3Parser.AttrContext,0)


        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_name_or_attr

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

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

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




    def name_or_attr(self):

        localctx = Python3Parser.Name_or_attrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_name_or_attr)
        try:
            self.state = 942
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,115,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 940
                self.attr()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 941
                self.name()
                pass


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


    class Group_patternContext(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(Python3Parser.OPEN_PAREN, 0)

        def pattern(self):
            return self.getTypedRuleContext(Python3Parser.PatternContext,0)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_group_pattern

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

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

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




    def group_pattern(self):

        localctx = Python3Parser.Group_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_group_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 944
            self.match(Python3Parser.OPEN_PAREN)
            self.state = 945
            self.pattern()
            self.state = 946
            self.match(Python3Parser.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 Sequence_patternContext(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(Python3Parser.OPEN_BRACK, 0)

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

        def maybe_sequence_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Maybe_sequence_patternContext,0)


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

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

        def open_sequence_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Open_sequence_patternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_sequence_pattern

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

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

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




    def sequence_pattern(self):

        localctx = Python3Parser.Sequence_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_sequence_pattern)
        self._la = 0 # Token type
        try:
            self.state = 958
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [64]:
                self.enterOuterAlt(localctx, 1)
                self.state = 948
                self.match(Python3Parser.OPEN_BRACK)
                self.state = 950
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 216209344097681432) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8449) != 0:
                    self.state = 949
                    self.maybe_sequence_pattern()


                self.state = 952
                self.match(Python3Parser.CLOSE_BRACK)
                pass
            elif token in [57]:
                self.enterOuterAlt(localctx, 2)
                self.state = 953
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 955
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 216209344097681432) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8449) != 0:
                    self.state = 954
                    self.open_sequence_pattern()


                self.state = 957
                self.match(Python3Parser.CLOSE_PAREN)
                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 Open_sequence_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def maybe_star_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Maybe_star_patternContext,0)


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

        def maybe_sequence_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Maybe_sequence_patternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_open_sequence_pattern

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

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

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




    def open_sequence_pattern(self):

        localctx = Python3Parser.Open_sequence_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_open_sequence_pattern)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 960
            self.maybe_star_pattern()
            self.state = 961
            self.match(Python3Parser.COMMA)
            self.state = 963
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 216209344097681432) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8449) != 0:
                self.state = 962
                self.maybe_sequence_pattern()


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


    class Maybe_sequence_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def maybe_star_pattern(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.Maybe_star_patternContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Maybe_star_patternContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_maybe_sequence_pattern

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

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

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




    def maybe_sequence_pattern(self):

        localctx = Python3Parser.Maybe_sequence_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_maybe_sequence_pattern)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 965
            self.maybe_star_pattern()
            self.state = 970
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,120,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 966
                    self.match(Python3Parser.COMMA)
                    self.state = 967
                    self.maybe_star_pattern() 
                self.state = 972
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,120,self._ctx)

            self.state = 974
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 973
                self.match(Python3Parser.COMMA)


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


    class Maybe_star_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def star_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Star_patternContext,0)


        def pattern(self):
            return self.getTypedRuleContext(Python3Parser.PatternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_maybe_star_pattern

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

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

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




    def maybe_star_pattern(self):

        localctx = Python3Parser.Maybe_star_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_maybe_star_pattern)
        try:
            self.state = 978
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [56]:
                self.enterOuterAlt(localctx, 1)
                self.state = 976
                self.star_pattern()
                pass
            elif token in [3, 4, 20, 30, 31, 38, 40, 45, 57, 64, 72, 77]:
                self.enterOuterAlt(localctx, 2)
                self.state = 977
                self.pattern()
                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 Star_patternContext(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(Python3Parser.STAR, 0)

        def pattern_capture_target(self):
            return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0)


        def wildcard_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Wildcard_patternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_star_pattern

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

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

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




    def star_pattern(self):

        localctx = Python3Parser.Star_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_star_pattern)
        try:
            self.state = 984
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,123,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 980
                self.match(Python3Parser.STAR)
                self.state = 981
                self.pattern_capture_target()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 982
                self.match(Python3Parser.STAR)
                self.state = 983
                self.wildcard_pattern()
                pass


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


    class Mapping_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def double_star_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Double_star_patternContext,0)


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

        def items_pattern(self):
            return self.getTypedRuleContext(Python3Parser.Items_patternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_mapping_pattern

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

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

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




    def mapping_pattern(self):

        localctx = Python3Parser.Mapping_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_mapping_pattern)
        self._la = 0 # Token type
        try:
            self.state = 1011
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,127,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 986
                self.match(Python3Parser.OPEN_BRACE)
                self.state = 987
                self.match(Python3Parser.CLOSE_BRACE)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 988
                self.match(Python3Parser.OPEN_BRACE)
                self.state = 989
                self.double_star_pattern()
                self.state = 991
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 990
                    self.match(Python3Parser.COMMA)


                self.state = 993
                self.match(Python3Parser.CLOSE_BRACE)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 995
                self.match(Python3Parser.OPEN_BRACE)
                self.state = 996
                self.items_pattern()
                self.state = 997
                self.match(Python3Parser.COMMA)
                self.state = 998
                self.double_star_pattern()
                self.state = 1000
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 999
                    self.match(Python3Parser.COMMA)


                self.state = 1002
                self.match(Python3Parser.CLOSE_BRACE)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1004
                self.match(Python3Parser.OPEN_BRACE)
                self.state = 1005
                self.items_pattern()
                self.state = 1007
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 1006
                    self.match(Python3Parser.COMMA)


                self.state = 1009
                self.match(Python3Parser.CLOSE_BRACE)
                pass


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


    class Items_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def key_value_pattern(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.Key_value_patternContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Key_value_patternContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_items_pattern

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

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

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




    def items_pattern(self):

        localctx = Python3Parser.Items_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_items_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1013
            self.key_value_pattern()
            self.state = 1018
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,128,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1014
                    self.match(Python3Parser.COMMA)
                    self.state = 1015
                    self.key_value_pattern() 
                self.state = 1020
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,128,self._ctx)

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


    class Key_value_patternContext(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(Python3Parser.COLON, 0)

        def pattern(self):
            return self.getTypedRuleContext(Python3Parser.PatternContext,0)


        def literal_expr(self):
            return self.getTypedRuleContext(Python3Parser.Literal_exprContext,0)


        def attr(self):
            return self.getTypedRuleContext(Python3Parser.AttrContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_key_value_pattern

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

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

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




    def key_value_pattern(self):

        localctx = Python3Parser.Key_value_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_key_value_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1023
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 20, 31, 38, 72]:
                self.state = 1021
                self.literal_expr()
                pass
            elif token in [30, 40, 45]:
                self.state = 1022
                self.attr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 1025
            self.match(Python3Parser.COLON)
            self.state = 1026
            self.pattern()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Double_star_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def pattern_capture_target(self):
            return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_double_star_pattern

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

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

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




    def double_star_pattern(self):

        localctx = Python3Parser.Double_star_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_double_star_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1028
            self.match(Python3Parser.POWER)
            self.state = 1029
            self.pattern_capture_target()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Class_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def name_or_attr(self):
            return self.getTypedRuleContext(Python3Parser.Name_or_attrContext,0)


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

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

        def positional_patterns(self):
            return self.getTypedRuleContext(Python3Parser.Positional_patternsContext,0)


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

        def keyword_patterns(self):
            return self.getTypedRuleContext(Python3Parser.Keyword_patternsContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_class_pattern

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

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

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




    def class_pattern(self):

        localctx = Python3Parser.Class_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_class_pattern)
        self._la = 0 # Token type
        try:
            self.state = 1061
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,133,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1031
                self.name_or_attr()
                self.state = 1032
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 1033
                self.match(Python3Parser.CLOSE_PAREN)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1035
                self.name_or_attr()
                self.state = 1036
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 1037
                self.positional_patterns()
                self.state = 1039
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 1038
                    self.match(Python3Parser.COMMA)


                self.state = 1041
                self.match(Python3Parser.CLOSE_PAREN)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1043
                self.name_or_attr()
                self.state = 1044
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 1045
                self.keyword_patterns()
                self.state = 1047
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 1046
                    self.match(Python3Parser.COMMA)


                self.state = 1049
                self.match(Python3Parser.CLOSE_PAREN)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 1051
                self.name_or_attr()
                self.state = 1052
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 1053
                self.positional_patterns()
                self.state = 1054
                self.match(Python3Parser.COMMA)
                self.state = 1055
                self.keyword_patterns()
                self.state = 1057
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 1056
                    self.match(Python3Parser.COMMA)


                self.state = 1059
                self.match(Python3Parser.CLOSE_PAREN)
                pass


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


    class Positional_patternsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pattern(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.PatternContext)
            else:
                return self.getTypedRuleContext(Python3Parser.PatternContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_positional_patterns

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

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

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




    def positional_patterns(self):

        localctx = Python3Parser.Positional_patternsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_positional_patterns)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1063
            self.pattern()
            self.state = 1068
            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 = 1064
                    self.match(Python3Parser.COMMA)
                    self.state = 1065
                    self.pattern() 
                self.state = 1070
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,134,self._ctx)

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


    class Keyword_patternsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def keyword_pattern(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(Python3Parser.Keyword_patternContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Keyword_patternContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_keyword_patterns

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

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

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




    def keyword_patterns(self):

        localctx = Python3Parser.Keyword_patternsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 170, self.RULE_keyword_patterns)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1071
            self.keyword_pattern()
            self.state = 1076
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,135,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1072
                    self.match(Python3Parser.COMMA)
                    self.state = 1073
                    self.keyword_pattern() 
                self.state = 1078
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,135,self._ctx)

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


    class Keyword_patternContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


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

        def pattern(self):
            return self.getTypedRuleContext(Python3Parser.PatternContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_keyword_pattern

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

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

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




    def keyword_pattern(self):

        localctx = Python3Parser.Keyword_patternContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_keyword_pattern)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1079
            self.name()
            self.state = 1080
            self.match(Python3Parser.ASSIGN)
            self.state = 1081
            self.pattern()
        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(Python3Parser.Or_testContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Or_testContext,i)


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

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

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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_test

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

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

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




    def test(self):

        localctx = Python3Parser.TestContext(self, self._ctx, self.state)
        self.enterRule(localctx, 174, self.RULE_test)
        self._la = 0 # Token type
        try:
            self.state = 1092
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 10, 20, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1083
                self.or_test()
                self.state = 1089
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==25:
                    self.state = 1084
                    self.match(Python3Parser.IF)
                    self.state = 1085
                    self.or_test()
                    self.state = 1086
                    self.match(Python3Parser.ELSE)
                    self.state = 1087
                    self.test()


                pass
            elif token in [29]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1091
                self.lambdef()
                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 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(Python3Parser.Or_testContext,0)


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


        def getRuleIndex(self):
            return Python3Parser.RULE_test_nocond

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

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

        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 = Python3Parser.Test_nocondContext(self, self._ctx, self.state)
        self.enterRule(localctx, 176, self.RULE_test_nocond)
        try:
            self.state = 1096
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 10, 20, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1094
                self.or_test()
                pass
            elif token in [29]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1095
                self.lambdef_nocond()
                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 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(Python3Parser.LAMBDA, 0)

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

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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_lambdef

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

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

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




    def lambdef(self):

        localctx = Python3Parser.LambdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 178, self.RULE_lambdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1098
            self.match(Python3Parser.LAMBDA)
            self.state = 1100
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 4683779897422774272) != 0:
                self.state = 1099
                self.varargslist()


            self.state = 1102
            self.match(Python3Parser.COLON)
            self.state = 1103
            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(Python3Parser.LAMBDA, 0)

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

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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_lambdef_nocond

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

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

        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 = Python3Parser.Lambdef_nocondContext(self, self._ctx, self.state)
        self.enterRule(localctx, 180, self.RULE_lambdef_nocond)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1105
            self.match(Python3Parser.LAMBDA)
            self.state = 1107
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 4683779897422774272) != 0:
                self.state = 1106
                self.varargslist()


            self.state = 1109
            self.match(Python3Parser.COLON)
            self.state = 1110
            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(Python3Parser.And_testContext)
            else:
                return self.getTypedRuleContext(Python3Parser.And_testContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_or_test

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

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

        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 = Python3Parser.Or_testContext(self, self._ctx, self.state)
        self.enterRule(localctx, 182, self.RULE_or_test)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1112
            self.and_test()
            self.state = 1117
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==34:
                self.state = 1113
                self.match(Python3Parser.OR)
                self.state = 1114
                self.and_test()
                self.state = 1119
                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(Python3Parser.Not_testContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Not_testContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_and_test

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

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

        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 = Python3Parser.And_testContext(self, self._ctx, self.state)
        self.enterRule(localctx, 184, self.RULE_and_test)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1120
            self.not_test()
            self.state = 1125
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==6:
                self.state = 1121
                self.match(Python3Parser.AND)
                self.state = 1122
                self.not_test()
                self.state = 1127
                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(Python3Parser.NOT, 0)

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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_not_test

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

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

        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 = Python3Parser.Not_testContext(self, self._ctx, self.state)
        self.enterRule(localctx, 186, self.RULE_not_test)
        try:
            self.state = 1131
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [33]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1128
                self.match(Python3Parser.NOT)
                self.state = 1129
                self.not_test()
                pass
            elif token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1130
                self.comparison()
                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 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(Python3Parser.ExprContext)
            else:
                return self.getTypedRuleContext(Python3Parser.ExprContext,i)


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


        def getRuleIndex(self):
            return Python3Parser.RULE_comparison

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

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

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




    def comparison(self):

        localctx = Python3Parser.ComparisonContext(self, self._ctx, self.state)
        self.enterRule(localctx, 188, self.RULE_comparison)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1133
            self.expr()
            self.state = 1139
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,144,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1134
                    self.comp_op()
                    self.state = 1135
                    self.expr() 
                self.state = 1141
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,144,self._ctx)

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


    class 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(Python3Parser.LESS_THAN, 0)

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

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

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

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

        def NOT_EQ_1(self):
            return self.getToken(Python3Parser.NOT_EQ_1, 0)

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

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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_comp_op

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

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

        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 = Python3Parser.Comp_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 190, self.RULE_comp_op)
        try:
            self.state = 1155
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,145,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1142
                self.match(Python3Parser.LESS_THAN)
                pass

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

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

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

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

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 1147
                self.match(Python3Parser.NOT_EQ_1)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 1148
                self.match(Python3Parser.NOT_EQ_2)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 1149
                self.match(Python3Parser.IN)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 1150
                self.match(Python3Parser.NOT)
                self.state = 1151
                self.match(Python3Parser.IN)
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 1152
                self.match(Python3Parser.IS)
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 1153
                self.match(Python3Parser.IS)
                self.state = 1154
                self.match(Python3Parser.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(Python3Parser.STAR, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_star_expr

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

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

        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 = Python3Parser.Star_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 192, self.RULE_star_expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1157
            self.match(Python3Parser.STAR)
            self.state = 1158
            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(Python3Parser.Xor_exprContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Xor_exprContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_expr

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

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

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




    def expr(self):

        localctx = Python3Parser.ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 194, self.RULE_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1160
            self.xor_expr()
            self.state = 1165
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==66:
                self.state = 1161
                self.match(Python3Parser.OR_OP)
                self.state = 1162
                self.xor_expr()
                self.state = 1167
                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(Python3Parser.And_exprContext)
            else:
                return self.getTypedRuleContext(Python3Parser.And_exprContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_xor_expr

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

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

        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 = Python3Parser.Xor_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 196, self.RULE_xor_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1168
            self.and_expr()
            self.state = 1173
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==67:
                self.state = 1169
                self.match(Python3Parser.XOR)
                self.state = 1170
                self.and_expr()
                self.state = 1175
                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(Python3Parser.Shift_exprContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Shift_exprContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_and_expr

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

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

        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 = Python3Parser.And_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 198, self.RULE_and_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1176
            self.shift_expr()
            self.state = 1181
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==68:
                self.state = 1177
                self.match(Python3Parser.AND_OP)
                self.state = 1178
                self.shift_expr()
                self.state = 1183
                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(Python3Parser.Arith_exprContext)
            else:
                return self.getTypedRuleContext(Python3Parser.Arith_exprContext,i)


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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_shift_expr

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

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

        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 = Python3Parser.Shift_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 200, self.RULE_shift_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1184
            self.arith_expr()
            self.state = 1189
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==69 or _la==70:
                self.state = 1185
                _la = self._input.LA(1)
                if not(_la==69 or _la==70):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 1186
                self.arith_expr()
                self.state = 1191
                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(Python3Parser.TermContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TermContext,i)


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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_arith_expr

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

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

        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 = Python3Parser.Arith_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 202, self.RULE_arith_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1192
            self.term()
            self.state = 1197
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,150,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1193
                    _la = self._input.LA(1)
                    if not(_la==71 or _la==72):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 1194
                    self.term() 
                self.state = 1199
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,150,self._ctx)

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


    class 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(Python3Parser.FactorContext)
            else:
                return self.getTypedRuleContext(Python3Parser.FactorContext,i)


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

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

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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_term

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

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

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




    def term(self):

        localctx = Python3Parser.TermContext(self, self._ctx, self.state)
        self.enterRule(localctx, 204, self.RULE_term)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1200
            self.factor()
            self.state = 1205
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,151,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1201
                    _la = self._input.LA(1)
                    if not((((_la - 56)) & ~0x3f) == 0 and ((1 << (_la - 56)) & 1074659329) != 0):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 1202
                    self.factor() 
                self.state = 1207
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,151,self._ctx)

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


    class 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(Python3Parser.FactorContext,0)


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

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

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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_factor

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

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

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




    def factor(self):

        localctx = Python3Parser.FactorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 206, self.RULE_factor)
        self._la = 0 # Token type
        try:
            self.state = 1211
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [71, 72, 76]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1208
                _la = self._input.LA(1)
                if not((((_la - 71)) & ~0x3f) == 0 and ((1 << (_la - 71)) & 35) != 0):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 1209
                self.factor()
                pass
            elif token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 77]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1210
                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(Python3Parser.Atom_exprContext,0)


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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_power

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

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

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




    def power(self):

        localctx = Python3Parser.PowerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 208, self.RULE_power)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1213
            self.atom_expr()
            self.state = 1216
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==62:
                self.state = 1214
                self.match(Python3Parser.POWER)
                self.state = 1215
                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(Python3Parser.AtomContext,0)


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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_atom_expr

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

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

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




    def atom_expr(self):

        localctx = Python3Parser.Atom_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 210, self.RULE_atom_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1219
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==10:
                self.state = 1218
                self.match(Python3Parser.AWAIT)


            self.state = 1221
            self.atom()
            self.state = 1225
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,155,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1222
                    self.trailer() 
                self.state = 1227
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,155,self._ctx)

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


    class 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(Python3Parser.OPEN_PAREN, 0)

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

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


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


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

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

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

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

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


        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


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

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

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

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

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_atom

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

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

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




    def atom(self):

        localctx = Python3Parser.AtomContext(self, self._ctx, self.state)
        self.enterRule(localctx, 212, self.RULE_atom)
        self._la = 0 # Token type
        try:
            self.state = 1255
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [57]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1228
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 1231
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [43]:
                    self.state = 1229
                    self.yield_expr()
                    pass
                elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 56, 57, 64, 71, 72, 76, 77]:
                    self.state = 1230
                    self.testlist_comp()
                    pass
                elif token in [58]:
                    pass
                else:
                    pass
                self.state = 1233
                self.match(Python3Parser.CLOSE_PAREN)
                pass
            elif token in [64]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1234
                self.match(Python3Parser.OPEN_BRACK)
                self.state = 1236
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 252238150243451928) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                    self.state = 1235
                    self.testlist_comp()


                self.state = 1238
                self.match(Python3Parser.CLOSE_BRACK)
                pass
            elif token in [77]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1239
                self.match(Python3Parser.OPEN_BRACE)
                self.state = 1241
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                    self.state = 1240
                    self.dictorsetmaker()


                self.state = 1243
                self.match(Python3Parser.CLOSE_BRACE)
                pass
            elif token in [30, 40, 45]:
                self.enterOuterAlt(localctx, 4)
                self.state = 1244
                self.name()
                pass
            elif token in [4]:
                self.enterOuterAlt(localctx, 5)
                self.state = 1245
                self.match(Python3Parser.NUMBER)
                pass
            elif token in [3]:
                self.enterOuterAlt(localctx, 6)
                self.state = 1247 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 1246
                        self.match(Python3Parser.STRING)

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

                pass
            elif token in [55]:
                self.enterOuterAlt(localctx, 7)
                self.state = 1251
                self.match(Python3Parser.ELLIPSIS)
                pass
            elif token in [31]:
                self.enterOuterAlt(localctx, 8)
                self.state = 1252
                self.match(Python3Parser.NONE)
                pass
            elif token in [38]:
                self.enterOuterAlt(localctx, 9)
                self.state = 1253
                self.match(Python3Parser.TRUE)
                pass
            elif token in [20]:
                self.enterOuterAlt(localctx, 10)
                self.state = 1254
                self.match(Python3Parser.FALSE)
                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 NameContext(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(Python3Parser.NAME, 0)

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

        def MATCH(self):
            return self.getToken(Python3Parser.MATCH, 0)

        def getRuleIndex(self):
            return Python3Parser.RULE_name

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

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

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




    def name(self):

        localctx = Python3Parser.NameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 214, self.RULE_name)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1257
            _la = self._input.LA(1)
            if not(((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 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 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(Python3Parser.TestContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TestContext,i)


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


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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_testlist_comp

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

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

        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 = Python3Parser.Testlist_compContext(self, self._ctx, self.state)
        self.enterRule(localctx, 216, self.RULE_testlist_comp)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1261
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.state = 1259
                self.test()
                pass
            elif token in [56]:
                self.state = 1260
                self.star_expr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 1277
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [9, 22]:
                self.state = 1263
                self.comp_for()
                pass
            elif token in [58, 59, 65]:
                self.state = 1271
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,163,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 1264
                        self.match(Python3Parser.COMMA)
                        self.state = 1267
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                            self.state = 1265
                            self.test()
                            pass
                        elif token in [56]:
                            self.state = 1266
                            self.star_expr()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 1273
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,163,self._ctx)

                self.state = 1275
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==59:
                    self.state = 1274
                    self.match(Python3Parser.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(Python3Parser.OPEN_PAREN, 0)

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

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


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

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


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

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

        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_trailer

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

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

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




    def trailer(self):

        localctx = Python3Parser.TrailerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 218, self.RULE_trailer)
        self._la = 0 # Token type
        try:
            self.state = 1290
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [57]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1279
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 1281
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                    self.state = 1280
                    self.arglist()


                self.state = 1283
                self.match(Python3Parser.CLOSE_PAREN)
                pass
            elif token in [64]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1284
                self.match(Python3Parser.OPEN_BRACK)
                self.state = 1285
                self.subscriptlist()
                self.state = 1286
                self.match(Python3Parser.CLOSE_BRACK)
                pass
            elif token in [54]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1288
                self.match(Python3Parser.DOT)
                self.state = 1289
                self.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(Python3Parser.Subscript_Context)
            else:
                return self.getTypedRuleContext(Python3Parser.Subscript_Context,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_subscriptlist

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

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

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




    def subscriptlist(self):

        localctx = Python3Parser.SubscriptlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 220, self.RULE_subscriptlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1292
            self.subscript_()
            self.state = 1297
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,168,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1293
                    self.match(Python3Parser.COMMA)
                    self.state = 1294
                    self.subscript_() 
                self.state = 1299
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,168,self._ctx)

            self.state = 1301
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 1300
                self.match(Python3Parser.COMMA)


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


    class Subscript_Context(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(Python3Parser.TestContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TestContext,i)


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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_subscript_

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

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

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




    def subscript_(self):

        localctx = Python3Parser.Subscript_Context(self, self._ctx, self.state)
        self.enterRule(localctx, 222, self.RULE_subscript_)
        self._la = 0 # Token type
        try:
            self.state = 1314
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,173,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1303
                self.test()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1305
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                    self.state = 1304
                    self.test()


                self.state = 1307
                self.match(Python3Parser.COLON)
                self.state = 1309
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                    self.state = 1308
                    self.test()


                self.state = 1312
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==60:
                    self.state = 1311
                    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(Python3Parser.COLON, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_sliceop

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

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

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




    def sliceop(self):

        localctx = Python3Parser.SliceopContext(self, self._ctx, self.state)
        self.enterRule(localctx, 224, self.RULE_sliceop)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1316
            self.match(Python3Parser.COLON)
            self.state = 1318
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                self.state = 1317
                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(Python3Parser.ExprContext)
            else:
                return self.getTypedRuleContext(Python3Parser.ExprContext,i)


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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_exprlist

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

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

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




    def exprlist(self):

        localctx = Python3Parser.ExprlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 226, self.RULE_exprlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1322
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.state = 1320
                self.expr()
                pass
            elif token in [56]:
                self.state = 1321
                self.star_expr()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 1331
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,177,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1324
                    self.match(Python3Parser.COMMA)
                    self.state = 1327
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                        self.state = 1325
                        self.expr()
                        pass
                    elif token in [56]:
                        self.state = 1326
                        self.star_expr()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 1333
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,177,self._ctx)

            self.state = 1335
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 1334
                self.match(Python3Parser.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(Python3Parser.TestContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TestContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_testlist

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

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

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




    def testlist(self):

        localctx = Python3Parser.TestlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 228, self.RULE_testlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1337
            self.test()
            self.state = 1342
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,179,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1338
                    self.match(Python3Parser.COMMA)
                    self.state = 1339
                    self.test() 
                self.state = 1344
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,179,self._ctx)

            self.state = 1346
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 1345
                self.match(Python3Parser.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(Python3Parser.TestContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TestContext,i)


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

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

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


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


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


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

        def getRuleIndex(self):
            return Python3Parser.RULE_dictorsetmaker

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

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

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




    def dictorsetmaker(self):

        localctx = Python3Parser.DictorsetmakerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 230, self.RULE_dictorsetmaker)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1396
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,191,self._ctx)
            if la_ == 1:
                self.state = 1354
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                    self.state = 1348
                    self.test()
                    self.state = 1349
                    self.match(Python3Parser.COLON)
                    self.state = 1350
                    self.test()
                    pass
                elif token in [62]:
                    self.state = 1352
                    self.match(Python3Parser.POWER)
                    self.state = 1353
                    self.expr()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 1374
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [9, 22]:
                    self.state = 1356
                    self.comp_for()
                    pass
                elif token in [59, 78]:
                    self.state = 1368
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,183,self._ctx)
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt==1:
                            self.state = 1357
                            self.match(Python3Parser.COMMA)
                            self.state = 1364
                            self._errHandler.sync(self)
                            token = self._input.LA(1)
                            if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                                self.state = 1358
                                self.test()
                                self.state = 1359
                                self.match(Python3Parser.COLON)
                                self.state = 1360
                                self.test()
                                pass
                            elif token in [62]:
                                self.state = 1362
                                self.match(Python3Parser.POWER)
                                self.state = 1363
                                self.expr()
                                pass
                            else:
                                raise NoViableAltException(self)
                     
                        self.state = 1370
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,183,self._ctx)

                    self.state = 1372
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==59:
                        self.state = 1371
                        self.match(Python3Parser.COMMA)


                    pass
                else:
                    raise NoViableAltException(self)

                pass

            elif la_ == 2:
                self.state = 1378
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                    self.state = 1376
                    self.test()
                    pass
                elif token in [56]:
                    self.state = 1377
                    self.star_expr()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 1394
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [9, 22]:
                    self.state = 1380
                    self.comp_for()
                    pass
                elif token in [59, 78]:
                    self.state = 1388
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,188,self._ctx)
                    while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                        if _alt==1:
                            self.state = 1381
                            self.match(Python3Parser.COMMA)
                            self.state = 1384
                            self._errHandler.sync(self)
                            token = self._input.LA(1)
                            if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                                self.state = 1382
                                self.test()
                                pass
                            elif token in [56]:
                                self.state = 1383
                                self.star_expr()
                                pass
                            else:
                                raise NoViableAltException(self)
                     
                        self.state = 1390
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,188,self._ctx)

                    self.state = 1392
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==59:
                        self.state = 1391
                        self.match(Python3Parser.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(Python3Parser.CLASS, 0)

        def name(self):
            return self.getTypedRuleContext(Python3Parser.NameContext,0)


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

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


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

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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_classdef

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

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

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




    def classdef(self):

        localctx = Python3Parser.ClassdefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 232, self.RULE_classdef)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1398
            self.match(Python3Parser.CLASS)
            self.state = 1399
            self.name()
            self.state = 1405
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==57:
                self.state = 1400
                self.match(Python3Parser.OPEN_PAREN)
                self.state = 1402
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                    self.state = 1401
                    self.arglist()


                self.state = 1404
                self.match(Python3Parser.CLOSE_PAREN)


            self.state = 1407
            self.match(Python3Parser.COLON)
            self.state = 1408
            self.block()
        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(Python3Parser.ArgumentContext)
            else:
                return self.getTypedRuleContext(Python3Parser.ArgumentContext,i)


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

        def getRuleIndex(self):
            return Python3Parser.RULE_arglist

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

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

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




    def arglist(self):

        localctx = Python3Parser.ArglistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 234, self.RULE_arglist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1410
            self.argument()
            self.state = 1415
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,194,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1411
                    self.match(Python3Parser.COMMA)
                    self.state = 1412
                    self.argument() 
                self.state = 1417
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,194,self._ctx)

            self.state = 1419
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==59:
                self.state = 1418
                self.match(Python3Parser.COMMA)


        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(Python3Parser.TestContext)
            else:
                return self.getTypedRuleContext(Python3Parser.TestContext,i)


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

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

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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_argument

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

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

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




    def argument(self):

        localctx = Python3Parser.ArgumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 236, self.RULE_argument)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1433
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,197,self._ctx)
            if la_ == 1:
                self.state = 1421
                self.test()
                self.state = 1423
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==9 or _la==22:
                    self.state = 1422
                    self.comp_for()


                pass

            elif la_ == 2:
                self.state = 1425
                self.test()
                self.state = 1426
                self.match(Python3Parser.ASSIGN)
                self.state = 1427
                self.test()
                pass

            elif la_ == 3:
                self.state = 1429
                self.match(Python3Parser.POWER)
                self.state = 1430
                self.test()
                pass

            elif la_ == 4:
                self.state = 1431
                self.match(Python3Parser.STAR)
                self.state = 1432
                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(Python3Parser.Comp_forContext,0)


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


        def getRuleIndex(self):
            return Python3Parser.RULE_comp_iter

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

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

        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 = Python3Parser.Comp_iterContext(self, self._ctx, self.state)
        self.enterRule(localctx, 238, self.RULE_comp_iter)
        try:
            self.state = 1437
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [9, 22]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1435
                self.comp_for()
                pass
            elif token in [25]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1436
                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(Python3Parser.FOR, 0)

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


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

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


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

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


        def getRuleIndex(self):
            return Python3Parser.RULE_comp_for

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

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

        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 = Python3Parser.Comp_forContext(self, self._ctx, self.state)
        self.enterRule(localctx, 240, self.RULE_comp_for)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1440
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==9:
                self.state = 1439
                self.match(Python3Parser.ASYNC)


            self.state = 1442
            self.match(Python3Parser.FOR)
            self.state = 1443
            self.exprlist()
            self.state = 1444
            self.match(Python3Parser.IN)
            self.state = 1445
            self.or_test()
            self.state = 1447
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 37749248) != 0:
                self.state = 1446
                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(Python3Parser.IF, 0)

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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_comp_if

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

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

        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 = Python3Parser.Comp_ifContext(self, self._ctx, self.state)
        self.enterRule(localctx, 242, self.RULE_comp_if)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1449
            self.match(Python3Parser.IF)
            self.state = 1450
            self.test_nocond()
            self.state = 1452
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 37749248) != 0:
                self.state = 1451
                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.getTypedRuleContext(Python3Parser.NameContext,0)


        def getRuleIndex(self):
            return Python3Parser.RULE_encoding_decl

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

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

        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 = Python3Parser.Encoding_declContext(self, self._ctx, self.state)
        self.enterRule(localctx, 244, self.RULE_encoding_decl)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1454
            self.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(Python3Parser.YIELD, 0)

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


        def getRuleIndex(self):
            return Python3Parser.RULE_yield_expr

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

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

        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 = Python3Parser.Yield_exprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 246, self.RULE_yield_expr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1456
            self.match(Python3Parser.YIELD)
            self.state = 1458
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556213912600) != 0 or (((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0:
                self.state = 1457
                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(Python3Parser.FROM, 0)

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


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


        def getRuleIndex(self):
            return Python3Parser.RULE_yield_arg

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

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

        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 = Python3Parser.Yield_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 248, self.RULE_yield_arg)
        try:
            self.state = 1463
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [23]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1460
                self.match(Python3Parser.FROM)
                self.state = 1461
                self.test()
                pass
            elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1462
                self.testlist()
                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 StringsContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def getRuleIndex(self):
            return Python3Parser.RULE_strings

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

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

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




    def strings(self):

        localctx = Python3Parser.StringsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 250, self.RULE_strings)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1466 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 1465
                self.match(Python3Parser.STRING)
                self.state = 1468 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not (_la==3):
                    break

        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[60] = self.literal_pattern_sempred
        self._predicates[61] = self.literal_expr_sempred
        self._predicates[68] = self.pattern_capture_target_sempred
        self._predicates[70] = self.value_pattern_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 literal_pattern_sempred(self, localctx:Literal_patternContext, predIndex:int):
            if predIndex == 0:
                return  self.CannotBePlusMinus() 
         

    def literal_expr_sempred(self, localctx:Literal_exprContext, predIndex:int):
            if predIndex == 1:
                return  self.CannotBePlusMinus() 
         

    def pattern_capture_target_sempred(self, localctx:Pattern_capture_targetContext, predIndex:int):
            if predIndex == 2:
                return  self.CannotBeDotLpEq() 
         

    def value_pattern_sempred(self, localctx:Value_patternContext, predIndex:int):
            if predIndex == 3:
                return  self.CannotBeDotLpEq() 
         




