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

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

class BraketPragmasParser ( Parser ):

    grammarFileName = "BraketPragmasParser.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'braket'", "'unitary'", "'result'", "'noise'", 
                     "'verbatim'", "'state_vector'", "'probability'", "'density_matrix'", 
                     "'amplitude'", "'expectation'", "'variance'", "'sample'", 
                     "'x'", "'y'", "'z'", "'i'", "'h'", "'hermitian'", "'all'", 
                     "'@'", "'bit_flip'", "'phase_flip'", "'pauli_channel'", 
                     "'depolarizing'", "'two_qubit_depolarizing'", "'two_qubit_dephasing'", 
                     "'amplitude_damping'", "'generalized_amplitude_damping'", 
                     "'phase_damping'", "'kraus'", "'OPENQASM'", "'include'", 
                     "'defcalgrammar'", "'def'", "'defcal'", "'gate'", "'extern'", 
                     "'box'", "'let'", "'break'", "'continue'", "'if'", 
                     "'else'", "'end'", "'return'", "'for'", "'while'", 
                     "'in'", "<INVALID>", "<INVALID>", "'input'", "'output'", 
                     "'const'", "'mutable'", "'qreg'", "'qubit'", "'creg'", 
                     "'bool'", "'bit'", "'int'", "'uint'", "'float'", "'angle'", 
                     "'complex'", "'array'", "'duration'", "'stretch'", 
                     "'gphase'", "'inv'", "'pow'", "'ctrl'", "'negctrl'", 
                     "'#dim'", "'durationof'", "'delay'", "'reset'", "'measure'", 
                     "'barrier'", "<INVALID>", "'['", "']'", "'{'", "'}'", 
                     "'('", "')'", "':'", "';'", "'.'", "','", "'='", "'->'", 
                     "'+'", "'++'", "'-'", "'*'", "'**'", "'/'", "'%'", 
                     "'|'", "'||'", "'&'", "'&&'", "'^'", "'~'", "'!'", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "'im'" ]

    symbolicNames = [ "<INVALID>", "BRAKET", "UNITARY", "RESULT", "NOISE", 
                      "VERBATIM", "STATE_VECTOR", "PROBABILITY", "DENSITY_MATRIX", 
                      "AMPLITUDE", "EXPECTATION", "VARIANCE", "SAMPLE", 
                      "X", "Y", "Z", "I", "H", "HERMITIAN", "ALL", "AT", 
                      "BIT_FLIP", "PHASE_FLIP", "PAULI_CHANNEL", "DEPOLARIZING", 
                      "TWO_QUBIT_DEPOLARIZING", "TWO_QUBIT_DEPHASING", "AMPLITUDE_DAMPING", 
                      "GENERALIZED_AMPLITUDE_DAMPING", "PHASE_DAMPING", 
                      "KRAUS", "OPENQASM", "INCLUDE", "DEFCALGRAMMAR", "DEF", 
                      "DEFCAL", "GATE", "EXTERN", "BOX", "LET", "BREAK", 
                      "CONTINUE", "IF", "ELSE", "END", "RETURN", "FOR", 
                      "WHILE", "IN", "PRAGMA", "AnnotationKeyword", "INPUT", 
                      "OUTPUT", "CONST", "MUTABLE", "QREG", "QUBIT", "CREG", 
                      "BOOL", "BIT", "INT", "UINT", "FLOAT", "ANGLE", "COMPLEX", 
                      "ARRAY", "DURATION", "STRETCH", "GPHASE", "INV", "POW", 
                      "CTRL", "NEGCTRL", "DIM", "DURATIONOF", "DELAY", "RESET", 
                      "MEASURE", "BARRIER", "BooleanLiteral", "LBRACKET", 
                      "RBRACKET", "LBRACE", "RBRACE", "LPAREN", "RPAREN", 
                      "COLON", "SEMICOLON", "DOT", "COMMA", "EQUALS", "ARROW", 
                      "PLUS", "DOUBLE_PLUS", "MINUS", "ASTERISK", "DOUBLE_ASTERISK", 
                      "SLASH", "PERCENT", "PIPE", "DOUBLE_PIPE", "AMPERSAND", 
                      "DOUBLE_AMPERSAND", "CARET", "TILDE", "EXCLAMATION_POINT", 
                      "EqualityOperator", "CompoundAssignmentOperator", 
                      "ComparisonOperator", "BitshiftOperator", "IMAG", 
                      "ImaginaryLiteral", "BinaryIntegerLiteral", "OctalIntegerLiteral", 
                      "DecimalIntegerLiteral", "HexIntegerLiteral", "Identifier", 
                      "HardwareQubit", "FloatLiteral", "TimingLiteral", 
                      "BitstringLiteral", "StringLiteral", "Whitespace", 
                      "Newline", "LineComment", "BlockComment", "VERSION_IDENTIFER_WHITESPACE", 
                      "VersionSpecifier", "EAT_INITIAL_SPACE", "EAT_LINE_END", 
                      "RemainingLineContent" ]

    RULE_braketPragma = 0
    RULE_braketUnitaryPragma = 1
    RULE_braketVerbatimPragma = 2
    RULE_twoDimMatrix = 3
    RULE_row = 4
    RULE_braketResultPragma = 5
    RULE_resultType = 6
    RULE_noArgResultType = 7
    RULE_noArgResultTypeName = 8
    RULE_optionalMultiTargetResultType = 9
    RULE_optionalMultiTargetResultTypeName = 10
    RULE_multiTarget = 11
    RULE_multiStateResultType = 12
    RULE_multiStateResultTypeName = 13
    RULE_multiState = 14
    RULE_observableResultType = 15
    RULE_observable = 16
    RULE_standardObservable = 17
    RULE_tensorProductObservable = 18
    RULE_hermitianObservable = 19
    RULE_observableResultTypeName = 20
    RULE_standardObservableName = 21
    RULE_complexNumber = 22
    RULE_braketNoisePragma = 23
    RULE_noiseInstruction = 24
    RULE_matrices = 25
    RULE_probabilities = 26
    RULE_noiseInstructionName = 27
    RULE_program = 28
    RULE_version = 29
    RULE_statement = 30
    RULE_annotation = 31
    RULE_scope = 32
    RULE_pragma = 33
    RULE_statementOrScope = 34
    RULE_calibrationGrammarStatement = 35
    RULE_includeStatement = 36
    RULE_breakStatement = 37
    RULE_continueStatement = 38
    RULE_endStatement = 39
    RULE_forStatement = 40
    RULE_ifStatement = 41
    RULE_returnStatement = 42
    RULE_whileStatement = 43
    RULE_barrierStatement = 44
    RULE_boxStatement = 45
    RULE_delayStatement = 46
    RULE_gateCallStatement = 47
    RULE_measureArrowAssignmentStatement = 48
    RULE_resetStatement = 49
    RULE_aliasDeclarationStatement = 50
    RULE_classicalDeclarationStatement = 51
    RULE_constDeclarationStatement = 52
    RULE_ioDeclarationStatement = 53
    RULE_oldStyleDeclarationStatement = 54
    RULE_quantumDeclarationStatement = 55
    RULE_defStatement = 56
    RULE_externStatement = 57
    RULE_gateStatement = 58
    RULE_assignmentStatement = 59
    RULE_expressionStatement = 60
    RULE_defcalStatement = 61
    RULE_expression = 62
    RULE_aliasExpression = 63
    RULE_declarationExpression = 64
    RULE_measureExpression = 65
    RULE_rangeExpression = 66
    RULE_setExpression = 67
    RULE_arrayLiteral = 68
    RULE_indexOperator = 69
    RULE_indexedIdentifier = 70
    RULE_returnSignature = 71
    RULE_gateModifier = 72
    RULE_scalarType = 73
    RULE_qubitType = 74
    RULE_arrayType = 75
    RULE_arrayReferenceType = 76
    RULE_designator = 77
    RULE_gateOperand = 78
    RULE_externArgument = 79
    RULE_defcalArgument = 80
    RULE_argumentDefinition = 81
    RULE_argumentDefinitionList = 82
    RULE_expressionList = 83
    RULE_defcalArgumentList = 84
    RULE_identifierList = 85
    RULE_gateOperandList = 86
    RULE_externArgumentList = 87

    ruleNames =  [ "braketPragma", "braketUnitaryPragma", "braketVerbatimPragma", 
                   "twoDimMatrix", "row", "braketResultPragma", "resultType", 
                   "noArgResultType", "noArgResultTypeName", "optionalMultiTargetResultType", 
                   "optionalMultiTargetResultTypeName", "multiTarget", "multiStateResultType", 
                   "multiStateResultTypeName", "multiState", "observableResultType", 
                   "observable", "standardObservable", "tensorProductObservable", 
                   "hermitianObservable", "observableResultTypeName", "standardObservableName", 
                   "complexNumber", "braketNoisePragma", "noiseInstruction", 
                   "matrices", "probabilities", "noiseInstructionName", 
                   "program", "version", "statement", "annotation", "scope", 
                   "pragma", "statementOrScope", "calibrationGrammarStatement", 
                   "includeStatement", "breakStatement", "continueStatement", 
                   "endStatement", "forStatement", "ifStatement", "returnStatement", 
                   "whileStatement", "barrierStatement", "boxStatement", 
                   "delayStatement", "gateCallStatement", "measureArrowAssignmentStatement", 
                   "resetStatement", "aliasDeclarationStatement", "classicalDeclarationStatement", 
                   "constDeclarationStatement", "ioDeclarationStatement", 
                   "oldStyleDeclarationStatement", "quantumDeclarationStatement", 
                   "defStatement", "externStatement", "gateStatement", "assignmentStatement", 
                   "expressionStatement", "defcalStatement", "expression", 
                   "aliasExpression", "declarationExpression", "measureExpression", 
                   "rangeExpression", "setExpression", "arrayLiteral", "indexOperator", 
                   "indexedIdentifier", "returnSignature", "gateModifier", 
                   "scalarType", "qubitType", "arrayType", "arrayReferenceType", 
                   "designator", "gateOperand", "externArgument", "defcalArgument", 
                   "argumentDefinition", "argumentDefinitionList", "expressionList", 
                   "defcalArgumentList", "identifierList", "gateOperandList", 
                   "externArgumentList" ]

    EOF = Token.EOF
    BRAKET=1
    UNITARY=2
    RESULT=3
    NOISE=4
    VERBATIM=5
    STATE_VECTOR=6
    PROBABILITY=7
    DENSITY_MATRIX=8
    AMPLITUDE=9
    EXPECTATION=10
    VARIANCE=11
    SAMPLE=12
    X=13
    Y=14
    Z=15
    I=16
    H=17
    HERMITIAN=18
    ALL=19
    AT=20
    BIT_FLIP=21
    PHASE_FLIP=22
    PAULI_CHANNEL=23
    DEPOLARIZING=24
    TWO_QUBIT_DEPOLARIZING=25
    TWO_QUBIT_DEPHASING=26
    AMPLITUDE_DAMPING=27
    GENERALIZED_AMPLITUDE_DAMPING=28
    PHASE_DAMPING=29
    KRAUS=30
    OPENQASM=31
    INCLUDE=32
    DEFCALGRAMMAR=33
    DEF=34
    DEFCAL=35
    GATE=36
    EXTERN=37
    BOX=38
    LET=39
    BREAK=40
    CONTINUE=41
    IF=42
    ELSE=43
    END=44
    RETURN=45
    FOR=46
    WHILE=47
    IN=48
    PRAGMA=49
    AnnotationKeyword=50
    INPUT=51
    OUTPUT=52
    CONST=53
    MUTABLE=54
    QREG=55
    QUBIT=56
    CREG=57
    BOOL=58
    BIT=59
    INT=60
    UINT=61
    FLOAT=62
    ANGLE=63
    COMPLEX=64
    ARRAY=65
    DURATION=66
    STRETCH=67
    GPHASE=68
    INV=69
    POW=70
    CTRL=71
    NEGCTRL=72
    DIM=73
    DURATIONOF=74
    DELAY=75
    RESET=76
    MEASURE=77
    BARRIER=78
    BooleanLiteral=79
    LBRACKET=80
    RBRACKET=81
    LBRACE=82
    RBRACE=83
    LPAREN=84
    RPAREN=85
    COLON=86
    SEMICOLON=87
    DOT=88
    COMMA=89
    EQUALS=90
    ARROW=91
    PLUS=92
    DOUBLE_PLUS=93
    MINUS=94
    ASTERISK=95
    DOUBLE_ASTERISK=96
    SLASH=97
    PERCENT=98
    PIPE=99
    DOUBLE_PIPE=100
    AMPERSAND=101
    DOUBLE_AMPERSAND=102
    CARET=103
    TILDE=104
    EXCLAMATION_POINT=105
    EqualityOperator=106
    CompoundAssignmentOperator=107
    ComparisonOperator=108
    BitshiftOperator=109
    IMAG=110
    ImaginaryLiteral=111
    BinaryIntegerLiteral=112
    OctalIntegerLiteral=113
    DecimalIntegerLiteral=114
    HexIntegerLiteral=115
    Identifier=116
    HardwareQubit=117
    FloatLiteral=118
    TimingLiteral=119
    BitstringLiteral=120
    StringLiteral=121
    Whitespace=122
    Newline=123
    LineComment=124
    BlockComment=125
    VERSION_IDENTIFER_WHITESPACE=126
    VersionSpecifier=127
    EAT_INITIAL_SPACE=128
    EAT_LINE_END=129
    RemainingLineContent=130

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




    class BraketPragmaContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def braketResultPragma(self):
            return self.getTypedRuleContext(BraketPragmasParser.BraketResultPragmaContext,0)


        def braketUnitaryPragma(self):
            return self.getTypedRuleContext(BraketPragmasParser.BraketUnitaryPragmaContext,0)


        def braketNoisePragma(self):
            return self.getTypedRuleContext(BraketPragmasParser.BraketNoisePragmaContext,0)


        def braketVerbatimPragma(self):
            return self.getTypedRuleContext(BraketPragmasParser.BraketVerbatimPragmaContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_braketPragma

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

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

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




    def braketPragma(self):

        localctx = BraketPragmasParser.BraketPragmaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_braketPragma)
        try:
            self.state = 180
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 176
                self.braketResultPragma()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 177
                self.braketUnitaryPragma()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 178
                self.braketNoisePragma()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 179
                self.braketVerbatimPragma()
                pass


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


    class BraketUnitaryPragmaContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BRAKET(self):
            return self.getToken(BraketPragmasParser.BRAKET, 0)

        def UNITARY(self):
            return self.getToken(BraketPragmasParser.UNITARY, 0)

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

        def twoDimMatrix(self):
            return self.getTypedRuleContext(BraketPragmasParser.TwoDimMatrixContext,0)


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

        def multiTarget(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiTargetContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_braketUnitaryPragma

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

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

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




    def braketUnitaryPragma(self):

        localctx = BraketPragmasParser.BraketUnitaryPragmaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_braketUnitaryPragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 182
            self.match(BraketPragmasParser.BRAKET)
            self.state = 183
            self.match(BraketPragmasParser.UNITARY)
            self.state = 184
            self.match(BraketPragmasParser.LPAREN)
            self.state = 185
            self.twoDimMatrix()
            self.state = 186
            self.match(BraketPragmasParser.RPAREN)
            self.state = 187
            self.multiTarget()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BraketVerbatimPragmaContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BRAKET(self):
            return self.getToken(BraketPragmasParser.BRAKET, 0)

        def VERBATIM(self):
            return self.getToken(BraketPragmasParser.VERBATIM, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_braketVerbatimPragma

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

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

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




    def braketVerbatimPragma(self):

        localctx = BraketPragmasParser.BraketVerbatimPragmaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_braketVerbatimPragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 189
            self.match(BraketPragmasParser.BRAKET)
            self.state = 190
            self.match(BraketPragmasParser.VERBATIM)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TwoDimMatrixContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

        def row(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.RowContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.RowContext,i)


        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_twoDimMatrix

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

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

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




    def twoDimMatrix(self):

        localctx = BraketPragmasParser.TwoDimMatrixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_twoDimMatrix)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 192
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 193
            self.row()
            self.state = 198
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==89:
                self.state = 194
                self.match(BraketPragmasParser.COMMA)
                self.state = 195
                self.row()
                self.state = 200
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 201
            self.match(BraketPragmasParser.RBRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RowContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

        def complexNumber(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.ComplexNumberContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.ComplexNumberContext,i)


        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_row

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

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

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




    def row(self):

        localctx = BraketPragmasParser.RowContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_row)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 203
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 204
            self.complexNumber()
            self.state = 209
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==89:
                self.state = 205
                self.match(BraketPragmasParser.COMMA)
                self.state = 206
                self.complexNumber()
                self.state = 211
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 212
            self.match(BraketPragmasParser.RBRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BraketResultPragmaContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BRAKET(self):
            return self.getToken(BraketPragmasParser.BRAKET, 0)

        def RESULT(self):
            return self.getToken(BraketPragmasParser.RESULT, 0)

        def resultType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ResultTypeContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_braketResultPragma

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

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

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




    def braketResultPragma(self):

        localctx = BraketPragmasParser.BraketResultPragmaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_braketResultPragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 214
            self.match(BraketPragmasParser.BRAKET)
            self.state = 215
            self.match(BraketPragmasParser.RESULT)
            self.state = 216
            self.resultType()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ResultTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def noArgResultType(self):
            return self.getTypedRuleContext(BraketPragmasParser.NoArgResultTypeContext,0)


        def optionalMultiTargetResultType(self):
            return self.getTypedRuleContext(BraketPragmasParser.OptionalMultiTargetResultTypeContext,0)


        def multiStateResultType(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiStateResultTypeContext,0)


        def observableResultType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ObservableResultTypeContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_resultType

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

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

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




    def resultType(self):

        localctx = BraketPragmasParser.ResultTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_resultType)
        try:
            self.state = 222
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [6]:
                self.enterOuterAlt(localctx, 1)
                self.state = 218
                self.noArgResultType()
                pass
            elif token in [7, 8]:
                self.enterOuterAlt(localctx, 2)
                self.state = 219
                self.optionalMultiTargetResultType()
                pass
            elif token in [9]:
                self.enterOuterAlt(localctx, 3)
                self.state = 220
                self.multiStateResultType()
                pass
            elif token in [10, 11, 12]:
                self.enterOuterAlt(localctx, 4)
                self.state = 221
                self.observableResultType()
                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 NoArgResultTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def noArgResultTypeName(self):
            return self.getTypedRuleContext(BraketPragmasParser.NoArgResultTypeNameContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_noArgResultType

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

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

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




    def noArgResultType(self):

        localctx = BraketPragmasParser.NoArgResultTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_noArgResultType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 224
            self.noArgResultTypeName()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NoArgResultTypeNameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def STATE_VECTOR(self):
            return self.getToken(BraketPragmasParser.STATE_VECTOR, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_noArgResultTypeName

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

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

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




    def noArgResultTypeName(self):

        localctx = BraketPragmasParser.NoArgResultTypeNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_noArgResultTypeName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 226
            self.match(BraketPragmasParser.STATE_VECTOR)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OptionalMultiTargetResultTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def optionalMultiTargetResultTypeName(self):
            return self.getTypedRuleContext(BraketPragmasParser.OptionalMultiTargetResultTypeNameContext,0)


        def multiTarget(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiTargetContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_optionalMultiTargetResultType

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

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

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




    def optionalMultiTargetResultType(self):

        localctx = BraketPragmasParser.OptionalMultiTargetResultTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_optionalMultiTargetResultType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 228
            self.optionalMultiTargetResultTypeName()
            self.state = 230
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==19 or _la==116:
                self.state = 229
                self.multiTarget()


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


    class OptionalMultiTargetResultTypeNameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PROBABILITY(self):
            return self.getToken(BraketPragmasParser.PROBABILITY, 0)

        def DENSITY_MATRIX(self):
            return self.getToken(BraketPragmasParser.DENSITY_MATRIX, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_optionalMultiTargetResultTypeName

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

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

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




    def optionalMultiTargetResultTypeName(self):

        localctx = BraketPragmasParser.OptionalMultiTargetResultTypeNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_optionalMultiTargetResultTypeName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 232
            _la = self._input.LA(1)
            if not(_la==7 or _la==8):
                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 MultiTargetContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_multiTarget

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



    class MultiTargetAllContext(MultiTargetContext):

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

        def ALL(self):
            return self.getToken(BraketPragmasParser.ALL, 0)

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

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

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


    class MultiTargetIdentifiersContext(MultiTargetContext):

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

        def indexedIdentifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.IndexedIdentifierContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.IndexedIdentifierContext,i)

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

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

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

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



    def multiTarget(self):

        localctx = BraketPragmasParser.MultiTargetContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_multiTarget)
        self._la = 0 # Token type
        try:
            self.state = 243
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [116]:
                localctx = BraketPragmasParser.MultiTargetIdentifiersContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 234
                self.indexedIdentifier()
                self.state = 239
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==89:
                    self.state = 235
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 236
                    self.indexedIdentifier()
                    self.state = 241
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [19]:
                localctx = BraketPragmasParser.MultiTargetAllContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 242
                self.match(BraketPragmasParser.ALL)
                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 MultiStateResultTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def multiStateResultTypeName(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiStateResultTypeNameContext,0)


        def multiState(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiStateContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_multiStateResultType

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

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

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




    def multiStateResultType(self):

        localctx = BraketPragmasParser.MultiStateResultTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_multiStateResultType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 245
            self.multiStateResultTypeName()
            self.state = 246
            self.multiState()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MultiStateResultTypeNameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def AMPLITUDE(self):
            return self.getToken(BraketPragmasParser.AMPLITUDE, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_multiStateResultTypeName

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

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

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




    def multiStateResultTypeName(self):

        localctx = BraketPragmasParser.MultiStateResultTypeNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_multiStateResultTypeName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 248
            self.match(BraketPragmasParser.AMPLITUDE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MultiStateContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_multiState

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

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

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




    def multiState(self):

        localctx = BraketPragmasParser.MultiStateContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_multiState)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 250
            self.match(BraketPragmasParser.BitstringLiteral)
            self.state = 255
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==89:
                self.state = 251
                self.match(BraketPragmasParser.COMMA)
                self.state = 252
                self.match(BraketPragmasParser.BitstringLiteral)
                self.state = 257
                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 ObservableResultTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def observableResultTypeName(self):
            return self.getTypedRuleContext(BraketPragmasParser.ObservableResultTypeNameContext,0)


        def observable(self):
            return self.getTypedRuleContext(BraketPragmasParser.ObservableContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_observableResultType

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

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

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




    def observableResultType(self):

        localctx = BraketPragmasParser.ObservableResultTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_observableResultType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 258
            self.observableResultTypeName()
            self.state = 259
            self.observable()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ObservableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def standardObservable(self):
            return self.getTypedRuleContext(BraketPragmasParser.StandardObservableContext,0)


        def tensorProductObservable(self):
            return self.getTypedRuleContext(BraketPragmasParser.TensorProductObservableContext,0)


        def hermitianObservable(self):
            return self.getTypedRuleContext(BraketPragmasParser.HermitianObservableContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_observable

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

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

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




    def observable(self):

        localctx = BraketPragmasParser.ObservableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_observable)
        try:
            self.state = 264
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 261
                self.standardObservable()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 262
                self.tensorProductObservable()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 263
                self.hermitianObservable()
                pass


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


    class StandardObservableContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_standardObservable

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



    class StandardObservableAllContext(StandardObservableContext):

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

        def standardObservableName(self):
            return self.getTypedRuleContext(BraketPragmasParser.StandardObservableNameContext,0)

        def ALL(self):
            return self.getToken(BraketPragmasParser.ALL, 0)

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

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

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


    class StandardObservableIdentifierContext(StandardObservableContext):

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

        def standardObservableName(self):
            return self.getTypedRuleContext(BraketPragmasParser.StandardObservableNameContext,0)

        def LPAREN(self):
            return self.getToken(BraketPragmasParser.LPAREN, 0)
        def indexedIdentifier(self):
            return self.getTypedRuleContext(BraketPragmasParser.IndexedIdentifierContext,0)

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

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

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

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



    def standardObservable(self):

        localctx = BraketPragmasParser.StandardObservableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_standardObservable)
        try:
            self.state = 274
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,9,self._ctx)
            if la_ == 1:
                localctx = BraketPragmasParser.StandardObservableIdentifierContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 266
                self.standardObservableName()
                self.state = 267
                self.match(BraketPragmasParser.LPAREN)
                self.state = 268
                self.indexedIdentifier()
                self.state = 269
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 2:
                localctx = BraketPragmasParser.StandardObservableAllContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 271
                self.standardObservableName()
                self.state = 272
                self.match(BraketPragmasParser.ALL)
                pass


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


    class TensorProductObservableContext(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(BraketPragmasParser.AT, 0)

        def observable(self):
            return self.getTypedRuleContext(BraketPragmasParser.ObservableContext,0)


        def standardObservable(self):
            return self.getTypedRuleContext(BraketPragmasParser.StandardObservableContext,0)


        def hermitianObservable(self):
            return self.getTypedRuleContext(BraketPragmasParser.HermitianObservableContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_tensorProductObservable

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

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

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




    def tensorProductObservable(self):

        localctx = BraketPragmasParser.TensorProductObservableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_tensorProductObservable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 278
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [13, 14, 15, 16, 17]:
                self.state = 276
                self.standardObservable()
                pass
            elif token in [18]:
                self.state = 277
                self.hermitianObservable()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 280
            self.match(BraketPragmasParser.AT)
            self.state = 281
            self.observable()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HermitianObservableContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def HERMITIAN(self):
            return self.getToken(BraketPragmasParser.HERMITIAN, 0)

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

        def twoDimMatrix(self):
            return self.getTypedRuleContext(BraketPragmasParser.TwoDimMatrixContext,0)


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

        def multiTarget(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiTargetContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_hermitianObservable

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

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

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




    def hermitianObservable(self):

        localctx = BraketPragmasParser.HermitianObservableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_hermitianObservable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 283
            self.match(BraketPragmasParser.HERMITIAN)
            self.state = 284
            self.match(BraketPragmasParser.LPAREN)
            self.state = 285
            self.twoDimMatrix()
            self.state = 286
            self.match(BraketPragmasParser.RPAREN)
            self.state = 287
            self.multiTarget()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ObservableResultTypeNameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def EXPECTATION(self):
            return self.getToken(BraketPragmasParser.EXPECTATION, 0)

        def VARIANCE(self):
            return self.getToken(BraketPragmasParser.VARIANCE, 0)

        def SAMPLE(self):
            return self.getToken(BraketPragmasParser.SAMPLE, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_observableResultTypeName

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

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

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




    def observableResultTypeName(self):

        localctx = BraketPragmasParser.ObservableResultTypeNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_observableResultTypeName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 289
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 7168) != 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 StandardObservableNameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def X(self):
            return self.getToken(BraketPragmasParser.X, 0)

        def Y(self):
            return self.getToken(BraketPragmasParser.Y, 0)

        def Z(self):
            return self.getToken(BraketPragmasParser.Z, 0)

        def I(self):
            return self.getToken(BraketPragmasParser.I, 0)

        def H(self):
            return self.getToken(BraketPragmasParser.H, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_standardObservableName

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

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

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




    def standardObservableName(self):

        localctx = BraketPragmasParser.StandardObservableNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_standardObservableName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 291
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 253952) != 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 ComplexNumberContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_complexNumber

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



    class ComplexOneValueContext(ComplexNumberContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ComplexNumberContext
            super().__init__(parser)
            self.neg = None # Token
            self.value = None # Token
            self.copyFrom(ctx)

        def DecimalIntegerLiteral(self):
            return self.getToken(BraketPragmasParser.DecimalIntegerLiteral, 0)
        def FloatLiteral(self):
            return self.getToken(BraketPragmasParser.FloatLiteral, 0)
        def ImaginaryLiteral(self):
            return self.getToken(BraketPragmasParser.ImaginaryLiteral, 0)
        def MINUS(self):
            return self.getToken(BraketPragmasParser.MINUS, 0)

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

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

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


    class ComplexTwoValuesContext(ComplexNumberContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ComplexNumberContext
            super().__init__(parser)
            self.neg = None # Token
            self.real = None # Token
            self.sign = None # Token
            self.imagNeg = None # Token
            self.imag = None # Token
            self.copyFrom(ctx)

        def ImaginaryLiteral(self):
            return self.getToken(BraketPragmasParser.ImaginaryLiteral, 0)
        def DecimalIntegerLiteral(self):
            return self.getToken(BraketPragmasParser.DecimalIntegerLiteral, 0)
        def FloatLiteral(self):
            return self.getToken(BraketPragmasParser.FloatLiteral, 0)
        def PLUS(self):
            return self.getToken(BraketPragmasParser.PLUS, 0)
        def MINUS(self, i:int=None):
            if i is None:
                return self.getTokens(BraketPragmasParser.MINUS)
            else:
                return self.getToken(BraketPragmasParser.MINUS, i)

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

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

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



    def complexNumber(self):

        localctx = BraketPragmasParser.ComplexNumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_complexNumber)
        self._la = 0 # Token type
        try:
            self.state = 306
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                localctx = BraketPragmasParser.ComplexOneValueContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 294
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==94:
                    self.state = 293
                    localctx.neg = self.match(BraketPragmasParser.MINUS)


                self.state = 296
                localctx.value = self._input.LT(1)
                _la = self._input.LA(1)
                if not(((((_la - 111)) & ~0x3f) == 0 and ((1 << (_la - 111)) & 137) != 0)):
                    localctx.value = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass

            elif la_ == 2:
                localctx = BraketPragmasParser.ComplexTwoValuesContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 298
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==94:
                    self.state = 297
                    localctx.neg = self.match(BraketPragmasParser.MINUS)


                self.state = 300
                localctx.real = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==114 or _la==118):
                    localctx.real = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 301
                localctx.sign = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==92 or _la==94):
                    localctx.sign = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 303
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==94:
                    self.state = 302
                    localctx.imagNeg = self.match(BraketPragmasParser.MINUS)


                self.state = 305
                localctx.imag = self.match(BraketPragmasParser.ImaginaryLiteral)
                pass


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


    class BraketNoisePragmaContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BRAKET(self):
            return self.getToken(BraketPragmasParser.BRAKET, 0)

        def NOISE(self):
            return self.getToken(BraketPragmasParser.NOISE, 0)

        def noiseInstruction(self):
            return self.getTypedRuleContext(BraketPragmasParser.NoiseInstructionContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_braketNoisePragma

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

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

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




    def braketNoisePragma(self):

        localctx = BraketPragmasParser.BraketNoisePragmaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_braketNoisePragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 308
            self.match(BraketPragmasParser.BRAKET)
            self.state = 309
            self.match(BraketPragmasParser.NOISE)
            self.state = 310
            self.noiseInstruction()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NoiseInstructionContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_noiseInstruction

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



    class NoiseContext(NoiseInstructionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.NoiseInstructionContext
            super().__init__(parser)
            self.target = None # MultiTargetContext
            self.copyFrom(ctx)

        def noiseInstructionName(self):
            return self.getTypedRuleContext(BraketPragmasParser.NoiseInstructionNameContext,0)

        def LPAREN(self):
            return self.getToken(BraketPragmasParser.LPAREN, 0)
        def probabilities(self):
            return self.getTypedRuleContext(BraketPragmasParser.ProbabilitiesContext,0)

        def RPAREN(self):
            return self.getToken(BraketPragmasParser.RPAREN, 0)
        def multiTarget(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiTargetContext,0)


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

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

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


    class KrausContext(NoiseInstructionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.NoiseInstructionContext
            super().__init__(parser)
            self.target = None # MultiTargetContext
            self.copyFrom(ctx)

        def KRAUS(self):
            return self.getToken(BraketPragmasParser.KRAUS, 0)
        def LPAREN(self):
            return self.getToken(BraketPragmasParser.LPAREN, 0)
        def matrices(self):
            return self.getTypedRuleContext(BraketPragmasParser.MatricesContext,0)

        def RPAREN(self):
            return self.getToken(BraketPragmasParser.RPAREN, 0)
        def multiTarget(self):
            return self.getTypedRuleContext(BraketPragmasParser.MultiTargetContext,0)


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

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

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



    def noiseInstruction(self):

        localctx = BraketPragmasParser.NoiseInstructionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_noiseInstruction)
        try:
            self.state = 324
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [21, 22, 23, 24, 25, 26, 27, 28, 29]:
                localctx = BraketPragmasParser.NoiseContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 312
                self.noiseInstructionName()
                self.state = 313
                self.match(BraketPragmasParser.LPAREN)
                self.state = 314
                self.probabilities()
                self.state = 315
                self.match(BraketPragmasParser.RPAREN)
                self.state = 316
                localctx.target = self.multiTarget()
                pass
            elif token in [30]:
                localctx = BraketPragmasParser.KrausContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 318
                self.match(BraketPragmasParser.KRAUS)
                self.state = 319
                self.match(BraketPragmasParser.LPAREN)
                self.state = 320
                self.matrices()
                self.state = 321
                self.match(BraketPragmasParser.RPAREN)
                self.state = 322
                localctx.target = self.multiTarget()
                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 MatricesContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def twoDimMatrix(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.TwoDimMatrixContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.TwoDimMatrixContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_matrices

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

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

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




    def matrices(self):

        localctx = BraketPragmasParser.MatricesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_matrices)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 326
            self.twoDimMatrix()
            self.state = 331
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==89:
                self.state = 327
                self.match(BraketPragmasParser.COMMA)
                self.state = 328
                self.twoDimMatrix()
                self.state = 333
                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 ProbabilitiesContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_probabilities

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

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

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




    def probabilities(self):

        localctx = BraketPragmasParser.ProbabilitiesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_probabilities)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 334
            self.match(BraketPragmasParser.FloatLiteral)
            self.state = 339
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==89:
                self.state = 335
                self.match(BraketPragmasParser.COMMA)
                self.state = 336
                self.match(BraketPragmasParser.FloatLiteral)
                self.state = 341
                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 NoiseInstructionNameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BIT_FLIP(self):
            return self.getToken(BraketPragmasParser.BIT_FLIP, 0)

        def PHASE_FLIP(self):
            return self.getToken(BraketPragmasParser.PHASE_FLIP, 0)

        def PAULI_CHANNEL(self):
            return self.getToken(BraketPragmasParser.PAULI_CHANNEL, 0)

        def DEPOLARIZING(self):
            return self.getToken(BraketPragmasParser.DEPOLARIZING, 0)

        def TWO_QUBIT_DEPOLARIZING(self):
            return self.getToken(BraketPragmasParser.TWO_QUBIT_DEPOLARIZING, 0)

        def TWO_QUBIT_DEPHASING(self):
            return self.getToken(BraketPragmasParser.TWO_QUBIT_DEPHASING, 0)

        def AMPLITUDE_DAMPING(self):
            return self.getToken(BraketPragmasParser.AMPLITUDE_DAMPING, 0)

        def GENERALIZED_AMPLITUDE_DAMPING(self):
            return self.getToken(BraketPragmasParser.GENERALIZED_AMPLITUDE_DAMPING, 0)

        def PHASE_DAMPING(self):
            return self.getToken(BraketPragmasParser.PHASE_DAMPING, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_noiseInstructionName

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

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

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




    def noiseInstructionName(self):

        localctx = BraketPragmasParser.NoiseInstructionNameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_noiseInstructionName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 342
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 1071644672) != 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 ProgramContext(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(BraketPragmasParser.EOF, 0)

        def version(self):
            return self.getTypedRuleContext(BraketPragmasParser.VersionContext,0)


        def statement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.StatementContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.StatementContext,i)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_program

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

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

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




    def program(self):

        localctx = BraketPragmasParser.ProgramContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_program)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 345
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==31:
                self.state = 344
                self.version()


            self.state = 350
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -18304673874182144) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 143977750197239295) != 0):
                self.state = 347
                self.statement()
                self.state = 352
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class VersionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def OPENQASM(self):
            return self.getToken(BraketPragmasParser.OPENQASM, 0)

        def VersionSpecifier(self):
            return self.getToken(BraketPragmasParser.VersionSpecifier, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_version

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

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

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




    def version(self):

        localctx = BraketPragmasParser.VersionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_version)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 355
            self.match(BraketPragmasParser.OPENQASM)
            self.state = 356
            self.match(BraketPragmasParser.VersionSpecifier)
            self.state = 357
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def pragma(self):
            return self.getTypedRuleContext(BraketPragmasParser.PragmaContext,0)


        def aliasDeclarationStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.AliasDeclarationStatementContext,0)


        def assignmentStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.AssignmentStatementContext,0)


        def barrierStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.BarrierStatementContext,0)


        def boxStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.BoxStatementContext,0)


        def breakStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.BreakStatementContext,0)


        def calibrationGrammarStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.CalibrationGrammarStatementContext,0)


        def classicalDeclarationStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ClassicalDeclarationStatementContext,0)


        def constDeclarationStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ConstDeclarationStatementContext,0)


        def continueStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ContinueStatementContext,0)


        def defStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.DefStatementContext,0)


        def defcalStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.DefcalStatementContext,0)


        def delayStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.DelayStatementContext,0)


        def endStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.EndStatementContext,0)


        def expressionStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ExpressionStatementContext,0)


        def externStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ExternStatementContext,0)


        def forStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ForStatementContext,0)


        def gateCallStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.GateCallStatementContext,0)


        def gateStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.GateStatementContext,0)


        def ifStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.IfStatementContext,0)


        def includeStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.IncludeStatementContext,0)


        def ioDeclarationStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.IoDeclarationStatementContext,0)


        def measureArrowAssignmentStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.MeasureArrowAssignmentStatementContext,0)


        def oldStyleDeclarationStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.OldStyleDeclarationStatementContext,0)


        def quantumDeclarationStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.QuantumDeclarationStatementContext,0)


        def resetStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ResetStatementContext,0)


        def returnStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.ReturnStatementContext,0)


        def whileStatement(self):
            return self.getTypedRuleContext(BraketPragmasParser.WhileStatementContext,0)


        def annotation(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.AnnotationContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.AnnotationContext,i)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_statement

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

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

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




    def statement(self):

        localctx = BraketPragmasParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_statement)
        self._la = 0 # Token type
        try:
            self.state = 395
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [49]:
                self.enterOuterAlt(localctx, 1)
                self.state = 359
                self.pragma()
                pass
            elif token in [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.enterOuterAlt(localctx, 2)
                self.state = 363
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==50:
                    self.state = 360
                    self.annotation()
                    self.state = 365
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 393
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,21,self._ctx)
                if la_ == 1:
                    self.state = 366
                    self.aliasDeclarationStatement()
                    pass

                elif la_ == 2:
                    self.state = 367
                    self.assignmentStatement()
                    pass

                elif la_ == 3:
                    self.state = 368
                    self.barrierStatement()
                    pass

                elif la_ == 4:
                    self.state = 369
                    self.boxStatement()
                    pass

                elif la_ == 5:
                    self.state = 370
                    self.breakStatement()
                    pass

                elif la_ == 6:
                    self.state = 371
                    self.calibrationGrammarStatement()
                    pass

                elif la_ == 7:
                    self.state = 372
                    self.classicalDeclarationStatement()
                    pass

                elif la_ == 8:
                    self.state = 373
                    self.constDeclarationStatement()
                    pass

                elif la_ == 9:
                    self.state = 374
                    self.continueStatement()
                    pass

                elif la_ == 10:
                    self.state = 375
                    self.defStatement()
                    pass

                elif la_ == 11:
                    self.state = 376
                    self.defcalStatement()
                    pass

                elif la_ == 12:
                    self.state = 377
                    self.delayStatement()
                    pass

                elif la_ == 13:
                    self.state = 378
                    self.endStatement()
                    pass

                elif la_ == 14:
                    self.state = 379
                    self.expressionStatement()
                    pass

                elif la_ == 15:
                    self.state = 380
                    self.externStatement()
                    pass

                elif la_ == 16:
                    self.state = 381
                    self.forStatement()
                    pass

                elif la_ == 17:
                    self.state = 382
                    self.gateCallStatement()
                    pass

                elif la_ == 18:
                    self.state = 383
                    self.gateStatement()
                    pass

                elif la_ == 19:
                    self.state = 384
                    self.ifStatement()
                    pass

                elif la_ == 20:
                    self.state = 385
                    self.includeStatement()
                    pass

                elif la_ == 21:
                    self.state = 386
                    self.ioDeclarationStatement()
                    pass

                elif la_ == 22:
                    self.state = 387
                    self.measureArrowAssignmentStatement()
                    pass

                elif la_ == 23:
                    self.state = 388
                    self.oldStyleDeclarationStatement()
                    pass

                elif la_ == 24:
                    self.state = 389
                    self.quantumDeclarationStatement()
                    pass

                elif la_ == 25:
                    self.state = 390
                    self.resetStatement()
                    pass

                elif la_ == 26:
                    self.state = 391
                    self.returnStatement()
                    pass

                elif la_ == 27:
                    self.state = 392
                    self.whileStatement()
                    pass


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

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

        def AnnotationKeyword(self):
            return self.getToken(BraketPragmasParser.AnnotationKeyword, 0)

        def RemainingLineContent(self):
            return self.getToken(BraketPragmasParser.RemainingLineContent, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_annotation

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

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

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




    def annotation(self):

        localctx = BraketPragmasParser.AnnotationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_annotation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 397
            self.match(BraketPragmasParser.AnnotationKeyword)
            self.state = 399
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==130:
                self.state = 398
                self.match(BraketPragmasParser.RemainingLineContent)


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


    class ScopeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LBRACE(self):
            return self.getToken(BraketPragmasParser.LBRACE, 0)

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

        def statement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.StatementContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.StatementContext,i)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_scope

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

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

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




    def scope(self):

        localctx = BraketPragmasParser.ScopeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_scope)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 401
            self.match(BraketPragmasParser.LBRACE)
            self.state = 405
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -18304673874182144) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 143977750197239295) != 0):
                self.state = 402
                self.statement()
                self.state = 407
                self._errHandler.sync(self)
                _la = self._input.LA(1)

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


    class PragmaContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def PRAGMA(self):
            return self.getToken(BraketPragmasParser.PRAGMA, 0)

        def RemainingLineContent(self):
            return self.getToken(BraketPragmasParser.RemainingLineContent, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_pragma

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

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

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




    def pragma(self):

        localctx = BraketPragmasParser.PragmaContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_pragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 410
            self.match(BraketPragmasParser.PRAGMA)
            self.state = 411
            self.match(BraketPragmasParser.RemainingLineContent)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StatementOrScopeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def statement(self):
            return self.getTypedRuleContext(BraketPragmasParser.StatementContext,0)


        def scope(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScopeContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_statementOrScope

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

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

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




    def statementOrScope(self):

        localctx = BraketPragmasParser.StatementOrScopeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_statementOrScope)
        try:
            self.state = 415
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.enterOuterAlt(localctx, 1)
                self.state = 413
                self.statement()
                pass
            elif token in [82]:
                self.enterOuterAlt(localctx, 2)
                self.state = 414
                self.scope()
                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 CalibrationGrammarStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEFCALGRAMMAR(self):
            return self.getToken(BraketPragmasParser.DEFCALGRAMMAR, 0)

        def StringLiteral(self):
            return self.getToken(BraketPragmasParser.StringLiteral, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_calibrationGrammarStatement

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

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

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




    def calibrationGrammarStatement(self):

        localctx = BraketPragmasParser.CalibrationGrammarStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_calibrationGrammarStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 417
            self.match(BraketPragmasParser.DEFCALGRAMMAR)
            self.state = 418
            self.match(BraketPragmasParser.StringLiteral)
            self.state = 419
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IncludeStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def INCLUDE(self):
            return self.getToken(BraketPragmasParser.INCLUDE, 0)

        def StringLiteral(self):
            return self.getToken(BraketPragmasParser.StringLiteral, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_includeStatement

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

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

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




    def includeStatement(self):

        localctx = BraketPragmasParser.IncludeStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_includeStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 421
            self.match(BraketPragmasParser.INCLUDE)
            self.state = 422
            self.match(BraketPragmasParser.StringLiteral)
            self.state = 423
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BreakStatementContext(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(BraketPragmasParser.BREAK, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_breakStatement

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

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

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




    def breakStatement(self):

        localctx = BraketPragmasParser.BreakStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_breakStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 425
            self.match(BraketPragmasParser.BREAK)
            self.state = 426
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ContinueStatementContext(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(BraketPragmasParser.CONTINUE, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_continueStatement

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

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

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




    def continueStatement(self):

        localctx = BraketPragmasParser.ContinueStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_continueStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 428
            self.match(BraketPragmasParser.CONTINUE)
            self.state = 429
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EndStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def END(self):
            return self.getToken(BraketPragmasParser.END, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_endStatement

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

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

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




    def endStatement(self):

        localctx = BraketPragmasParser.EndStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_endStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 431
            self.match(BraketPragmasParser.END)
            self.state = 432
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ForStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


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

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

        def statementOrScope(self):
            return self.getTypedRuleContext(BraketPragmasParser.StatementOrScopeContext,0)


        def setExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.SetExpressionContext,0)


        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

        def rangeExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.RangeExpressionContext,0)


        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_forStatement

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

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

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




    def forStatement(self):

        localctx = BraketPragmasParser.ForStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_forStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 434
            self.match(BraketPragmasParser.FOR)
            self.state = 435
            self.scalarType()
            self.state = 436
            self.match(BraketPragmasParser.Identifier)
            self.state = 437
            self.match(BraketPragmasParser.IN)
            self.state = 444
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [82]:
                self.state = 438
                self.setExpression()
                pass
            elif token in [80]:
                self.state = 439
                self.match(BraketPragmasParser.LBRACKET)
                self.state = 440
                self.rangeExpression()
                self.state = 441
                self.match(BraketPragmasParser.RBRACKET)
                pass
            elif token in [116]:
                self.state = 443
                self.match(BraketPragmasParser.Identifier)
                pass
            else:
                raise NoViableAltException(self)

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


    class IfStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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


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

        def statementOrScope(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.StatementOrScopeContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.StatementOrScopeContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_ifStatement

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

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

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




    def ifStatement(self):

        localctx = BraketPragmasParser.IfStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 82, self.RULE_ifStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 448
            self.match(BraketPragmasParser.IF)
            self.state = 449
            self.match(BraketPragmasParser.LPAREN)
            self.state = 450
            self.expression(0)
            self.state = 451
            self.match(BraketPragmasParser.RPAREN)
            self.state = 452
            localctx.if_body = self.statementOrScope()
            self.state = 455
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
            if la_ == 1:
                self.state = 453
                self.match(BraketPragmasParser.ELSE)
                self.state = 454
                localctx.else_body = self.statementOrScope()


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


    class ReturnStatementContext(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(BraketPragmasParser.RETURN, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

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


        def measureExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.MeasureExpressionContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_returnStatement

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

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

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




    def returnStatement(self):

        localctx = BraketPragmasParser.ReturnStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_returnStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 457
            self.match(BraketPragmasParser.RETURN)
            self.state = 460
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 74, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.state = 458
                self.expression(0)
                pass
            elif token in [77]:
                self.state = 459
                self.measureExpression()
                pass
            elif token in [87]:
                pass
            else:
                pass
            self.state = 462
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WhileStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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


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

        def statementOrScope(self):
            return self.getTypedRuleContext(BraketPragmasParser.StatementOrScopeContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_whileStatement

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

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

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




    def whileStatement(self):

        localctx = BraketPragmasParser.WhileStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_whileStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 464
            self.match(BraketPragmasParser.WHILE)
            self.state = 465
            self.match(BraketPragmasParser.LPAREN)
            self.state = 466
            self.expression(0)
            self.state = 467
            self.match(BraketPragmasParser.RPAREN)
            self.state = 468
            localctx.body = self.statementOrScope()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BarrierStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BARRIER(self):
            return self.getToken(BraketPragmasParser.BARRIER, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def gateOperandList(self):
            return self.getTypedRuleContext(BraketPragmasParser.GateOperandListContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_barrierStatement

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

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

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




    def barrierStatement(self):

        localctx = BraketPragmasParser.BarrierStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_barrierStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 470
            self.match(BraketPragmasParser.BARRIER)
            self.state = 472
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==116 or _la==117:
                self.state = 471
                self.gateOperandList()


            self.state = 474
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BoxStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BOX(self):
            return self.getToken(BraketPragmasParser.BOX, 0)

        def scope(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScopeContext,0)


        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_boxStatement

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

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

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




    def boxStatement(self):

        localctx = BraketPragmasParser.BoxStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_boxStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 476
            self.match(BraketPragmasParser.BOX)
            self.state = 478
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==80:
                self.state = 477
                self.designator()


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


    class DelayStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DELAY(self):
            return self.getToken(BraketPragmasParser.DELAY, 0)

        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def gateOperandList(self):
            return self.getTypedRuleContext(BraketPragmasParser.GateOperandListContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_delayStatement

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

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

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




    def delayStatement(self):

        localctx = BraketPragmasParser.DelayStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_delayStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 482
            self.match(BraketPragmasParser.DELAY)
            self.state = 483
            self.designator()
            self.state = 485
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==116 or _la==117:
                self.state = 484
                self.gateOperandList()


            self.state = 487
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GateCallStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def gateOperandList(self):
            return self.getTypedRuleContext(BraketPragmasParser.GateOperandListContext,0)


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def gateModifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.GateModifierContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.GateModifierContext,i)


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

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

        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


        def expressionList(self):
            return self.getTypedRuleContext(BraketPragmasParser.ExpressionListContext,0)


        def GPHASE(self):
            return self.getToken(BraketPragmasParser.GPHASE, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_gateCallStatement

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

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

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




    def gateCallStatement(self):

        localctx = BraketPragmasParser.GateCallStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_gateCallStatement)
        self._la = 0 # Token type
        try:
            self.state = 530
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,41,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 492
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & 15) != 0):
                    self.state = 489
                    self.gateModifier()
                    self.state = 494
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 495
                self.match(BraketPragmasParser.Identifier)
                self.state = 501
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==84:
                    self.state = 496
                    self.match(BraketPragmasParser.LPAREN)
                    self.state = 498
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if ((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & 9214576012621317119) != 0):
                        self.state = 497
                        self.expressionList()


                    self.state = 500
                    self.match(BraketPragmasParser.RPAREN)


                self.state = 504
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 503
                    self.designator()


                self.state = 506
                self.gateOperandList()
                self.state = 507
                self.match(BraketPragmasParser.SEMICOLON)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 512
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & 15) != 0):
                    self.state = 509
                    self.gateModifier()
                    self.state = 514
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 515
                self.match(BraketPragmasParser.GPHASE)
                self.state = 521
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==84:
                    self.state = 516
                    self.match(BraketPragmasParser.LPAREN)
                    self.state = 518
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if ((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & 9214576012621317119) != 0):
                        self.state = 517
                        self.expressionList()


                    self.state = 520
                    self.match(BraketPragmasParser.RPAREN)


                self.state = 524
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 523
                    self.designator()


                self.state = 527
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==116 or _la==117:
                    self.state = 526
                    self.gateOperandList()


                self.state = 529
                self.match(BraketPragmasParser.SEMICOLON)
                pass


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


    class MeasureArrowAssignmentStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def measureExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.MeasureExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

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

        def indexedIdentifier(self):
            return self.getTypedRuleContext(BraketPragmasParser.IndexedIdentifierContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_measureArrowAssignmentStatement

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

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

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




    def measureArrowAssignmentStatement(self):

        localctx = BraketPragmasParser.MeasureArrowAssignmentStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_measureArrowAssignmentStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 532
            self.measureExpression()
            self.state = 535
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==91:
                self.state = 533
                self.match(BraketPragmasParser.ARROW)
                self.state = 534
                self.indexedIdentifier()


            self.state = 537
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ResetStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def RESET(self):
            return self.getToken(BraketPragmasParser.RESET, 0)

        def gateOperand(self):
            return self.getTypedRuleContext(BraketPragmasParser.GateOperandContext,0)


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_resetStatement

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

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

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




    def resetStatement(self):

        localctx = BraketPragmasParser.ResetStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_resetStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 539
            self.match(BraketPragmasParser.RESET)
            self.state = 540
            self.gateOperand()
            self.state = 541
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AliasDeclarationStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LET(self):
            return self.getToken(BraketPragmasParser.LET, 0)

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

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

        def aliasExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.AliasExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_aliasDeclarationStatement

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

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

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




    def aliasDeclarationStatement(self):

        localctx = BraketPragmasParser.AliasDeclarationStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_aliasDeclarationStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 543
            self.match(BraketPragmasParser.LET)
            self.state = 544
            self.match(BraketPragmasParser.Identifier)
            self.state = 545
            self.match(BraketPragmasParser.EQUALS)
            self.state = 546
            self.aliasExpression()
            self.state = 547
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ClassicalDeclarationStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


        def arrayType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArrayTypeContext,0)


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

        def declarationExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.DeclarationExpressionContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_classicalDeclarationStatement

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

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

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




    def classicalDeclarationStatement(self):

        localctx = BraketPragmasParser.ClassicalDeclarationStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_classicalDeclarationStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 551
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 66, 67]:
                self.state = 549
                self.scalarType()
                pass
            elif token in [65]:
                self.state = 550
                self.arrayType()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 553
            self.match(BraketPragmasParser.Identifier)
            self.state = 556
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==90:
                self.state = 554
                self.match(BraketPragmasParser.EQUALS)
                self.state = 555
                self.declarationExpression()


            self.state = 558
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ConstDeclarationStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CONST(self):
            return self.getToken(BraketPragmasParser.CONST, 0)

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

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

        def declarationExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.DeclarationExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_constDeclarationStatement

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

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

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




    def constDeclarationStatement(self):

        localctx = BraketPragmasParser.ConstDeclarationStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_constDeclarationStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 560
            self.match(BraketPragmasParser.CONST)
            self.state = 561
            self.scalarType()
            self.state = 562
            self.match(BraketPragmasParser.Identifier)
            self.state = 563
            self.match(BraketPragmasParser.EQUALS)
            self.state = 564
            self.declarationExpression()
            self.state = 565
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IoDeclarationStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def INPUT(self):
            return self.getToken(BraketPragmasParser.INPUT, 0)

        def OUTPUT(self):
            return self.getToken(BraketPragmasParser.OUTPUT, 0)

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


        def arrayType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArrayTypeContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_ioDeclarationStatement

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

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

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




    def ioDeclarationStatement(self):

        localctx = BraketPragmasParser.IoDeclarationStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_ioDeclarationStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 567
            _la = self._input.LA(1)
            if not(_la==51 or _la==52):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 570
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 66, 67]:
                self.state = 568
                self.scalarType()
                pass
            elif token in [65]:
                self.state = 569
                self.arrayType()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 572
            self.match(BraketPragmasParser.Identifier)
            self.state = 573
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OldStyleDeclarationStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def CREG(self):
            return self.getToken(BraketPragmasParser.CREG, 0)

        def QREG(self):
            return self.getToken(BraketPragmasParser.QREG, 0)

        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_oldStyleDeclarationStatement

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

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

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




    def oldStyleDeclarationStatement(self):

        localctx = BraketPragmasParser.OldStyleDeclarationStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_oldStyleDeclarationStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 575
            _la = self._input.LA(1)
            if not(_la==55 or _la==57):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 576
            self.match(BraketPragmasParser.Identifier)
            self.state = 578
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==80:
                self.state = 577
                self.designator()


            self.state = 580
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class QuantumDeclarationStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def qubitType(self):
            return self.getTypedRuleContext(BraketPragmasParser.QubitTypeContext,0)


        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_quantumDeclarationStatement

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

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

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




    def quantumDeclarationStatement(self):

        localctx = BraketPragmasParser.QuantumDeclarationStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_quantumDeclarationStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 582
            self.qubitType()
            self.state = 583
            self.match(BraketPragmasParser.Identifier)
            self.state = 584
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DefStatementContext(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(BraketPragmasParser.DEF, 0)

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

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

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

        def scope(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScopeContext,0)


        def argumentDefinitionList(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArgumentDefinitionListContext,0)


        def returnSignature(self):
            return self.getTypedRuleContext(BraketPragmasParser.ReturnSignatureContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_defStatement

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

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

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




    def defStatement(self):

        localctx = BraketPragmasParser.DefStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_defStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 586
            self.match(BraketPragmasParser.DEF)
            self.state = 587
            self.match(BraketPragmasParser.Identifier)
            self.state = 588
            self.match(BraketPragmasParser.LPAREN)
            self.state = 590
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 53)) & ~0x3f) == 0 and ((1 << (_la - 53)) & 28671) != 0):
                self.state = 589
                self.argumentDefinitionList()


            self.state = 592
            self.match(BraketPragmasParser.RPAREN)
            self.state = 594
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==91:
                self.state = 593
                self.returnSignature()


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


    class ExternStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def EXTERN(self):
            return self.getToken(BraketPragmasParser.EXTERN, 0)

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

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

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

        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def externArgumentList(self):
            return self.getTypedRuleContext(BraketPragmasParser.ExternArgumentListContext,0)


        def returnSignature(self):
            return self.getTypedRuleContext(BraketPragmasParser.ReturnSignatureContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_externStatement

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

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

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




    def externStatement(self):

        localctx = BraketPragmasParser.ExternStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_externStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 598
            self.match(BraketPragmasParser.EXTERN)
            self.state = 599
            self.match(BraketPragmasParser.Identifier)
            self.state = 600
            self.match(BraketPragmasParser.LPAREN)
            self.state = 602
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 53)) & ~0x3f) == 0 and ((1 << (_la - 53)) & 28659) != 0):
                self.state = 601
                self.externArgumentList()


            self.state = 604
            self.match(BraketPragmasParser.RPAREN)
            self.state = 606
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==91:
                self.state = 605
                self.returnSignature()


            self.state = 608
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GateStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def GATE(self):
            return self.getToken(BraketPragmasParser.GATE, 0)

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def scope(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScopeContext,0)


        def identifierList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.IdentifierListContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.IdentifierListContext,i)


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

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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_gateStatement

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

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

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




    def gateStatement(self):

        localctx = BraketPragmasParser.GateStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_gateStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 610
            self.match(BraketPragmasParser.GATE)
            self.state = 611
            self.match(BraketPragmasParser.Identifier)
            self.state = 617
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==84:
                self.state = 612
                self.match(BraketPragmasParser.LPAREN)
                self.state = 614
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==116:
                    self.state = 613
                    localctx.params = self.identifierList()


                self.state = 616
                self.match(BraketPragmasParser.RPAREN)


            self.state = 619
            localctx.qubits = self.identifierList()
            self.state = 620
            self.scope()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AssignmentStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def indexedIdentifier(self):
            return self.getTypedRuleContext(BraketPragmasParser.IndexedIdentifierContext,0)


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

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

        def CompoundAssignmentOperator(self):
            return self.getToken(BraketPragmasParser.CompoundAssignmentOperator, 0)

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


        def measureExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.MeasureExpressionContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_assignmentStatement

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

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

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




    def assignmentStatement(self):

        localctx = BraketPragmasParser.AssignmentStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_assignmentStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 622
            self.indexedIdentifier()
            self.state = 623
            localctx.op = self._input.LT(1)
            _la = self._input.LA(1)
            if not(_la==90 or _la==107):
                localctx.op = self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 626
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 74, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.state = 624
                self.expression(0)
                pass
            elif token in [77]:
                self.state = 625
                self.measureExpression()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 628
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


        def SEMICOLON(self):
            return self.getToken(BraketPragmasParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_expressionStatement

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

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

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




    def expressionStatement(self):

        localctx = BraketPragmasParser.ExpressionStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_expressionStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 630
            self.expression(0)
            self.state = 631
            self.match(BraketPragmasParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DefcalStatementContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DEFCAL(self):
            return self.getToken(BraketPragmasParser.DEFCAL, 0)

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def defcalArgumentList(self):
            return self.getTypedRuleContext(BraketPragmasParser.DefcalArgumentListContext,0)


        def LBRACE(self):
            return self.getToken(BraketPragmasParser.LBRACE, 0)

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

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

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

        def returnSignature(self):
            return self.getTypedRuleContext(BraketPragmasParser.ReturnSignatureContext,0)


        def argumentDefinitionList(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArgumentDefinitionListContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_defcalStatement

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

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

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




    def defcalStatement(self):

        localctx = BraketPragmasParser.DefcalStatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 122, self.RULE_defcalStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 633
            self.match(BraketPragmasParser.DEFCAL)
            self.state = 634
            self.match(BraketPragmasParser.Identifier)
            self.state = 640
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==84:
                self.state = 635
                self.match(BraketPragmasParser.LPAREN)
                self.state = 637
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((((_la - 53)) & ~0x3f) == 0 and ((1 << (_la - 53)) & 28671) != 0):
                    self.state = 636
                    self.argumentDefinitionList()


                self.state = 639
                self.match(BraketPragmasParser.RPAREN)


            self.state = 642
            self.defcalArgumentList()
            self.state = 644
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==91:
                self.state = 643
                self.returnSignature()


            self.state = 646
            self.match(BraketPragmasParser.LBRACE)
            self.state = 650
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,57,self._ctx)
            while _alt!=1 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1+1:
                    self.state = 647
                    self.matchWildcard() 
                self.state = 652
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,57,self._ctx)

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


    class ExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_expression

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


    class BitwiseXorExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

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

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

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

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


    class AdditiveExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def PLUS(self):
            return self.getToken(BraketPragmasParser.PLUS, 0)
        def MINUS(self):
            return self.getToken(BraketPragmasParser.MINUS, 0)

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

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

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


    class DurationofExpressionContext(ExpressionContext):

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

        def DURATIONOF(self):
            return self.getToken(BraketPragmasParser.DURATIONOF, 0)
        def LPAREN(self):
            return self.getToken(BraketPragmasParser.LPAREN, 0)
        def scope(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScopeContext,0)

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

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

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

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


    class ParenthesisExpressionContext(ExpressionContext):

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

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

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

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

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

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


    class ComparisonExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def ComparisonOperator(self):
            return self.getToken(BraketPragmasParser.ComparisonOperator, 0)

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

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

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


    class MultiplicativeExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def ASTERISK(self):
            return self.getToken(BraketPragmasParser.ASTERISK, 0)
        def SLASH(self):
            return self.getToken(BraketPragmasParser.SLASH, 0)
        def PERCENT(self):
            return self.getToken(BraketPragmasParser.PERCENT, 0)

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

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

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


    class LogicalOrExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def DOUBLE_PIPE(self):
            return self.getToken(BraketPragmasParser.DOUBLE_PIPE, 0)

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

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

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


    class CastExpressionContext(ExpressionContext):

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

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

        def RPAREN(self):
            return self.getToken(BraketPragmasParser.RPAREN, 0)
        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)

        def arrayType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArrayTypeContext,0)


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

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

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


    class PowerExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def DOUBLE_ASTERISK(self):
            return self.getToken(BraketPragmasParser.DOUBLE_ASTERISK, 0)

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

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

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


    class BitwiseOrExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def PIPE(self):
            return self.getToken(BraketPragmasParser.PIPE, 0)

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

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

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


    class CallExpressionContext(ExpressionContext):

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

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)
        def LPAREN(self):
            return self.getToken(BraketPragmasParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(BraketPragmasParser.RPAREN, 0)
        def expressionList(self):
            return self.getTypedRuleContext(BraketPragmasParser.ExpressionListContext,0)


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

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

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


    class BitshiftExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def BitshiftOperator(self):
            return self.getToken(BraketPragmasParser.BitshiftOperator, 0)

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

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

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


    class BitwiseAndExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def AMPERSAND(self):
            return self.getToken(BraketPragmasParser.AMPERSAND, 0)

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

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

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


    class EqualityExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def EqualityOperator(self):
            return self.getToken(BraketPragmasParser.EqualityOperator, 0)

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

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

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


    class LogicalAndExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def DOUBLE_AMPERSAND(self):
            return self.getToken(BraketPragmasParser.DOUBLE_AMPERSAND, 0)

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

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

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


    class IndexExpressionContext(ExpressionContext):

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

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

        def indexOperator(self):
            return self.getTypedRuleContext(BraketPragmasParser.IndexOperatorContext,0)


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

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

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


    class UnaryExpressionContext(ExpressionContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a BraketPragmasParser.ExpressionContext
            super().__init__(parser)
            self.op = None # Token
            self.copyFrom(ctx)

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

        def TILDE(self):
            return self.getToken(BraketPragmasParser.TILDE, 0)
        def EXCLAMATION_POINT(self):
            return self.getToken(BraketPragmasParser.EXCLAMATION_POINT, 0)
        def MINUS(self):
            return self.getToken(BraketPragmasParser.MINUS, 0)

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

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

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


    class LiteralExpressionContext(ExpressionContext):

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

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)
        def BinaryIntegerLiteral(self):
            return self.getToken(BraketPragmasParser.BinaryIntegerLiteral, 0)
        def OctalIntegerLiteral(self):
            return self.getToken(BraketPragmasParser.OctalIntegerLiteral, 0)
        def DecimalIntegerLiteral(self):
            return self.getToken(BraketPragmasParser.DecimalIntegerLiteral, 0)
        def HexIntegerLiteral(self):
            return self.getToken(BraketPragmasParser.HexIntegerLiteral, 0)
        def FloatLiteral(self):
            return self.getToken(BraketPragmasParser.FloatLiteral, 0)
        def ImaginaryLiteral(self):
            return self.getToken(BraketPragmasParser.ImaginaryLiteral, 0)
        def BooleanLiteral(self):
            return self.getToken(BraketPragmasParser.BooleanLiteral, 0)
        def BitstringLiteral(self):
            return self.getToken(BraketPragmasParser.BitstringLiteral, 0)
        def TimingLiteral(self):
            return self.getToken(BraketPragmasParser.TimingLiteral, 0)
        def HardwareQubit(self):
            return self.getToken(BraketPragmasParser.HardwareQubit, 0)

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

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

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



    def expression(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = BraketPragmasParser.ExpressionContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 124
        self.enterRecursionRule(localctx, 124, self.RULE_expression, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 682
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,60,self._ctx)
            if la_ == 1:
                localctx = BraketPragmasParser.ParenthesisExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 656
                self.match(BraketPragmasParser.LPAREN)
                self.state = 657
                self.expression(0)
                self.state = 658
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 2:
                localctx = BraketPragmasParser.UnaryExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 660
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(((((_la - 94)) & ~0x3f) == 0 and ((1 << (_la - 94)) & 3073) != 0)):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 661
                self.expression(15)
                pass

            elif la_ == 3:
                localctx = BraketPragmasParser.CastExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 664
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [58, 59, 60, 61, 62, 63, 64, 66, 67]:
                    self.state = 662
                    self.scalarType()
                    pass
                elif token in [65]:
                    self.state = 663
                    self.arrayType()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 666
                self.match(BraketPragmasParser.LPAREN)
                self.state = 667
                self.expression(0)
                self.state = 668
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 4:
                localctx = BraketPragmasParser.DurationofExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 670
                self.match(BraketPragmasParser.DURATIONOF)
                self.state = 671
                self.match(BraketPragmasParser.LPAREN)
                self.state = 672
                self.scope()
                self.state = 673
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 5:
                localctx = BraketPragmasParser.CallExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 675
                self.match(BraketPragmasParser.Identifier)
                self.state = 676
                self.match(BraketPragmasParser.LPAREN)
                self.state = 678
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & 9214576012621317119) != 0):
                    self.state = 677
                    self.expressionList()


                self.state = 680
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 6:
                localctx = BraketPragmasParser.LiteralExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 681
                _la = self._input.LA(1)
                if not(((((_la - 79)) & ~0x3f) == 0 and ((1 << (_la - 79)) & 4393751543809) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 721
            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:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 719
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,61,self._ctx)
                    if la_ == 1:
                        localctx = BraketPragmasParser.PowerExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 684
                        if not self.precpred(self._ctx, 16):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 16)")
                        self.state = 685
                        localctx.op = self.match(BraketPragmasParser.DOUBLE_ASTERISK)
                        self.state = 686
                        self.expression(16)
                        pass

                    elif la_ == 2:
                        localctx = BraketPragmasParser.MultiplicativeExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 687
                        if not self.precpred(self._ctx, 14):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 14)")
                        self.state = 688
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(((((_la - 95)) & ~0x3f) == 0 and ((1 << (_la - 95)) & 13) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 689
                        self.expression(15)
                        pass

                    elif la_ == 3:
                        localctx = BraketPragmasParser.AdditiveExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 690
                        if not self.precpred(self._ctx, 13):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 13)")
                        self.state = 691
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(_la==92 or _la==94):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 692
                        self.expression(14)
                        pass

                    elif la_ == 4:
                        localctx = BraketPragmasParser.BitshiftExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 693
                        if not self.precpred(self._ctx, 12):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 12)")
                        self.state = 694
                        localctx.op = self.match(BraketPragmasParser.BitshiftOperator)
                        self.state = 695
                        self.expression(13)
                        pass

                    elif la_ == 5:
                        localctx = BraketPragmasParser.ComparisonExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 696
                        if not self.precpred(self._ctx, 11):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 11)")
                        self.state = 697
                        localctx.op = self.match(BraketPragmasParser.ComparisonOperator)
                        self.state = 698
                        self.expression(12)
                        pass

                    elif la_ == 6:
                        localctx = BraketPragmasParser.EqualityExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 699
                        if not self.precpred(self._ctx, 10):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 10)")
                        self.state = 700
                        localctx.op = self.match(BraketPragmasParser.EqualityOperator)
                        self.state = 701
                        self.expression(11)
                        pass

                    elif la_ == 7:
                        localctx = BraketPragmasParser.BitwiseAndExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 702
                        if not self.precpred(self._ctx, 9):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 9)")
                        self.state = 703
                        localctx.op = self.match(BraketPragmasParser.AMPERSAND)
                        self.state = 704
                        self.expression(10)
                        pass

                    elif la_ == 8:
                        localctx = BraketPragmasParser.BitwiseXorExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 705
                        if not self.precpred(self._ctx, 8):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 8)")
                        self.state = 706
                        localctx.op = self.match(BraketPragmasParser.CARET)
                        self.state = 707
                        self.expression(9)
                        pass

                    elif la_ == 9:
                        localctx = BraketPragmasParser.BitwiseOrExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 708
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 709
                        localctx.op = self.match(BraketPragmasParser.PIPE)
                        self.state = 710
                        self.expression(8)
                        pass

                    elif la_ == 10:
                        localctx = BraketPragmasParser.LogicalAndExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 711
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 712
                        localctx.op = self.match(BraketPragmasParser.DOUBLE_AMPERSAND)
                        self.state = 713
                        self.expression(7)
                        pass

                    elif la_ == 11:
                        localctx = BraketPragmasParser.LogicalOrExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 714
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 715
                        localctx.op = self.match(BraketPragmasParser.DOUBLE_PIPE)
                        self.state = 716
                        self.expression(6)
                        pass

                    elif la_ == 12:
                        localctx = BraketPragmasParser.IndexExpressionContext(self, BraketPragmasParser.ExpressionContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_expression)
                        self.state = 717
                        if not self.precpred(self._ctx, 17):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 17)")
                        self.state = 718
                        self.indexOperator()
                        pass

             
                self.state = 723
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,62,self._ctx)

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


    class AliasExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_aliasExpression

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

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

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




    def aliasExpression(self):

        localctx = BraketPragmasParser.AliasExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_aliasExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 724
            self.expression(0)
            self.state = 729
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==93:
                self.state = 725
                self.match(BraketPragmasParser.DOUBLE_PLUS)
                self.state = 726
                self.expression(0)
                self.state = 731
                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 DeclarationExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def arrayLiteral(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArrayLiteralContext,0)


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


        def measureExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.MeasureExpressionContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_declarationExpression

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

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

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




    def declarationExpression(self):

        localctx = BraketPragmasParser.DeclarationExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_declarationExpression)
        try:
            self.state = 735
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [82]:
                self.enterOuterAlt(localctx, 1)
                self.state = 732
                self.arrayLiteral()
                pass
            elif token in [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 74, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.enterOuterAlt(localctx, 2)
                self.state = 733
                self.expression(0)
                pass
            elif token in [77]:
                self.enterOuterAlt(localctx, 3)
                self.state = 734
                self.measureExpression()
                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 MeasureExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def MEASURE(self):
            return self.getToken(BraketPragmasParser.MEASURE, 0)

        def gateOperand(self):
            return self.getTypedRuleContext(BraketPragmasParser.GateOperandContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_measureExpression

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

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

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




    def measureExpression(self):

        localctx = BraketPragmasParser.MeasureExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_measureExpression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 737
            self.match(BraketPragmasParser.MEASURE)
            self.state = 738
            self.gateOperand()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RangeExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_rangeExpression

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

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

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




    def rangeExpression(self):

        localctx = BraketPragmasParser.RangeExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_rangeExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 741
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & 9214576012621317119) != 0):
                self.state = 740
                self.expression(0)


            self.state = 743
            self.match(BraketPragmasParser.COLON)
            self.state = 745
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 58)) & ~0x3f) == 0 and ((1 << (_la - 58)) & 9214576012621317119) != 0):
                self.state = 744
                self.expression(0)


            self.state = 749
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==86:
                self.state = 747
                self.match(BraketPragmasParser.COLON)
                self.state = 748
                self.expression(0)


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


    class SetExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LBRACE(self):
            return self.getToken(BraketPragmasParser.LBRACE, 0)

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


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

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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_setExpression

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

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

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




    def setExpression(self):

        localctx = BraketPragmasParser.SetExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_setExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 751
            self.match(BraketPragmasParser.LBRACE)
            self.state = 752
            self.expression(0)
            self.state = 757
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,68,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 753
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 754
                    self.expression(0) 
                self.state = 759
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,68,self._ctx)

            self.state = 761
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 760
                self.match(BraketPragmasParser.COMMA)


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


    class ArrayLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LBRACE(self):
            return self.getToken(BraketPragmasParser.LBRACE, 0)

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

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


        def arrayLiteral(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.ArrayLiteralContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.ArrayLiteralContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_arrayLiteral

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

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

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




    def arrayLiteral(self):

        localctx = BraketPragmasParser.ArrayLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_arrayLiteral)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 765
            self.match(BraketPragmasParser.LBRACE)
            self.state = 768
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 74, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.state = 766
                self.expression(0)
                pass
            elif token in [82]:
                self.state = 767
                self.arrayLiteral()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 777
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,72,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 770
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 773
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 74, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                        self.state = 771
                        self.expression(0)
                        pass
                    elif token in [82]:
                        self.state = 772
                        self.arrayLiteral()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 779
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,72,self._ctx)

            self.state = 781
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 780
                self.match(BraketPragmasParser.COMMA)


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


    class IndexOperatorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

        def setExpression(self):
            return self.getTypedRuleContext(BraketPragmasParser.SetExpressionContext,0)


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


        def rangeExpression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.RangeExpressionContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.RangeExpressionContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_indexOperator

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

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

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




    def indexOperator(self):

        localctx = BraketPragmasParser.IndexOperatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_indexOperator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 785
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 804
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [82]:
                self.state = 786
                self.setExpression()
                pass
            elif token in [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 74, 79, 84, 86, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.state = 789
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,74,self._ctx)
                if la_ == 1:
                    self.state = 787
                    self.expression(0)
                    pass

                elif la_ == 2:
                    self.state = 788
                    self.rangeExpression()
                    pass


                self.state = 798
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,76,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 791
                        self.match(BraketPragmasParser.COMMA)
                        self.state = 794
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,75,self._ctx)
                        if la_ == 1:
                            self.state = 792
                            self.expression(0)
                            pass

                        elif la_ == 2:
                            self.state = 793
                            self.rangeExpression()
                            pass

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

                self.state = 802
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==89:
                    self.state = 801
                    self.match(BraketPragmasParser.COMMA)


                pass
            else:
                raise NoViableAltException(self)

            self.state = 806
            self.match(BraketPragmasParser.RBRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IndexedIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def indexOperator(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.IndexOperatorContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.IndexOperatorContext,i)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_indexedIdentifier

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

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

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




    def indexedIdentifier(self):

        localctx = BraketPragmasParser.IndexedIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_indexedIdentifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 808
            self.match(BraketPragmasParser.Identifier)
            self.state = 812
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==80:
                self.state = 809
                self.indexOperator()
                self.state = 814
                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 ReturnSignatureContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_returnSignature

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

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

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




    def returnSignature(self):

        localctx = BraketPragmasParser.ReturnSignatureContext(self, self._ctx, self.state)
        self.enterRule(localctx, 142, self.RULE_returnSignature)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 815
            self.match(BraketPragmasParser.ARROW)
            self.state = 816
            self.scalarType()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GateModifierContext(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(BraketPragmasParser.AT, 0)

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

        def POW(self):
            return self.getToken(BraketPragmasParser.POW, 0)

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

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


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

        def CTRL(self):
            return self.getToken(BraketPragmasParser.CTRL, 0)

        def NEGCTRL(self):
            return self.getToken(BraketPragmasParser.NEGCTRL, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_gateModifier

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

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

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




    def gateModifier(self):

        localctx = BraketPragmasParser.GateModifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_gateModifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 831
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [69]:
                self.state = 818
                self.match(BraketPragmasParser.INV)
                pass
            elif token in [70]:
                self.state = 819
                self.match(BraketPragmasParser.POW)
                self.state = 820
                self.match(BraketPragmasParser.LPAREN)
                self.state = 821
                self.expression(0)
                self.state = 822
                self.match(BraketPragmasParser.RPAREN)
                pass
            elif token in [71, 72]:
                self.state = 824
                _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 = 829
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==84:
                    self.state = 825
                    self.match(BraketPragmasParser.LPAREN)
                    self.state = 826
                    self.expression(0)
                    self.state = 827
                    self.match(BraketPragmasParser.RPAREN)


                pass
            else:
                raise NoViableAltException(self)

            self.state = 833
            self.match(BraketPragmasParser.AT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ScalarTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BIT(self):
            return self.getToken(BraketPragmasParser.BIT, 0)

        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


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

        def UINT(self):
            return self.getToken(BraketPragmasParser.UINT, 0)

        def FLOAT(self):
            return self.getToken(BraketPragmasParser.FLOAT, 0)

        def ANGLE(self):
            return self.getToken(BraketPragmasParser.ANGLE, 0)

        def BOOL(self):
            return self.getToken(BraketPragmasParser.BOOL, 0)

        def DURATION(self):
            return self.getToken(BraketPragmasParser.DURATION, 0)

        def STRETCH(self):
            return self.getToken(BraketPragmasParser.STRETCH, 0)

        def COMPLEX(self):
            return self.getToken(BraketPragmasParser.COMPLEX, 0)

        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_scalarType

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

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

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




    def scalarType(self):

        localctx = BraketPragmasParser.ScalarTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_scalarType)
        self._la = 0 # Token type
        try:
            self.state = 865
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [59]:
                self.enterOuterAlt(localctx, 1)
                self.state = 835
                self.match(BraketPragmasParser.BIT)
                self.state = 837
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 836
                    self.designator()


                pass
            elif token in [60]:
                self.enterOuterAlt(localctx, 2)
                self.state = 839
                self.match(BraketPragmasParser.INT)
                self.state = 841
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 840
                    self.designator()


                pass
            elif token in [61]:
                self.enterOuterAlt(localctx, 3)
                self.state = 843
                self.match(BraketPragmasParser.UINT)
                self.state = 845
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 844
                    self.designator()


                pass
            elif token in [62]:
                self.enterOuterAlt(localctx, 4)
                self.state = 847
                self.match(BraketPragmasParser.FLOAT)
                self.state = 849
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 848
                    self.designator()


                pass
            elif token in [63]:
                self.enterOuterAlt(localctx, 5)
                self.state = 851
                self.match(BraketPragmasParser.ANGLE)
                self.state = 853
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 852
                    self.designator()


                pass
            elif token in [58]:
                self.enterOuterAlt(localctx, 6)
                self.state = 855
                self.match(BraketPragmasParser.BOOL)
                pass
            elif token in [66]:
                self.enterOuterAlt(localctx, 7)
                self.state = 856
                self.match(BraketPragmasParser.DURATION)
                pass
            elif token in [67]:
                self.enterOuterAlt(localctx, 8)
                self.state = 857
                self.match(BraketPragmasParser.STRETCH)
                pass
            elif token in [64]:
                self.enterOuterAlt(localctx, 9)
                self.state = 858
                self.match(BraketPragmasParser.COMPLEX)
                self.state = 863
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 859
                    self.match(BraketPragmasParser.LBRACKET)
                    self.state = 860
                    self.scalarType()
                    self.state = 861
                    self.match(BraketPragmasParser.RBRACKET)


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

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

        def QUBIT(self):
            return self.getToken(BraketPragmasParser.QUBIT, 0)

        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_qubitType

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

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

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




    def qubitType(self):

        localctx = BraketPragmasParser.QubitTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_qubitType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 867
            self.match(BraketPragmasParser.QUBIT)
            self.state = 869
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==80:
                self.state = 868
                self.designator()


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


    class ArrayTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ARRAY(self):
            return self.getToken(BraketPragmasParser.ARRAY, 0)

        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


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

        def expressionList(self):
            return self.getTypedRuleContext(BraketPragmasParser.ExpressionListContext,0)


        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_arrayType

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

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

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




    def arrayType(self):

        localctx = BraketPragmasParser.ArrayTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_arrayType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 871
            self.match(BraketPragmasParser.ARRAY)
            self.state = 872
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 873
            self.scalarType()
            self.state = 874
            self.match(BraketPragmasParser.COMMA)
            self.state = 875
            self.expressionList()
            self.state = 876
            self.match(BraketPragmasParser.RBRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ArrayReferenceTypeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ARRAY(self):
            return self.getToken(BraketPragmasParser.ARRAY, 0)

        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


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

        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

        def CONST(self):
            return self.getToken(BraketPragmasParser.CONST, 0)

        def MUTABLE(self):
            return self.getToken(BraketPragmasParser.MUTABLE, 0)

        def expressionList(self):
            return self.getTypedRuleContext(BraketPragmasParser.ExpressionListContext,0)


        def DIM(self):
            return self.getToken(BraketPragmasParser.DIM, 0)

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

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


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_arrayReferenceType

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

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

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




    def arrayReferenceType(self):

        localctx = BraketPragmasParser.ArrayReferenceTypeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_arrayReferenceType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 878
            _la = self._input.LA(1)
            if not(_la==53 or _la==54):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 879
            self.match(BraketPragmasParser.ARRAY)
            self.state = 880
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 881
            self.scalarType()
            self.state = 882
            self.match(BraketPragmasParser.COMMA)
            self.state = 887
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 74, 79, 84, 94, 104, 105, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]:
                self.state = 883
                self.expressionList()
                pass
            elif token in [73]:
                self.state = 884
                self.match(BraketPragmasParser.DIM)
                self.state = 885
                self.match(BraketPragmasParser.EQUALS)
                self.state = 886
                self.expression(0)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 889
            self.match(BraketPragmasParser.RBRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DesignatorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LBRACKET(self):
            return self.getToken(BraketPragmasParser.LBRACKET, 0)

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


        def RBRACKET(self):
            return self.getToken(BraketPragmasParser.RBRACKET, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_designator

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

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

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




    def designator(self):

        localctx = BraketPragmasParser.DesignatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_designator)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 891
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 892
            self.expression(0)
            self.state = 893
            self.match(BraketPragmasParser.RBRACKET)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GateOperandContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def indexedIdentifier(self):
            return self.getTypedRuleContext(BraketPragmasParser.IndexedIdentifierContext,0)


        def HardwareQubit(self):
            return self.getToken(BraketPragmasParser.HardwareQubit, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_gateOperand

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

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

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




    def gateOperand(self):

        localctx = BraketPragmasParser.GateOperandContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_gateOperand)
        try:
            self.state = 897
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [116]:
                self.enterOuterAlt(localctx, 1)
                self.state = 895
                self.indexedIdentifier()
                pass
            elif token in [117]:
                self.enterOuterAlt(localctx, 2)
                self.state = 896
                self.match(BraketPragmasParser.HardwareQubit)
                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 ExternArgumentContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


        def arrayReferenceType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArrayReferenceTypeContext,0)


        def CREG(self):
            return self.getToken(BraketPragmasParser.CREG, 0)

        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_externArgument

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

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

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




    def externArgument(self):

        localctx = BraketPragmasParser.ExternArgumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_externArgument)
        self._la = 0 # Token type
        try:
            self.state = 905
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 66, 67]:
                self.enterOuterAlt(localctx, 1)
                self.state = 899
                self.scalarType()
                pass
            elif token in [53, 54]:
                self.enterOuterAlt(localctx, 2)
                self.state = 900
                self.arrayReferenceType()
                pass
            elif token in [57]:
                self.enterOuterAlt(localctx, 3)
                self.state = 901
                self.match(BraketPragmasParser.CREG)
                self.state = 903
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 902
                    self.designator()


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

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

        def HardwareQubit(self):
            return self.getToken(BraketPragmasParser.HardwareQubit, 0)

        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_defcalArgument

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

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

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




    def defcalArgument(self):

        localctx = BraketPragmasParser.DefcalArgumentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_defcalArgument)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 907
            _la = self._input.LA(1)
            if not(_la==116 or _la==117):
                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 ArgumentDefinitionContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def scalarType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ScalarTypeContext,0)


        def Identifier(self):
            return self.getToken(BraketPragmasParser.Identifier, 0)

        def qubitType(self):
            return self.getTypedRuleContext(BraketPragmasParser.QubitTypeContext,0)


        def CREG(self):
            return self.getToken(BraketPragmasParser.CREG, 0)

        def QREG(self):
            return self.getToken(BraketPragmasParser.QREG, 0)

        def designator(self):
            return self.getTypedRuleContext(BraketPragmasParser.DesignatorContext,0)


        def arrayReferenceType(self):
            return self.getTypedRuleContext(BraketPragmasParser.ArrayReferenceTypeContext,0)


        def getRuleIndex(self):
            return BraketPragmasParser.RULE_argumentDefinition

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

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

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




    def argumentDefinition(self):

        localctx = BraketPragmasParser.ArgumentDefinitionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_argumentDefinition)
        self._la = 0 # Token type
        try:
            self.state = 923
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [58, 59, 60, 61, 62, 63, 64, 66, 67]:
                self.enterOuterAlt(localctx, 1)
                self.state = 909
                self.scalarType()
                self.state = 910
                self.match(BraketPragmasParser.Identifier)
                pass
            elif token in [56]:
                self.enterOuterAlt(localctx, 2)
                self.state = 912
                self.qubitType()
                self.state = 913
                self.match(BraketPragmasParser.Identifier)
                pass
            elif token in [55, 57]:
                self.enterOuterAlt(localctx, 3)
                self.state = 915
                _la = self._input.LA(1)
                if not(_la==55 or _la==57):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 916
                self.match(BraketPragmasParser.Identifier)
                self.state = 918
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==80:
                    self.state = 917
                    self.designator()


                pass
            elif token in [53, 54]:
                self.enterOuterAlt(localctx, 4)
                self.state = 920
                self.arrayReferenceType()
                self.state = 921
                self.match(BraketPragmasParser.Identifier)
                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 ArgumentDefinitionListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def argumentDefinition(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.ArgumentDefinitionContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.ArgumentDefinitionContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_argumentDefinitionList

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

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

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




    def argumentDefinitionList(self):

        localctx = BraketPragmasParser.ArgumentDefinitionListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_argumentDefinitionList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 925
            self.argumentDefinition()
            self.state = 930
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,96,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 926
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 927
                    self.argumentDefinition() 
                self.state = 932
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,96,self._ctx)

            self.state = 934
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 933
                self.match(BraketPragmasParser.COMMA)


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


    class ExpressionListContext(ParserRuleContext):
        __slots__ = 'parser'

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

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


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_expressionList

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

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

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




    def expressionList(self):

        localctx = BraketPragmasParser.ExpressionListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_expressionList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 936
            self.expression(0)
            self.state = 941
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,98,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 937
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 938
                    self.expression(0) 
                self.state = 943
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,98,self._ctx)

            self.state = 945
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 944
                self.match(BraketPragmasParser.COMMA)


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


    class DefcalArgumentListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def defcalArgument(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.DefcalArgumentContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.DefcalArgumentContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_defcalArgumentList

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

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

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




    def defcalArgumentList(self):

        localctx = BraketPragmasParser.DefcalArgumentListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_defcalArgumentList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 947
            self.defcalArgument()
            self.state = 952
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,100,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 948
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 949
                    self.defcalArgument() 
                self.state = 954
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,100,self._ctx)

            self.state = 956
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 955
                self.match(BraketPragmasParser.COMMA)


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


    class IdentifierListContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_identifierList

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

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

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




    def identifierList(self):

        localctx = BraketPragmasParser.IdentifierListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 170, self.RULE_identifierList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 958
            self.match(BraketPragmasParser.Identifier)
            self.state = 963
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,102,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 959
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 960
                    self.match(BraketPragmasParser.Identifier) 
                self.state = 965
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,102,self._ctx)

            self.state = 967
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 966
                self.match(BraketPragmasParser.COMMA)


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


    class GateOperandListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def gateOperand(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.GateOperandContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.GateOperandContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_gateOperandList

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

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

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




    def gateOperandList(self):

        localctx = BraketPragmasParser.GateOperandListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_gateOperandList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 969
            self.gateOperand()
            self.state = 974
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,104,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 970
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 971
                    self.gateOperand() 
                self.state = 976
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,104,self._ctx)

            self.state = 978
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 977
                self.match(BraketPragmasParser.COMMA)


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


    class ExternArgumentListContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def externArgument(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(BraketPragmasParser.ExternArgumentContext)
            else:
                return self.getTypedRuleContext(BraketPragmasParser.ExternArgumentContext,i)


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

        def getRuleIndex(self):
            return BraketPragmasParser.RULE_externArgumentList

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

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

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




    def externArgumentList(self):

        localctx = BraketPragmasParser.ExternArgumentListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 174, self.RULE_externArgumentList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 980
            self.externArgument()
            self.state = 985
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,106,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 981
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 982
                    self.externArgument() 
                self.state = 987
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,106,self._ctx)

            self.state = 989
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==89:
                self.state = 988
                self.match(BraketPragmasParser.COMMA)


        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[62] = self.expression_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 expression_sempred(self, localctx:ExpressionContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 16)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 14)
         

            if predIndex == 2:
                return self.precpred(self._ctx, 13)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 12)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 11)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 10)
         

            if predIndex == 6:
                return self.precpred(self._ctx, 9)
         

            if predIndex == 7:
                return self.precpred(self._ctx, 8)
         

            if predIndex == 8:
                return self.precpred(self._ctx, 7)
         

            if predIndex == 9:
                return self.precpred(self._ctx, 6)
         

            if predIndex == 10:
                return self.precpred(self._ctx, 5)
         

            if predIndex == 11:
                return self.precpred(self._ctx, 17)
         




