# Generated from BraketPragmasParser.g4 by ANTLR 4.8
# 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():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u0083")
        buf.write("\u03dc\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t")
        buf.write("&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4")
        buf.write("/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t\64")
        buf.write("\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t")
        buf.write(";\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\t")
        buf.write("D\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\t")
        buf.write("M\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\tU\4V\t")
        buf.write("V\4W\tW\4X\tX\3\2\3\2\3\2\5\2\u00b4\n\2\3\3\3\3\3\3\3")
        buf.write("\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\7\4\u00c1\n\4\f\4\16\4")
        buf.write("\u00c4\13\4\3\4\3\4\3\5\3\5\3\5\3\5\7\5\u00cc\n\5\f\5")
        buf.write("\16\5\u00cf\13\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3")
        buf.write("\7\5\7\u00db\n\7\3\b\3\b\3\t\3\t\3\n\3\n\5\n\u00e3\n\n")
        buf.write("\3\13\3\13\3\f\3\f\3\f\7\f\u00ea\n\f\f\f\16\f\u00ed\13")
        buf.write("\f\3\f\5\f\u00f0\n\f\3\r\3\r\3\r\3\16\3\16\3\17\3\17\3")
        buf.write("\17\7\17\u00fa\n\17\f\17\16\17\u00fd\13\17\3\20\3\20\3")
        buf.write("\20\3\21\3\21\3\21\5\21\u0105\n\21\3\22\3\22\3\22\3\22")
        buf.write("\3\22\3\22\3\22\3\22\5\22\u010f\n\22\3\23\3\23\5\23\u0113")
        buf.write("\n\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\25")
        buf.write("\3\25\3\26\3\26\3\27\5\27\u0123\n\27\3\27\3\27\5\27\u0127")
        buf.write("\n\27\3\27\3\27\3\27\5\27\u012c\n\27\3\27\5\27\u012f\n")
        buf.write("\27\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31")
        buf.write("\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u0141\n\31\3\32\3")
        buf.write("\32\3\32\7\32\u0146\n\32\f\32\16\32\u0149\13\32\3\33\3")
        buf.write("\33\3\33\7\33\u014e\n\33\f\33\16\33\u0151\13\33\3\34\3")
        buf.write("\34\3\35\5\35\u0156\n\35\3\35\7\35\u0159\n\35\f\35\16")
        buf.write("\35\u015c\13\35\3\35\3\35\3\36\3\36\3\36\3\36\3\37\3\37")
        buf.write("\7\37\u0166\n\37\f\37\16\37\u0169\13\37\3\37\3\37\3\37")
        buf.write("\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37")
        buf.write("\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37")
        buf.write("\3\37\3\37\5\37\u0186\n\37\5\37\u0188\n\37\3 \3 \5 \u018c")
        buf.write("\n \3!\3!\7!\u0190\n!\f!\16!\u0193\13!\3!\3!\3\"\3\"\3")
        buf.write("\"\3#\3#\5#\u019c\n#\3$\3$\3$\3$\3%\3%\3%\3%\3&\3&\3&")
        buf.write("\3\'\3\'\3\'\3(\3(\3(\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\5")
        buf.write(")\u01b9\n)\3)\3)\3*\3*\3*\3*\3*\3*\3*\5*\u01c4\n*\3+\3")
        buf.write("+\3+\5+\u01c9\n+\3+\3+\3,\3,\3,\3,\3,\3,\3-\3-\5-\u01d5")
        buf.write("\n-\3-\3-\3.\3.\5.\u01db\n.\3.\3.\3/\3/\3/\5/\u01e2\n")
        buf.write("/\3/\3/\3\60\7\60\u01e7\n\60\f\60\16\60\u01ea\13\60\3")
        buf.write("\60\3\60\3\60\5\60\u01ef\n\60\3\60\5\60\u01f2\n\60\3\60")
        buf.write("\5\60\u01f5\n\60\3\60\3\60\3\60\3\60\7\60\u01fb\n\60\f")
        buf.write("\60\16\60\u01fe\13\60\3\60\3\60\3\60\5\60\u0203\n\60\3")
        buf.write("\60\5\60\u0206\n\60\3\60\5\60\u0209\n\60\3\60\5\60\u020c")
        buf.write("\n\60\3\60\5\60\u020f\n\60\3\61\3\61\3\61\5\61\u0214\n")
        buf.write("\61\3\61\3\61\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63")
        buf.write("\3\63\3\63\3\64\3\64\5\64\u0224\n\64\3\64\3\64\3\64\5")
        buf.write("\64\u0229\n\64\3\64\3\64\3\65\3\65\3\65\3\65\3\65\3\65")
        buf.write("\3\65\3\66\3\66\3\66\5\66\u0237\n\66\3\66\3\66\3\66\3")
        buf.write("\67\3\67\3\67\5\67\u023f\n\67\3\67\3\67\38\38\38\38\3")
        buf.write("9\39\39\39\59\u024b\n9\39\39\59\u024f\n9\39\39\3:\3:\3")
        buf.write(":\3:\5:\u0257\n:\3:\3:\5:\u025b\n:\3:\3:\3;\3;\3;\3;\5")
        buf.write(";\u0263\n;\3;\5;\u0266\n;\3;\3;\3;\3<\3<\3<\3<\5<\u026f")
        buf.write("\n<\3<\3<\3=\3=\3=\3>\3>\3>\3>\5>\u027a\n>\3>\5>\u027d")
        buf.write("\n>\3>\3>\5>\u0281\n>\3>\3>\7>\u0285\n>\f>\16>\u0288\13")
        buf.write(">\3>\3>\3?\3?\3?\3?\3?\3?\3?\3?\3?\5?\u0295\n?\3?\3?\3")
        buf.write("?\3?\3?\3?\3?\3?\3?\3?\3?\3?\5?\u02a3\n?\3?\3?\5?\u02a7")
        buf.write("\n?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3")
        buf.write("?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3")
        buf.write("?\7?\u02cc\n?\f?\16?\u02cf\13?\3@\3@\3@\7@\u02d4\n@\f")
        buf.write("@\16@\u02d7\13@\3A\3A\3A\5A\u02dc\nA\3B\3B\3B\3C\5C\u02e2")
        buf.write("\nC\3C\3C\5C\u02e6\nC\3C\3C\5C\u02ea\nC\3D\3D\3D\3D\7")
        buf.write("D\u02f0\nD\fD\16D\u02f3\13D\3D\5D\u02f6\nD\3D\3D\3E\3")
        buf.write("E\3E\5E\u02fd\nE\3E\3E\3E\5E\u0302\nE\7E\u0304\nE\fE\16")
        buf.write("E\u0307\13E\3E\5E\u030a\nE\3E\3E\3F\3F\3F\3F\5F\u0312")
        buf.write("\nF\3F\3F\3F\5F\u0317\nF\7F\u0319\nF\fF\16F\u031c\13F")
        buf.write("\3F\5F\u031f\nF\5F\u0321\nF\3F\3F\3G\3G\7G\u0327\nG\f")
        buf.write("G\16G\u032a\13G\3H\3H\3H\3I\3I\3I\3I\3I\3I\3I\3I\3I\3")
        buf.write("I\3I\5I\u033a\nI\5I\u033c\nI\3I\3I\3J\3J\5J\u0342\nJ\3")
        buf.write("J\3J\5J\u0346\nJ\3J\3J\5J\u034a\nJ\3J\3J\5J\u034e\nJ\3")
        buf.write("J\3J\5J\u0352\nJ\3J\3J\3J\3J\3J\3J\3J\3J\5J\u035c\nJ\5")
        buf.write("J\u035e\nJ\3K\3K\5K\u0362\nK\3L\3L\3L\3L\3L\3L\3L\3M\3")
        buf.write("M\3M\3M\3M\3M\3M\3M\3M\5M\u0374\nM\3M\3M\3N\3N\3N\3N\3")
        buf.write("O\3O\5O\u037e\nO\3P\3P\3P\3P\5P\u0384\nP\5P\u0386\nP\3")
        buf.write("Q\3Q\3R\3R\3R\3R\3R\3R\3R\3R\3R\5R\u0393\nR\3R\3R\3R\5")
        buf.write("R\u0398\nR\3S\3S\3S\7S\u039d\nS\fS\16S\u03a0\13S\3S\5")
        buf.write("S\u03a3\nS\3T\3T\3T\7T\u03a8\nT\fT\16T\u03ab\13T\3T\5")
        buf.write("T\u03ae\nT\3U\3U\3U\7U\u03b3\nU\fU\16U\u03b6\13U\3U\5")
        buf.write("U\u03b9\nU\3V\3V\3V\7V\u03be\nV\fV\16V\u03c1\13V\3V\5")
        buf.write("V\u03c4\nV\3W\3W\3W\7W\u03c9\nW\fW\16W\u03cc\13W\3W\5")
        buf.write("W\u03cf\nW\3X\3X\3X\7X\u03d4\nX\fX\16X\u03d7\13X\3X\5")
        buf.write("X\u03da\nX\3X\3\u0286\3|Y\2\4\6\b\n\f\16\20\22\24\26\30")
        buf.write("\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`b")
        buf.write("dfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c")
        buf.write("\u008e\u0090\u0092\u0094\u0096\u0098\u009a\u009c\u009e")
        buf.write("\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\2\22")
        buf.write("\3\2\b\t\3\2\13\r\3\2\16\22\5\2ppssww\4\2ssww\4\2]]__")
        buf.write("\3\2\26\36\3\2\64\65\4\288::\4\2[[ll\4\2__ij\4\2PPpy\4")
        buf.write("\2``bc\3\2HI\3\2\66\67\3\2uv\2\u0429\2\u00b3\3\2\2\2\4")
        buf.write("\u00b5\3\2\2\2\6\u00bc\3\2\2\2\b\u00c7\3\2\2\2\n\u00d2")
        buf.write("\3\2\2\2\f\u00da\3\2\2\2\16\u00dc\3\2\2\2\20\u00de\3\2")
        buf.write("\2\2\22\u00e0\3\2\2\2\24\u00e4\3\2\2\2\26\u00ef\3\2\2")
        buf.write("\2\30\u00f1\3\2\2\2\32\u00f4\3\2\2\2\34\u00f6\3\2\2\2")
        buf.write("\36\u00fe\3\2\2\2 \u0104\3\2\2\2\"\u010e\3\2\2\2$\u0112")
        buf.write("\3\2\2\2&\u0117\3\2\2\2(\u011d\3\2\2\2*\u011f\3\2\2\2")
        buf.write(",\u012e\3\2\2\2.\u0130\3\2\2\2\60\u0140\3\2\2\2\62\u0142")
        buf.write("\3\2\2\2\64\u014a\3\2\2\2\66\u0152\3\2\2\28\u0155\3\2")
        buf.write("\2\2:\u015f\3\2\2\2<\u0187\3\2\2\2>\u0189\3\2\2\2@\u018d")
        buf.write("\3\2\2\2B\u0196\3\2\2\2D\u019b\3\2\2\2F\u019d\3\2\2\2")
        buf.write("H\u01a1\3\2\2\2J\u01a5\3\2\2\2L\u01a8\3\2\2\2N\u01ab\3")
        buf.write("\2\2\2P\u01ae\3\2\2\2R\u01bc\3\2\2\2T\u01c5\3\2\2\2V\u01cc")
        buf.write("\3\2\2\2X\u01d2\3\2\2\2Z\u01d8\3\2\2\2\\\u01de\3\2\2\2")
        buf.write("^\u020e\3\2\2\2`\u0210\3\2\2\2b\u0217\3\2\2\2d\u021b\3")
        buf.write("\2\2\2f\u0223\3\2\2\2h\u022c\3\2\2\2j\u0233\3\2\2\2l\u023b")
        buf.write("\3\2\2\2n\u0242\3\2\2\2p\u0246\3\2\2\2r\u0252\3\2\2\2")
        buf.write("t\u025e\3\2\2\2v\u026a\3\2\2\2x\u0272\3\2\2\2z\u0275\3")
        buf.write("\2\2\2|\u02a6\3\2\2\2~\u02d0\3\2\2\2\u0080\u02db\3\2\2")
        buf.write("\2\u0082\u02dd\3\2\2\2\u0084\u02e1\3\2\2\2\u0086\u02eb")
        buf.write("\3\2\2\2\u0088\u02f9\3\2\2\2\u008a\u030d\3\2\2\2\u008c")
        buf.write("\u0324\3\2\2\2\u008e\u032b\3\2\2\2\u0090\u033b\3\2\2\2")
        buf.write("\u0092\u035d\3\2\2\2\u0094\u035f\3\2\2\2\u0096\u0363\3")
        buf.write("\2\2\2\u0098\u036a\3\2\2\2\u009a\u0377\3\2\2\2\u009c\u037d")
        buf.write("\3\2\2\2\u009e\u0385\3\2\2\2\u00a0\u0387\3\2\2\2\u00a2")
        buf.write("\u0397\3\2\2\2\u00a4\u0399\3\2\2\2\u00a6\u03a4\3\2\2\2")
        buf.write("\u00a8\u03af\3\2\2\2\u00aa\u03ba\3\2\2\2\u00ac\u03c5\3")
        buf.write("\2\2\2\u00ae\u03d0\3\2\2\2\u00b0\u00b4\5\n\6\2\u00b1\u00b4")
        buf.write("\5\4\3\2\u00b2\u00b4\5.\30\2\u00b3\u00b0\3\2\2\2\u00b3")
        buf.write("\u00b1\3\2\2\2\u00b3\u00b2\3\2\2\2\u00b4\3\3\2\2\2\u00b5")
        buf.write("\u00b6\7\3\2\2\u00b6\u00b7\7\4\2\2\u00b7\u00b8\7U\2\2")
        buf.write("\u00b8\u00b9\5\6\4\2\u00b9\u00ba\7V\2\2\u00ba\u00bb\5")
        buf.write("\26\f\2\u00bb\5\3\2\2\2\u00bc\u00bd\7Q\2\2\u00bd\u00c2")
        buf.write("\5\b\5\2\u00be\u00bf\7Z\2\2\u00bf\u00c1\5\b\5\2\u00c0")
        buf.write("\u00be\3\2\2\2\u00c1\u00c4\3\2\2\2\u00c2\u00c0\3\2\2\2")
        buf.write("\u00c2\u00c3\3\2\2\2\u00c3\u00c5\3\2\2\2\u00c4\u00c2\3")
        buf.write("\2\2\2\u00c5\u00c6\7R\2\2\u00c6\7\3\2\2\2\u00c7\u00c8")
        buf.write("\7Q\2\2\u00c8\u00cd\5,\27\2\u00c9\u00ca\7Z\2\2\u00ca\u00cc")
        buf.write("\5,\27\2\u00cb\u00c9\3\2\2\2\u00cc\u00cf\3\2\2\2\u00cd")
        buf.write("\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\u00d0\3\2\2\2")
        buf.write("\u00cf\u00cd\3\2\2\2\u00d0\u00d1\7R\2\2\u00d1\t\3\2\2")
        buf.write("\2\u00d2\u00d3\7\3\2\2\u00d3\u00d4\7\5\2\2\u00d4\u00d5")
        buf.write("\5\f\7\2\u00d5\13\3\2\2\2\u00d6\u00db\5\16\b\2\u00d7\u00db")
        buf.write("\5\22\n\2\u00d8\u00db\5\30\r\2\u00d9\u00db\5\36\20\2\u00da")
        buf.write("\u00d6\3\2\2\2\u00da\u00d7\3\2\2\2\u00da\u00d8\3\2\2\2")
        buf.write("\u00da\u00d9\3\2\2\2\u00db\r\3\2\2\2\u00dc\u00dd\5\20")
        buf.write("\t\2\u00dd\17\3\2\2\2\u00de\u00df\7\7\2\2\u00df\21\3\2")
        buf.write("\2\2\u00e0\u00e2\5\24\13\2\u00e1\u00e3\5\26\f\2\u00e2")
        buf.write("\u00e1\3\2\2\2\u00e2\u00e3\3\2\2\2\u00e3\23\3\2\2\2\u00e4")
        buf.write("\u00e5\t\2\2\2\u00e5\25\3\2\2\2\u00e6\u00eb\5\u008cG\2")
        buf.write("\u00e7\u00e8\7Z\2\2\u00e8\u00ea\5\u008cG\2\u00e9\u00e7")
        buf.write("\3\2\2\2\u00ea\u00ed\3\2\2\2\u00eb\u00e9\3\2\2\2\u00eb")
        buf.write("\u00ec\3\2\2\2\u00ec\u00f0\3\2\2\2\u00ed\u00eb\3\2\2\2")
        buf.write("\u00ee\u00f0\7\24\2\2\u00ef\u00e6\3\2\2\2\u00ef\u00ee")
        buf.write("\3\2\2\2\u00f0\27\3\2\2\2\u00f1\u00f2\5\32\16\2\u00f2")
        buf.write("\u00f3\5\34\17\2\u00f3\31\3\2\2\2\u00f4\u00f5\7\n\2\2")
        buf.write("\u00f5\33\3\2\2\2\u00f6\u00fb\7y\2\2\u00f7\u00f8\7Z\2")
        buf.write("\2\u00f8\u00fa\7y\2\2\u00f9\u00f7\3\2\2\2\u00fa\u00fd")
        buf.write("\3\2\2\2\u00fb\u00f9\3\2\2\2\u00fb\u00fc\3\2\2\2\u00fc")
        buf.write("\35\3\2\2\2\u00fd\u00fb\3\2\2\2\u00fe\u00ff\5(\25\2\u00ff")
        buf.write("\u0100\5 \21\2\u0100\37\3\2\2\2\u0101\u0105\5\"\22\2\u0102")
        buf.write("\u0105\5$\23\2\u0103\u0105\5&\24\2\u0104\u0101\3\2\2\2")
        buf.write("\u0104\u0102\3\2\2\2\u0104\u0103\3\2\2\2\u0105!\3\2\2")
        buf.write("\2\u0106\u0107\5*\26\2\u0107\u0108\7U\2\2\u0108\u0109")
        buf.write("\5\u008cG\2\u0109\u010a\7V\2\2\u010a\u010f\3\2\2\2\u010b")
        buf.write("\u010c\5*\26\2\u010c\u010d\7\24\2\2\u010d\u010f\3\2\2")
        buf.write("\2\u010e\u0106\3\2\2\2\u010e\u010b\3\2\2\2\u010f#\3\2")
        buf.write("\2\2\u0110\u0113\5\"\22\2\u0111\u0113\5&\24\2\u0112\u0110")
        buf.write("\3\2\2\2\u0112\u0111\3\2\2\2\u0113\u0114\3\2\2\2\u0114")
        buf.write("\u0115\7\25\2\2\u0115\u0116\5 \21\2\u0116%\3\2\2\2\u0117")
        buf.write("\u0118\7\23\2\2\u0118\u0119\7U\2\2\u0119\u011a\5\6\4\2")
        buf.write("\u011a\u011b\7V\2\2\u011b\u011c\5\26\f\2\u011c\'\3\2\2")
        buf.write("\2\u011d\u011e\t\3\2\2\u011e)\3\2\2\2\u011f\u0120\t\4")
        buf.write("\2\2\u0120+\3\2\2\2\u0121\u0123\7_\2\2\u0122\u0121\3\2")
        buf.write("\2\2\u0122\u0123\3\2\2\2\u0123\u0124\3\2\2\2\u0124\u012f")
        buf.write("\t\5\2\2\u0125\u0127\7_\2\2\u0126\u0125\3\2\2\2\u0126")
        buf.write("\u0127\3\2\2\2\u0127\u0128\3\2\2\2\u0128\u0129\t\6\2\2")
        buf.write("\u0129\u012b\t\7\2\2\u012a\u012c\7_\2\2\u012b\u012a\3")
        buf.write("\2\2\2\u012b\u012c\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u012f")
        buf.write("\7p\2\2\u012e\u0122\3\2\2\2\u012e\u0126\3\2\2\2\u012f")
        buf.write("-\3\2\2\2\u0130\u0131\7\3\2\2\u0131\u0132\7\6\2\2\u0132")
        buf.write("\u0133\5\60\31\2\u0133/\3\2\2\2\u0134\u0135\5\66\34\2")
        buf.write("\u0135\u0136\7U\2\2\u0136\u0137\5\64\33\2\u0137\u0138")
        buf.write("\7V\2\2\u0138\u0139\5\26\f\2\u0139\u0141\3\2\2\2\u013a")
        buf.write("\u013b\7\37\2\2\u013b\u013c\7U\2\2\u013c\u013d\5\62\32")
        buf.write("\2\u013d\u013e\7V\2\2\u013e\u013f\5\26\f\2\u013f\u0141")
        buf.write("\3\2\2\2\u0140\u0134\3\2\2\2\u0140\u013a\3\2\2\2\u0141")
        buf.write("\61\3\2\2\2\u0142\u0147\5\6\4\2\u0143\u0144\7Z\2\2\u0144")
        buf.write("\u0146\5\6\4\2\u0145\u0143\3\2\2\2\u0146\u0149\3\2\2\2")
        buf.write("\u0147\u0145\3\2\2\2\u0147\u0148\3\2\2\2\u0148\63\3\2")
        buf.write("\2\2\u0149\u0147\3\2\2\2\u014a\u014f\7w\2\2\u014b\u014c")
        buf.write("\7Z\2\2\u014c\u014e\7w\2\2\u014d\u014b\3\2\2\2\u014e\u0151")
        buf.write("\3\2\2\2\u014f\u014d\3\2\2\2\u014f\u0150\3\2\2\2\u0150")
        buf.write("\65\3\2\2\2\u0151\u014f\3\2\2\2\u0152\u0153\t\b\2\2\u0153")
        buf.write("\67\3\2\2\2\u0154\u0156\5:\36\2\u0155\u0154\3\2\2\2\u0155")
        buf.write("\u0156\3\2\2\2\u0156\u015a\3\2\2\2\u0157\u0159\5<\37\2")
        buf.write("\u0158\u0157\3\2\2\2\u0159\u015c\3\2\2\2\u015a\u0158\3")
        buf.write("\2\2\2\u015a\u015b\3\2\2\2\u015b\u015d\3\2\2\2\u015c\u015a")
        buf.write("\3\2\2\2\u015d\u015e\7\2\2\3\u015e9\3\2\2\2\u015f\u0160")
        buf.write("\7 \2\2\u0160\u0161\7\u0080\2\2\u0161\u0162\7X\2\2\u0162")
        buf.write(";\3\2\2\2\u0163\u0188\5B\"\2\u0164\u0166\5> \2\u0165\u0164")
        buf.write("\3\2\2\2\u0166\u0169\3\2\2\2\u0167\u0165\3\2\2\2\u0167")
        buf.write("\u0168\3\2\2\2\u0168\u0185\3\2\2\2\u0169\u0167\3\2\2\2")
        buf.write("\u016a\u0186\5d\63\2\u016b\u0186\5v<\2\u016c\u0186\5X")
        buf.write("-\2\u016d\u0186\5Z.\2\u016e\u0186\5J&\2\u016f\u0186\5")
        buf.write("F$\2\u0170\u0186\5f\64\2\u0171\u0186\5h\65\2\u0172\u0186")
        buf.write("\5L\'\2\u0173\u0186\5p9\2\u0174\u0186\5z>\2\u0175\u0186")
        buf.write("\5\\/\2\u0176\u0186\5N(\2\u0177\u0186\5x=\2\u0178\u0186")
        buf.write("\5r:\2\u0179\u0186\5P)\2\u017a\u0186\5^\60\2\u017b\u0186")
        buf.write("\5t;\2\u017c\u0186\5R*\2\u017d\u0186\5H%\2\u017e\u0186")
        buf.write("\5j\66\2\u017f\u0186\5`\61\2\u0180\u0186\5l\67\2\u0181")
        buf.write("\u0186\5n8\2\u0182\u0186\5b\62\2\u0183\u0186\5T+\2\u0184")
        buf.write("\u0186\5V,\2\u0185\u016a\3\2\2\2\u0185\u016b\3\2\2\2\u0185")
        buf.write("\u016c\3\2\2\2\u0185\u016d\3\2\2\2\u0185\u016e\3\2\2\2")
        buf.write("\u0185\u016f\3\2\2\2\u0185\u0170\3\2\2\2\u0185\u0171\3")
        buf.write("\2\2\2\u0185\u0172\3\2\2\2\u0185\u0173\3\2\2\2\u0185\u0174")
        buf.write("\3\2\2\2\u0185\u0175\3\2\2\2\u0185\u0176\3\2\2\2\u0185")
        buf.write("\u0177\3\2\2\2\u0185\u0178\3\2\2\2\u0185\u0179\3\2\2\2")
        buf.write("\u0185\u017a\3\2\2\2\u0185\u017b\3\2\2\2\u0185\u017c\3")
        buf.write("\2\2\2\u0185\u017d\3\2\2\2\u0185\u017e\3\2\2\2\u0185\u017f")
        buf.write("\3\2\2\2\u0185\u0180\3\2\2\2\u0185\u0181\3\2\2\2\u0185")
        buf.write("\u0182\3\2\2\2\u0185\u0183\3\2\2\2\u0185\u0184\3\2\2\2")
        buf.write("\u0186\u0188\3\2\2\2\u0187\u0163\3\2\2\2\u0187\u0167\3")
        buf.write("\2\2\2\u0188=\3\2\2\2\u0189\u018b\7\63\2\2\u018a\u018c")
        buf.write("\7\u0083\2\2\u018b\u018a\3\2\2\2\u018b\u018c\3\2\2\2\u018c")
        buf.write("?\3\2\2\2\u018d\u0191\7S\2\2\u018e\u0190\5<\37\2\u018f")
        buf.write("\u018e\3\2\2\2\u0190\u0193\3\2\2\2\u0191\u018f\3\2\2\2")
        buf.write("\u0191\u0192\3\2\2\2\u0192\u0194\3\2\2\2\u0193\u0191\3")
        buf.write("\2\2\2\u0194\u0195\7T\2\2\u0195A\3\2\2\2\u0196\u0197\7")
        buf.write("\62\2\2\u0197\u0198\7\u0083\2\2\u0198C\3\2\2\2\u0199\u019c")
        buf.write("\5<\37\2\u019a\u019c\5@!\2\u019b\u0199\3\2\2\2\u019b\u019a")
        buf.write("\3\2\2\2\u019cE\3\2\2\2\u019d\u019e\7\"\2\2\u019e\u019f")
        buf.write("\7z\2\2\u019f\u01a0\7X\2\2\u01a0G\3\2\2\2\u01a1\u01a2")
        buf.write("\7!\2\2\u01a2\u01a3\7z\2\2\u01a3\u01a4\7X\2\2\u01a4I\3")
        buf.write("\2\2\2\u01a5\u01a6\7)\2\2\u01a6\u01a7\7X\2\2\u01a7K\3")
        buf.write("\2\2\2\u01a8\u01a9\7*\2\2\u01a9\u01aa\7X\2\2\u01aaM\3")
        buf.write("\2\2\2\u01ab\u01ac\7-\2\2\u01ac\u01ad\7X\2\2\u01adO\3")
        buf.write("\2\2\2\u01ae\u01af\7/\2\2\u01af\u01b0\5\u0092J\2\u01b0")
        buf.write("\u01b1\7u\2\2\u01b1\u01b8\7\61\2\2\u01b2\u01b9\5\u0086")
        buf.write("D\2\u01b3\u01b4\7Q\2\2\u01b4\u01b5\5\u0084C\2\u01b5\u01b6")
        buf.write("\7R\2\2\u01b6\u01b9\3\2\2\2\u01b7\u01b9\7u\2\2\u01b8\u01b2")
        buf.write("\3\2\2\2\u01b8\u01b3\3\2\2\2\u01b8\u01b7\3\2\2\2\u01b9")
        buf.write("\u01ba\3\2\2\2\u01ba\u01bb\5D#\2\u01bbQ\3\2\2\2\u01bc")
        buf.write("\u01bd\7+\2\2\u01bd\u01be\7U\2\2\u01be\u01bf\5|?\2\u01bf")
        buf.write("\u01c0\7V\2\2\u01c0\u01c3\5D#\2\u01c1\u01c2\7,\2\2\u01c2")
        buf.write("\u01c4\5D#\2\u01c3\u01c1\3\2\2\2\u01c3\u01c4\3\2\2\2\u01c4")
        buf.write("S\3\2\2\2\u01c5\u01c8\7.\2\2\u01c6\u01c9\5|?\2\u01c7\u01c9")
        buf.write("\5\u0082B\2\u01c8\u01c6\3\2\2\2\u01c8\u01c7\3\2\2\2\u01c8")
        buf.write("\u01c9\3\2\2\2\u01c9\u01ca\3\2\2\2\u01ca\u01cb\7X\2\2")
        buf.write("\u01cbU\3\2\2\2\u01cc\u01cd\7\60\2\2\u01cd\u01ce\7U\2")
        buf.write("\2\u01ce\u01cf\5|?\2\u01cf\u01d0\7V\2\2\u01d0\u01d1\5")
        buf.write("D#\2\u01d1W\3\2\2\2\u01d2\u01d4\7O\2\2\u01d3\u01d5\5\u00ac")
        buf.write("W\2\u01d4\u01d3\3\2\2\2\u01d4\u01d5\3\2\2\2\u01d5\u01d6")
        buf.write("\3\2\2\2\u01d6\u01d7\7X\2\2\u01d7Y\3\2\2\2\u01d8\u01da")
        buf.write("\7\'\2\2\u01d9\u01db\5\u009aN\2\u01da\u01d9\3\2\2\2\u01da")
        buf.write("\u01db\3\2\2\2\u01db\u01dc\3\2\2\2\u01dc\u01dd\5@!\2\u01dd")
        buf.write("[\3\2\2\2\u01de\u01df\7L\2\2\u01df\u01e1\5\u009aN\2\u01e0")
        buf.write("\u01e2\5\u00acW\2\u01e1\u01e0\3\2\2\2\u01e1\u01e2\3\2")
        buf.write("\2\2\u01e2\u01e3\3\2\2\2\u01e3\u01e4\7X\2\2\u01e4]\3\2")
        buf.write("\2\2\u01e5\u01e7\5\u0090I\2\u01e6\u01e5\3\2\2\2\u01e7")
        buf.write("\u01ea\3\2\2\2\u01e8\u01e6\3\2\2\2\u01e8\u01e9\3\2\2\2")
        buf.write("\u01e9\u01eb\3\2\2\2\u01ea\u01e8\3\2\2\2\u01eb\u01f1\7")
        buf.write("u\2\2\u01ec\u01ee\7U\2\2\u01ed\u01ef\5\u00a6T\2\u01ee")
        buf.write("\u01ed\3\2\2\2\u01ee\u01ef\3\2\2\2\u01ef\u01f0\3\2\2\2")
        buf.write("\u01f0\u01f2\7V\2\2\u01f1\u01ec\3\2\2\2\u01f1\u01f2\3")
        buf.write("\2\2\2\u01f2\u01f4\3\2\2\2\u01f3\u01f5\5\u009aN\2\u01f4")
        buf.write("\u01f3\3\2\2\2\u01f4\u01f5\3\2\2\2\u01f5\u01f6\3\2\2\2")
        buf.write("\u01f6\u01f7\5\u00acW\2\u01f7\u01f8\7X\2\2\u01f8\u020f")
        buf.write("\3\2\2\2\u01f9\u01fb\5\u0090I\2\u01fa\u01f9\3\2\2\2\u01fb")
        buf.write("\u01fe\3\2\2\2\u01fc\u01fa\3\2\2\2\u01fc\u01fd\3\2\2\2")
        buf.write("\u01fd\u01ff\3\2\2\2\u01fe\u01fc\3\2\2\2\u01ff\u0205\7")
        buf.write("E\2\2\u0200\u0202\7U\2\2\u0201\u0203\5\u00a6T\2\u0202")
        buf.write("\u0201\3\2\2\2\u0202\u0203\3\2\2\2\u0203\u0204\3\2\2\2")
        buf.write("\u0204\u0206\7V\2\2\u0205\u0200\3\2\2\2\u0205\u0206\3")
        buf.write("\2\2\2\u0206\u0208\3\2\2\2\u0207\u0209\5\u009aN\2\u0208")
        buf.write("\u0207\3\2\2\2\u0208\u0209\3\2\2\2\u0209\u020b\3\2\2\2")
        buf.write("\u020a\u020c\5\u00acW\2\u020b\u020a\3\2\2\2\u020b\u020c")
        buf.write("\3\2\2\2\u020c\u020d\3\2\2\2\u020d\u020f\7X\2\2\u020e")
        buf.write("\u01e8\3\2\2\2\u020e\u01fc\3\2\2\2\u020f_\3\2\2\2\u0210")
        buf.write("\u0213\5\u0082B\2\u0211\u0212\7\\\2\2\u0212\u0214\5\u008c")
        buf.write("G\2\u0213\u0211\3\2\2\2\u0213\u0214\3\2\2\2\u0214\u0215")
        buf.write("\3\2\2\2\u0215\u0216\7X\2\2\u0216a\3\2\2\2\u0217\u0218")
        buf.write("\7M\2\2\u0218\u0219\5\u009cO\2\u0219\u021a\7X\2\2\u021a")
        buf.write("c\3\2\2\2\u021b\u021c\7(\2\2\u021c\u021d\7u\2\2\u021d")
        buf.write("\u021e\7[\2\2\u021e\u021f\5~@\2\u021f\u0220\7X\2\2\u0220")
        buf.write("e\3\2\2\2\u0221\u0224\5\u0092J\2\u0222\u0224\5\u0096L")
        buf.write("\2\u0223\u0221\3\2\2\2\u0223\u0222\3\2\2\2\u0224\u0225")
        buf.write("\3\2\2\2\u0225\u0228\7u\2\2\u0226\u0227\7[\2\2\u0227\u0229")
        buf.write("\5\u0080A\2\u0228\u0226\3\2\2\2\u0228\u0229\3\2\2\2\u0229")
        buf.write("\u022a\3\2\2\2\u022a\u022b\7X\2\2\u022bg\3\2\2\2\u022c")
        buf.write("\u022d\7\66\2\2\u022d\u022e\5\u0092J\2\u022e\u022f\7u")
        buf.write("\2\2\u022f\u0230\7[\2\2\u0230\u0231\5\u0080A\2\u0231\u0232")
        buf.write("\7X\2\2\u0232i\3\2\2\2\u0233\u0236\t\t\2\2\u0234\u0237")
        buf.write("\5\u0092J\2\u0235\u0237\5\u0096L\2\u0236\u0234\3\2\2\2")
        buf.write("\u0236\u0235\3\2\2\2\u0237\u0238\3\2\2\2\u0238\u0239\7")
        buf.write("u\2\2\u0239\u023a\7X\2\2\u023ak\3\2\2\2\u023b\u023c\t")
        buf.write("\n\2\2\u023c\u023e\7u\2\2\u023d\u023f\5\u009aN\2\u023e")
        buf.write("\u023d\3\2\2\2\u023e\u023f\3\2\2\2\u023f\u0240\3\2\2\2")
        buf.write("\u0240\u0241\7X\2\2\u0241m\3\2\2\2\u0242\u0243\5\u0094")
        buf.write("K\2\u0243\u0244\7u\2\2\u0244\u0245\7X\2\2\u0245o\3\2\2")
        buf.write("\2\u0246\u0247\7#\2\2\u0247\u0248\7u\2\2\u0248\u024a\7")
        buf.write("U\2\2\u0249\u024b\5\u00a4S\2\u024a\u0249\3\2\2\2\u024a")
        buf.write("\u024b\3\2\2\2\u024b\u024c\3\2\2\2\u024c\u024e\7V\2\2")
        buf.write("\u024d\u024f\5\u008eH\2\u024e\u024d\3\2\2\2\u024e\u024f")
        buf.write("\3\2\2\2\u024f\u0250\3\2\2\2\u0250\u0251\5@!\2\u0251q")
        buf.write("\3\2\2\2\u0252\u0253\7&\2\2\u0253\u0254\7u\2\2\u0254\u0256")
        buf.write("\7U\2\2\u0255\u0257\5\u00aeX\2\u0256\u0255\3\2\2\2\u0256")
        buf.write("\u0257\3\2\2\2\u0257\u0258\3\2\2\2\u0258\u025a\7V\2\2")
        buf.write("\u0259\u025b\5\u008eH\2\u025a\u0259\3\2\2\2\u025a\u025b")
        buf.write("\3\2\2\2\u025b\u025c\3\2\2\2\u025c\u025d\7X\2\2\u025d")
        buf.write("s\3\2\2\2\u025e\u025f\7%\2\2\u025f\u0265\7u\2\2\u0260")
        buf.write("\u0262\7U\2\2\u0261\u0263\5\u00aaV\2\u0262\u0261\3\2\2")
        buf.write("\2\u0262\u0263\3\2\2\2\u0263\u0264\3\2\2\2\u0264\u0266")
        buf.write("\7V\2\2\u0265\u0260\3\2\2\2\u0265\u0266\3\2\2\2\u0266")
        buf.write("\u0267\3\2\2\2\u0267\u0268\5\u00aaV\2\u0268\u0269\5@!")
        buf.write("\2\u0269u\3\2\2\2\u026a\u026b\5\u008cG\2\u026b\u026e\t")
        buf.write("\13\2\2\u026c\u026f\5|?\2\u026d\u026f\5\u0082B\2\u026e")
        buf.write("\u026c\3\2\2\2\u026e\u026d\3\2\2\2\u026f\u0270\3\2\2\2")
        buf.write("\u0270\u0271\7X\2\2\u0271w\3\2\2\2\u0272\u0273\5|?\2\u0273")
        buf.write("\u0274\7X\2\2\u0274y\3\2\2\2\u0275\u0276\7$\2\2\u0276")
        buf.write("\u027c\7u\2\2\u0277\u0279\7U\2\2\u0278\u027a\5\u00a4S")
        buf.write("\2\u0279\u0278\3\2\2\2\u0279\u027a\3\2\2\2\u027a\u027b")
        buf.write("\3\2\2\2\u027b\u027d\7V\2\2\u027c\u0277\3\2\2\2\u027c")
        buf.write("\u027d\3\2\2\2\u027d\u027e\3\2\2\2\u027e\u0280\5\u00a8")
        buf.write("U\2\u027f\u0281\5\u008eH\2\u0280\u027f\3\2\2\2\u0280\u0281")
        buf.write("\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0286\7S\2\2\u0283")
        buf.write("\u0285\13\2\2\2\u0284\u0283\3\2\2\2\u0285\u0288\3\2\2")
        buf.write("\2\u0286\u0287\3\2\2\2\u0286\u0284\3\2\2\2\u0287\u0289")
        buf.write("\3\2\2\2\u0288\u0286\3\2\2\2\u0289\u028a\7T\2\2\u028a")
        buf.write("{\3\2\2\2\u028b\u028c\b?\1\2\u028c\u028d\7U\2\2\u028d")
        buf.write("\u028e\5|?\2\u028e\u028f\7V\2\2\u028f\u02a7\3\2\2\2\u0290")
        buf.write("\u0291\t\f\2\2\u0291\u02a7\5|?\21\u0292\u0295\5\u0092")
        buf.write("J\2\u0293\u0295\5\u0096L\2\u0294\u0292\3\2\2\2\u0294\u0293")
        buf.write("\3\2\2\2\u0295\u0296\3\2\2\2\u0296\u0297\7U\2\2\u0297")
        buf.write("\u0298\5|?\2\u0298\u0299\7V\2\2\u0299\u02a7\3\2\2\2\u029a")
        buf.write("\u029b\7K\2\2\u029b\u029c\7U\2\2\u029c\u029d\5@!\2\u029d")
        buf.write("\u029e\7V\2\2\u029e\u02a7\3\2\2\2\u029f\u02a0\7u\2\2\u02a0")
        buf.write("\u02a2\7U\2\2\u02a1\u02a3\5\u00a6T\2\u02a2\u02a1\3\2\2")
        buf.write("\2\u02a2\u02a3\3\2\2\2\u02a3\u02a4\3\2\2\2\u02a4\u02a7")
        buf.write("\7V\2\2\u02a5\u02a7\t\r\2\2\u02a6\u028b\3\2\2\2\u02a6")
        buf.write("\u0290\3\2\2\2\u02a6\u0294\3\2\2\2\u02a6\u029a\3\2\2\2")
        buf.write("\u02a6\u029f\3\2\2\2\u02a6\u02a5\3\2\2\2\u02a7\u02cd\3")
        buf.write("\2\2\2\u02a8\u02a9\f\22\2\2\u02a9\u02aa\7a\2\2\u02aa\u02cc")
        buf.write("\5|?\22\u02ab\u02ac\f\20\2\2\u02ac\u02ad\t\16\2\2\u02ad")
        buf.write("\u02cc\5|?\21\u02ae\u02af\f\17\2\2\u02af\u02b0\t\7\2\2")
        buf.write("\u02b0\u02cc\5|?\20\u02b1\u02b2\f\16\2\2\u02b2\u02b3\7")
        buf.write("n\2\2\u02b3\u02cc\5|?\17\u02b4\u02b5\f\r\2\2\u02b5\u02b6")
        buf.write("\7m\2\2\u02b6\u02cc\5|?\16\u02b7\u02b8\f\f\2\2\u02b8\u02b9")
        buf.write("\7k\2\2\u02b9\u02cc\5|?\r\u02ba\u02bb\f\13\2\2\u02bb\u02bc")
        buf.write("\7f\2\2\u02bc\u02cc\5|?\f\u02bd\u02be\f\n\2\2\u02be\u02bf")
        buf.write("\7h\2\2\u02bf\u02cc\5|?\13\u02c0\u02c1\f\t\2\2\u02c1\u02c2")
        buf.write("\7d\2\2\u02c2\u02cc\5|?\n\u02c3\u02c4\f\b\2\2\u02c4\u02c5")
        buf.write("\7g\2\2\u02c5\u02cc\5|?\t\u02c6\u02c7\f\7\2\2\u02c7\u02c8")
        buf.write("\7e\2\2\u02c8\u02cc\5|?\b\u02c9\u02ca\f\23\2\2\u02ca\u02cc")
        buf.write("\5\u008aF\2\u02cb\u02a8\3\2\2\2\u02cb\u02ab\3\2\2\2\u02cb")
        buf.write("\u02ae\3\2\2\2\u02cb\u02b1\3\2\2\2\u02cb\u02b4\3\2\2\2")
        buf.write("\u02cb\u02b7\3\2\2\2\u02cb\u02ba\3\2\2\2\u02cb\u02bd\3")
        buf.write("\2\2\2\u02cb\u02c0\3\2\2\2\u02cb\u02c3\3\2\2\2\u02cb\u02c6")
        buf.write("\3\2\2\2\u02cb\u02c9\3\2\2\2\u02cc\u02cf\3\2\2\2\u02cd")
        buf.write("\u02cb\3\2\2\2\u02cd\u02ce\3\2\2\2\u02ce}\3\2\2\2\u02cf")
        buf.write("\u02cd\3\2\2\2\u02d0\u02d5\5|?\2\u02d1\u02d2\7^\2\2\u02d2")
        buf.write("\u02d4\5|?\2\u02d3\u02d1\3\2\2\2\u02d4\u02d7\3\2\2\2\u02d5")
        buf.write("\u02d3\3\2\2\2\u02d5\u02d6\3\2\2\2\u02d6\177\3\2\2\2\u02d7")
        buf.write("\u02d5\3\2\2\2\u02d8\u02dc\5\u0088E\2\u02d9\u02dc\5|?")
        buf.write("\2\u02da\u02dc\5\u0082B\2\u02db\u02d8\3\2\2\2\u02db\u02d9")
        buf.write("\3\2\2\2\u02db\u02da\3\2\2\2\u02dc\u0081\3\2\2\2\u02dd")
        buf.write("\u02de\7N\2\2\u02de\u02df\5\u009cO\2\u02df\u0083\3\2\2")
        buf.write("\2\u02e0\u02e2\5|?\2\u02e1\u02e0\3\2\2\2\u02e1\u02e2\3")
        buf.write("\2\2\2\u02e2\u02e3\3\2\2\2\u02e3\u02e5\7W\2\2\u02e4\u02e6")
        buf.write("\5|?\2\u02e5\u02e4\3\2\2\2\u02e5\u02e6\3\2\2\2\u02e6\u02e9")
        buf.write("\3\2\2\2\u02e7\u02e8\7W\2\2\u02e8\u02ea\5|?\2\u02e9\u02e7")
        buf.write("\3\2\2\2\u02e9\u02ea\3\2\2\2\u02ea\u0085\3\2\2\2\u02eb")
        buf.write("\u02ec\7S\2\2\u02ec\u02f1\5|?\2\u02ed\u02ee\7Z\2\2\u02ee")
        buf.write("\u02f0\5|?\2\u02ef\u02ed\3\2\2\2\u02f0\u02f3\3\2\2\2\u02f1")
        buf.write("\u02ef\3\2\2\2\u02f1\u02f2\3\2\2\2\u02f2\u02f5\3\2\2\2")
        buf.write("\u02f3\u02f1\3\2\2\2\u02f4\u02f6\7Z\2\2\u02f5\u02f4\3")
        buf.write("\2\2\2\u02f5\u02f6\3\2\2\2\u02f6\u02f7\3\2\2\2\u02f7\u02f8")
        buf.write("\7T\2\2\u02f8\u0087\3\2\2\2\u02f9\u02fc\7S\2\2\u02fa\u02fd")
        buf.write("\5|?\2\u02fb\u02fd\5\u0088E\2\u02fc\u02fa\3\2\2\2\u02fc")
        buf.write("\u02fb\3\2\2\2\u02fd\u0305\3\2\2\2\u02fe\u0301\7Z\2\2")
        buf.write("\u02ff\u0302\5|?\2\u0300\u0302\5\u0088E\2\u0301\u02ff")
        buf.write("\3\2\2\2\u0301\u0300\3\2\2\2\u0302\u0304\3\2\2\2\u0303")
        buf.write("\u02fe\3\2\2\2\u0304\u0307\3\2\2\2\u0305\u0303\3\2\2\2")
        buf.write("\u0305\u0306\3\2\2\2\u0306\u0309\3\2\2\2\u0307\u0305\3")
        buf.write("\2\2\2\u0308\u030a\7Z\2\2\u0309\u0308\3\2\2\2\u0309\u030a")
        buf.write("\3\2\2\2\u030a\u030b\3\2\2\2\u030b\u030c\7T\2\2\u030c")
        buf.write("\u0089\3\2\2\2\u030d\u0320\7Q\2\2\u030e\u0321\5\u0086")
        buf.write("D\2\u030f\u0312\5|?\2\u0310\u0312\5\u0084C\2\u0311\u030f")
        buf.write("\3\2\2\2\u0311\u0310\3\2\2\2\u0312\u031a\3\2\2\2\u0313")
        buf.write("\u0316\7Z\2\2\u0314\u0317\5|?\2\u0315\u0317\5\u0084C\2")
        buf.write("\u0316\u0314\3\2\2\2\u0316\u0315\3\2\2\2\u0317\u0319\3")
        buf.write("\2\2\2\u0318\u0313\3\2\2\2\u0319\u031c\3\2\2\2\u031a\u0318")
        buf.write("\3\2\2\2\u031a\u031b\3\2\2\2\u031b\u031e\3\2\2\2\u031c")
        buf.write("\u031a\3\2\2\2\u031d\u031f\7Z\2\2\u031e\u031d\3\2\2\2")
        buf.write("\u031e\u031f\3\2\2\2\u031f\u0321\3\2\2\2\u0320\u030e\3")
        buf.write("\2\2\2\u0320\u0311\3\2\2\2\u0321\u0322\3\2\2\2\u0322\u0323")
        buf.write("\7R\2\2\u0323\u008b\3\2\2\2\u0324\u0328\7u\2\2\u0325\u0327")
        buf.write("\5\u008aF\2\u0326\u0325\3\2\2\2\u0327\u032a\3\2\2\2\u0328")
        buf.write("\u0326\3\2\2\2\u0328\u0329\3\2\2\2\u0329\u008d\3\2\2\2")
        buf.write("\u032a\u0328\3\2\2\2\u032b\u032c\7\\\2\2\u032c\u032d\5")
        buf.write("\u0092J\2\u032d\u008f\3\2\2\2\u032e\u033c\7F\2\2\u032f")
        buf.write("\u0330\7G\2\2\u0330\u0331\7U\2\2\u0331\u0332\5|?\2\u0332")
        buf.write("\u0333\7V\2\2\u0333\u033c\3\2\2\2\u0334\u0339\t\17\2\2")
        buf.write("\u0335\u0336\7U\2\2\u0336\u0337\5|?\2\u0337\u0338\7V\2")
        buf.write("\2\u0338\u033a\3\2\2\2\u0339\u0335\3\2\2\2\u0339\u033a")
        buf.write("\3\2\2\2\u033a\u033c\3\2\2\2\u033b\u032e\3\2\2\2\u033b")
        buf.write("\u032f\3\2\2\2\u033b\u0334\3\2\2\2\u033c\u033d\3\2\2\2")
        buf.write("\u033d\u033e\7\25\2\2\u033e\u0091\3\2\2\2\u033f\u0341")
        buf.write("\7<\2\2\u0340\u0342\5\u009aN\2\u0341\u0340\3\2\2\2\u0341")
        buf.write("\u0342\3\2\2\2\u0342\u035e\3\2\2\2\u0343\u0345\7=\2\2")
        buf.write("\u0344\u0346\5\u009aN\2\u0345\u0344\3\2\2\2\u0345\u0346")
        buf.write("\3\2\2\2\u0346\u035e\3\2\2\2\u0347\u0349\7>\2\2\u0348")
        buf.write("\u034a\5\u009aN\2\u0349\u0348\3\2\2\2\u0349\u034a\3\2")
        buf.write("\2\2\u034a\u035e\3\2\2\2\u034b\u034d\7?\2\2\u034c\u034e")
        buf.write("\5\u009aN\2\u034d\u034c\3\2\2\2\u034d\u034e\3\2\2\2\u034e")
        buf.write("\u035e\3\2\2\2\u034f\u0351\7@\2\2\u0350\u0352\5\u009a")
        buf.write("N\2\u0351\u0350\3\2\2\2\u0351\u0352\3\2\2\2\u0352\u035e")
        buf.write("\3\2\2\2\u0353\u035e\7;\2\2\u0354\u035e\7C\2\2\u0355\u035e")
        buf.write("\7D\2\2\u0356\u035b\7A\2\2\u0357\u0358\7Q\2\2\u0358\u0359")
        buf.write("\5\u0092J\2\u0359\u035a\7R\2\2\u035a\u035c\3\2\2\2\u035b")
        buf.write("\u0357\3\2\2\2\u035b\u035c\3\2\2\2\u035c\u035e\3\2\2\2")
        buf.write("\u035d\u033f\3\2\2\2\u035d\u0343\3\2\2\2\u035d\u0347\3")
        buf.write("\2\2\2\u035d\u034b\3\2\2\2\u035d\u034f\3\2\2\2\u035d\u0353")
        buf.write("\3\2\2\2\u035d\u0354\3\2\2\2\u035d\u0355\3\2\2\2\u035d")
        buf.write("\u0356\3\2\2\2\u035e\u0093\3\2\2\2\u035f\u0361\79\2\2")
        buf.write("\u0360\u0362\5\u009aN\2\u0361\u0360\3\2\2\2\u0361\u0362")
        buf.write("\3\2\2\2\u0362\u0095\3\2\2\2\u0363\u0364\7B\2\2\u0364")
        buf.write("\u0365\7Q\2\2\u0365\u0366\5\u0092J\2\u0366\u0367\7Z\2")
        buf.write("\2\u0367\u0368\5\u00a6T\2\u0368\u0369\7R\2\2\u0369\u0097")
        buf.write("\3\2\2\2\u036a\u036b\t\20\2\2\u036b\u036c\7B\2\2\u036c")
        buf.write("\u036d\7Q\2\2\u036d\u036e\5\u0092J\2\u036e\u0373\7Z\2")
        buf.write("\2\u036f\u0374\5\u00a6T\2\u0370\u0371\7J\2\2\u0371\u0372")
        buf.write("\7[\2\2\u0372\u0374\5|?\2\u0373\u036f\3\2\2\2\u0373\u0370")
        buf.write("\3\2\2\2\u0374\u0375\3\2\2\2\u0375\u0376\7R\2\2\u0376")
        buf.write("\u0099\3\2\2\2\u0377\u0378\7Q\2\2\u0378\u0379\5|?\2\u0379")
        buf.write("\u037a\7R\2\2\u037a\u009b\3\2\2\2\u037b\u037e\5\u008c")
        buf.write("G\2\u037c\u037e\7v\2\2\u037d\u037b\3\2\2\2\u037d\u037c")
        buf.write("\3\2\2\2\u037e\u009d\3\2\2\2\u037f\u0386\5\u0092J\2\u0380")
        buf.write("\u0386\5\u0098M\2\u0381\u0383\7:\2\2\u0382\u0384\5\u009a")
        buf.write("N\2\u0383\u0382\3\2\2\2\u0383\u0384\3\2\2\2\u0384\u0386")
        buf.write("\3\2\2\2\u0385\u037f\3\2\2\2\u0385\u0380\3\2\2\2\u0385")
        buf.write("\u0381\3\2\2\2\u0386\u009f\3\2\2\2\u0387\u0388\t\21\2")
        buf.write("\2\u0388\u00a1\3\2\2\2\u0389\u038a\5\u0092J\2\u038a\u038b")
        buf.write("\7u\2\2\u038b\u0398\3\2\2\2\u038c\u038d\5\u0094K\2\u038d")
        buf.write("\u038e\7u\2\2\u038e\u0398\3\2\2\2\u038f\u0390\t\n\2\2")
        buf.write("\u0390\u0392\7u\2\2\u0391\u0393\5\u009aN\2\u0392\u0391")
        buf.write("\3\2\2\2\u0392\u0393\3\2\2\2\u0393\u0398\3\2\2\2\u0394")
        buf.write("\u0395\5\u0098M\2\u0395\u0396\7u\2\2\u0396\u0398\3\2\2")
        buf.write("\2\u0397\u0389\3\2\2\2\u0397\u038c\3\2\2\2\u0397\u038f")
        buf.write("\3\2\2\2\u0397\u0394\3\2\2\2\u0398\u00a3\3\2\2\2\u0399")
        buf.write("\u039e\5\u00a2R\2\u039a\u039b\7Z\2\2\u039b\u039d\5\u00a2")
        buf.write("R\2\u039c\u039a\3\2\2\2\u039d\u03a0\3\2\2\2\u039e\u039c")
        buf.write("\3\2\2\2\u039e\u039f\3\2\2\2\u039f\u03a2\3\2\2\2\u03a0")
        buf.write("\u039e\3\2\2\2\u03a1\u03a3\7Z\2\2\u03a2\u03a1\3\2\2\2")
        buf.write("\u03a2\u03a3\3\2\2\2\u03a3\u00a5\3\2\2\2\u03a4\u03a9\5")
        buf.write("|?\2\u03a5\u03a6\7Z\2\2\u03a6\u03a8\5|?\2\u03a7\u03a5")
        buf.write("\3\2\2\2\u03a8\u03ab\3\2\2\2\u03a9\u03a7\3\2\2\2\u03a9")
        buf.write("\u03aa\3\2\2\2\u03aa\u03ad\3\2\2\2\u03ab\u03a9\3\2\2\2")
        buf.write("\u03ac\u03ae\7Z\2\2\u03ad\u03ac\3\2\2\2\u03ad\u03ae\3")
        buf.write("\2\2\2\u03ae\u00a7\3\2\2\2\u03af\u03b4\5\u00a0Q\2\u03b0")
        buf.write("\u03b1\7Z\2\2\u03b1\u03b3\5\u00a0Q\2\u03b2\u03b0\3\2\2")
        buf.write("\2\u03b3\u03b6\3\2\2\2\u03b4\u03b2\3\2\2\2\u03b4\u03b5")
        buf.write("\3\2\2\2\u03b5\u03b8\3\2\2\2\u03b6\u03b4\3\2\2\2\u03b7")
        buf.write("\u03b9\7Z\2\2\u03b8\u03b7\3\2\2\2\u03b8\u03b9\3\2\2\2")
        buf.write("\u03b9\u00a9\3\2\2\2\u03ba\u03bf\7u\2\2\u03bb\u03bc\7")
        buf.write("Z\2\2\u03bc\u03be\7u\2\2\u03bd\u03bb\3\2\2\2\u03be\u03c1")
        buf.write("\3\2\2\2\u03bf\u03bd\3\2\2\2\u03bf\u03c0\3\2\2\2\u03c0")
        buf.write("\u03c3\3\2\2\2\u03c1\u03bf\3\2\2\2\u03c2\u03c4\7Z\2\2")
        buf.write("\u03c3\u03c2\3\2\2\2\u03c3\u03c4\3\2\2\2\u03c4\u00ab\3")
        buf.write("\2\2\2\u03c5\u03ca\5\u009cO\2\u03c6\u03c7\7Z\2\2\u03c7")
        buf.write("\u03c9\5\u009cO\2\u03c8\u03c6\3\2\2\2\u03c9\u03cc\3\2")
        buf.write("\2\2\u03ca\u03c8\3\2\2\2\u03ca\u03cb\3\2\2\2\u03cb\u03ce")
        buf.write("\3\2\2\2\u03cc\u03ca\3\2\2\2\u03cd\u03cf\7Z\2\2\u03ce")
        buf.write("\u03cd\3\2\2\2\u03ce\u03cf\3\2\2\2\u03cf\u00ad\3\2\2\2")
        buf.write("\u03d0\u03d5\5\u009eP\2\u03d1\u03d2\7Z\2\2\u03d2\u03d4")
        buf.write("\5\u009eP\2\u03d3\u03d1\3\2\2\2\u03d4\u03d7\3\2\2\2\u03d5")
        buf.write("\u03d3\3\2\2\2\u03d5\u03d6\3\2\2\2\u03d6\u03d9\3\2\2\2")
        buf.write("\u03d7\u03d5\3\2\2\2\u03d8\u03da\7Z\2\2\u03d9\u03d8\3")
        buf.write("\2\2\2\u03d9\u03da\3\2\2\2\u03da\u00af\3\2\2\2n\u00b3")
        buf.write("\u00c2\u00cd\u00da\u00e2\u00eb\u00ef\u00fb\u0104\u010e")
        buf.write("\u0112\u0122\u0126\u012b\u012e\u0140\u0147\u014f\u0155")
        buf.write("\u015a\u0167\u0185\u0187\u018b\u0191\u019b\u01b8\u01c3")
        buf.write("\u01c8\u01d4\u01da\u01e1\u01e8\u01ee\u01f1\u01f4\u01fc")
        buf.write("\u0202\u0205\u0208\u020b\u020e\u0213\u0223\u0228\u0236")
        buf.write("\u023e\u024a\u024e\u0256\u025a\u0262\u0265\u026e\u0279")
        buf.write("\u027c\u0280\u0286\u0294\u02a2\u02a6\u02cb\u02cd\u02d5")
        buf.write("\u02db\u02e1\u02e5\u02e9\u02f1\u02f5\u02fc\u0301\u0305")
        buf.write("\u0309\u0311\u0316\u031a\u031e\u0320\u0328\u0339\u033b")
        buf.write("\u0341\u0345\u0349\u034d\u0351\u035b\u035d\u0361\u0373")
        buf.write("\u037d\u0383\u0385\u0392\u0397\u039e\u03a2\u03a9\u03ad")
        buf.write("\u03b4\u03b8\u03bf\u03c3\u03ca\u03ce\u03d5\u03d9")
        return buf.getvalue()


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

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

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




    class BraketPragmaContext(ParserRuleContext):

        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 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 = 177
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 174
                self.braketResultPragma()
                pass

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

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 176
                self.braketNoisePragma()
                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):

        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 = 179
            self.match(BraketPragmasParser.BRAKET)
            self.state = 180
            self.match(BraketPragmasParser.UNITARY)
            self.state = 181
            self.match(BraketPragmasParser.LPAREN)
            self.state = 182
            self.twoDimMatrix()
            self.state = 183
            self.match(BraketPragmasParser.RPAREN)
            self.state = 184
            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 TwoDimMatrixContext(ParserRuleContext):

        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, 4, self.RULE_twoDimMatrix)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 186
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 187
            self.row()
            self.state = 192
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BraketPragmasParser.COMMA:
                self.state = 188
                self.match(BraketPragmasParser.COMMA)
                self.state = 189
                self.row()
                self.state = 194
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 195
            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):

        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, 6, self.RULE_row)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 197
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 198
            self.complexNumber()
            self.state = 203
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BraketPragmasParser.COMMA:
                self.state = 199
                self.match(BraketPragmasParser.COMMA)
                self.state = 200
                self.complexNumber()
                self.state = 205
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 206
            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):

        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, 8, self.RULE_braketResultPragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 208
            self.match(BraketPragmasParser.BRAKET)
            self.state = 209
            self.match(BraketPragmasParser.RESULT)
            self.state = 210
            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):

        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, 10, self.RULE_resultType)
        try:
            self.state = 216
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.STATE_VECTOR]:
                self.enterOuterAlt(localctx, 1)
                self.state = 212
                self.noArgResultType()
                pass
            elif token in [BraketPragmasParser.PROBABILITY, BraketPragmasParser.DENSITY_MATRIX]:
                self.enterOuterAlt(localctx, 2)
                self.state = 213
                self.optionalMultiTargetResultType()
                pass
            elif token in [BraketPragmasParser.AMPLITUDE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 214
                self.multiStateResultType()
                pass
            elif token in [BraketPragmasParser.EXPECTATION, BraketPragmasParser.VARIANCE, BraketPragmasParser.SAMPLE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 215
                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):

        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, 12, self.RULE_noArgResultType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 218
            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):

        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, 14, self.RULE_noArgResultTypeName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 220
            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):

        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, 16, self.RULE_optionalMultiTargetResultType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 222
            self.optionalMultiTargetResultTypeName()
            self.state = 224
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.ALL or _la==BraketPragmasParser.Identifier:
                self.state = 223
                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):

        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, 18, self.RULE_optionalMultiTargetResultTypeName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 226
            _la = self._input.LA(1)
            if not(_la==BraketPragmasParser.PROBABILITY or _la==BraketPragmasParser.DENSITY_MATRIX):
                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):

        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, 20, self.RULE_multiTarget)
        self._la = 0 # Token type
        try:
            self.state = 237
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.Identifier]:
                localctx = BraketPragmasParser.MultiTargetIdentifiersContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 228
                self.indexedIdentifier()
                self.state = 233
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BraketPragmasParser.COMMA:
                    self.state = 229
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 230
                    self.indexedIdentifier()
                    self.state = 235
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [BraketPragmasParser.ALL]:
                localctx = BraketPragmasParser.MultiTargetAllContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 236
                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):

        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, 22, self.RULE_multiStateResultType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 239
            self.multiStateResultTypeName()
            self.state = 240
            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):

        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, 24, self.RULE_multiStateResultTypeName)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 242
            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):

        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, 26, self.RULE_multiState)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 244
            self.match(BraketPragmasParser.BitstringLiteral)
            self.state = 249
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BraketPragmasParser.COMMA:
                self.state = 245
                self.match(BraketPragmasParser.COMMA)
                self.state = 246
                self.match(BraketPragmasParser.BitstringLiteral)
                self.state = 251
                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):

        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, 28, self.RULE_observableResultType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 252
            self.observableResultTypeName()
            self.state = 253
            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):

        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, 30, self.RULE_observable)
        try:
            self.state = 258
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 255
                self.standardObservable()
                pass

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

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 257
                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):

        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, 32, self.RULE_standardObservable)
        try:
            self.state = 268
            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 = 260
                self.standardObservableName()
                self.state = 261
                self.match(BraketPragmasParser.LPAREN)
                self.state = 262
                self.indexedIdentifier()
                self.state = 263
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 2:
                localctx = BraketPragmasParser.StandardObservableAllContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 265
                self.standardObservableName()
                self.state = 266
                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):

        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, 34, self.RULE_tensorProductObservable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 272
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.X, BraketPragmasParser.Y, BraketPragmasParser.Z, BraketPragmasParser.I, BraketPragmasParser.H]:
                self.state = 270
                self.standardObservable()
                pass
            elif token in [BraketPragmasParser.HERMITIAN]:
                self.state = 271
                self.hermitianObservable()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 274
            self.match(BraketPragmasParser.AT)
            self.state = 275
            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):

        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, 36, self.RULE_hermitianObservable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 277
            self.match(BraketPragmasParser.HERMITIAN)
            self.state = 278
            self.match(BraketPragmasParser.LPAREN)
            self.state = 279
            self.twoDimMatrix()
            self.state = 280
            self.match(BraketPragmasParser.RPAREN)
            self.state = 281
            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):

        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, 38, self.RULE_observableResultTypeName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 283
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BraketPragmasParser.EXPECTATION) | (1 << BraketPragmasParser.VARIANCE) | (1 << BraketPragmasParser.SAMPLE))) != 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):

        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, 40, self.RULE_standardObservableName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 285
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BraketPragmasParser.X) | (1 << BraketPragmasParser.Y) | (1 << BraketPragmasParser.Z) | (1 << BraketPragmasParser.I) | (1 << BraketPragmasParser.H))) != 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):

        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, 42, self.RULE_complexNumber)
        self._la = 0 # Token type
        try:
            self.state = 300
            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 = 288
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.MINUS:
                    self.state = 287
                    localctx.neg = self.match(BraketPragmasParser.MINUS)


                self.state = 290
                localctx.value = self._input.LT(1)
                _la = self._input.LA(1)
                if not(((((_la - 110)) & ~0x3f) == 0 and ((1 << (_la - 110)) & ((1 << (BraketPragmasParser.ImaginaryLiteral - 110)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 110)) | (1 << (BraketPragmasParser.FloatLiteral - 110)))) != 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 = 292
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.MINUS:
                    self.state = 291
                    localctx.neg = self.match(BraketPragmasParser.MINUS)


                self.state = 294
                localctx.real = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==BraketPragmasParser.DecimalIntegerLiteral or _la==BraketPragmasParser.FloatLiteral):
                    localctx.real = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 295
                localctx.sign = self._input.LT(1)
                _la = self._input.LA(1)
                if not(_la==BraketPragmasParser.PLUS or _la==BraketPragmasParser.MINUS):
                    localctx.sign = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 297
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.MINUS:
                    self.state = 296
                    localctx.imagNeg = self.match(BraketPragmasParser.MINUS)


                self.state = 299
                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):

        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, 44, self.RULE_braketNoisePragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 302
            self.match(BraketPragmasParser.BRAKET)
            self.state = 303
            self.match(BraketPragmasParser.NOISE)
            self.state = 304
            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):

        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, 46, self.RULE_noiseInstruction)
        try:
            self.state = 318
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BIT_FLIP, BraketPragmasParser.PHASE_FLIP, BraketPragmasParser.PAULI_CHANNEL, BraketPragmasParser.DEPOLARIZING, BraketPragmasParser.TWO_QUBIT_DEPOLARIZING, BraketPragmasParser.TWO_QUBIT_DEPHASING, BraketPragmasParser.AMPLITUDE_DAMPING, BraketPragmasParser.GENERALIZED_AMPLITUDE_DAMPING, BraketPragmasParser.PHASE_DAMPING]:
                localctx = BraketPragmasParser.NoiseContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 306
                self.noiseInstructionName()
                self.state = 307
                self.match(BraketPragmasParser.LPAREN)
                self.state = 308
                self.probabilities()
                self.state = 309
                self.match(BraketPragmasParser.RPAREN)
                self.state = 310
                localctx.target = self.multiTarget()
                pass
            elif token in [BraketPragmasParser.KRAUS]:
                localctx = BraketPragmasParser.KrausContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 312
                self.match(BraketPragmasParser.KRAUS)
                self.state = 313
                self.match(BraketPragmasParser.LPAREN)
                self.state = 314
                self.matrices()
                self.state = 315
                self.match(BraketPragmasParser.RPAREN)
                self.state = 316
                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):

        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, 48, self.RULE_matrices)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 320
            self.twoDimMatrix()
            self.state = 325
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BraketPragmasParser.COMMA:
                self.state = 321
                self.match(BraketPragmasParser.COMMA)
                self.state = 322
                self.twoDimMatrix()
                self.state = 327
                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):

        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, 50, self.RULE_probabilities)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 328
            self.match(BraketPragmasParser.FloatLiteral)
            self.state = 333
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BraketPragmasParser.COMMA:
                self.state = 329
                self.match(BraketPragmasParser.COMMA)
                self.state = 330
                self.match(BraketPragmasParser.FloatLiteral)
                self.state = 335
                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):

        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, 52, self.RULE_noiseInstructionName)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 336
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BraketPragmasParser.BIT_FLIP) | (1 << BraketPragmasParser.PHASE_FLIP) | (1 << BraketPragmasParser.PAULI_CHANNEL) | (1 << BraketPragmasParser.DEPOLARIZING) | (1 << BraketPragmasParser.TWO_QUBIT_DEPOLARIZING) | (1 << BraketPragmasParser.TWO_QUBIT_DEPHASING) | (1 << BraketPragmasParser.AMPLITUDE_DAMPING) | (1 << BraketPragmasParser.GENERALIZED_AMPLITUDE_DAMPING) | (1 << BraketPragmasParser.PHASE_DAMPING))) != 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):

        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, 54, self.RULE_program)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 339
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.OPENQASM:
                self.state = 338
                self.version()


            self.state = 344
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BraketPragmasParser.INCLUDE) | (1 << BraketPragmasParser.DEFCALGRAMMAR) | (1 << BraketPragmasParser.DEF) | (1 << BraketPragmasParser.DEFCAL) | (1 << BraketPragmasParser.GATE) | (1 << BraketPragmasParser.EXTERN) | (1 << BraketPragmasParser.BOX) | (1 << BraketPragmasParser.LET) | (1 << BraketPragmasParser.BREAK) | (1 << BraketPragmasParser.CONTINUE) | (1 << BraketPragmasParser.IF) | (1 << BraketPragmasParser.END) | (1 << BraketPragmasParser.RETURN) | (1 << BraketPragmasParser.FOR) | (1 << BraketPragmasParser.WHILE) | (1 << BraketPragmasParser.PRAGMA) | (1 << BraketPragmasParser.AnnotationKeyword) | (1 << BraketPragmasParser.INPUT) | (1 << BraketPragmasParser.OUTPUT) | (1 << BraketPragmasParser.CONST) | (1 << BraketPragmasParser.QREG) | (1 << BraketPragmasParser.QUBIT) | (1 << BraketPragmasParser.CREG) | (1 << BraketPragmasParser.BOOL) | (1 << BraketPragmasParser.BIT) | (1 << BraketPragmasParser.INT) | (1 << BraketPragmasParser.UINT) | (1 << BraketPragmasParser.FLOAT) | (1 << BraketPragmasParser.ANGLE) | (1 << BraketPragmasParser.COMPLEX))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (BraketPragmasParser.ARRAY - 64)) | (1 << (BraketPragmasParser.DURATION - 64)) | (1 << (BraketPragmasParser.STRETCH - 64)) | (1 << (BraketPragmasParser.GPHASE - 64)) | (1 << (BraketPragmasParser.INV - 64)) | (1 << (BraketPragmasParser.POW - 64)) | (1 << (BraketPragmasParser.CTRL - 64)) | (1 << (BraketPragmasParser.NEGCTRL - 64)) | (1 << (BraketPragmasParser.DURATIONOF - 64)) | (1 << (BraketPragmasParser.DELAY - 64)) | (1 << (BraketPragmasParser.RESET - 64)) | (1 << (BraketPragmasParser.MEASURE - 64)) | (1 << (BraketPragmasParser.BARRIER - 64)) | (1 << (BraketPragmasParser.BooleanLiteral - 64)) | (1 << (BraketPragmasParser.LPAREN - 64)) | (1 << (BraketPragmasParser.MINUS - 64)) | (1 << (BraketPragmasParser.TILDE - 64)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 64)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 64)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 64)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 64)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 64)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 64)) | (1 << (BraketPragmasParser.Identifier - 64)) | (1 << (BraketPragmasParser.HardwareQubit - 64)) | (1 << (BraketPragmasParser.FloatLiteral - 64)) | (1 << (BraketPragmasParser.TimingLiteral - 64)) | (1 << (BraketPragmasParser.BitstringLiteral - 64)))) != 0):
                self.state = 341
                self.statement()
                self.state = 346
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 347
            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):

        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, 56, self.RULE_version)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 349
            self.match(BraketPragmasParser.OPENQASM)
            self.state = 350
            self.match(BraketPragmasParser.VersionSpecifier)
            self.state = 351
            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):

        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, 58, self.RULE_statement)
        self._la = 0 # Token type
        try:
            self.state = 389
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.PRAGMA]:
                self.enterOuterAlt(localctx, 1)
                self.state = 353
                self.pragma()
                pass
            elif token in [BraketPragmasParser.INCLUDE, BraketPragmasParser.DEFCALGRAMMAR, BraketPragmasParser.DEF, BraketPragmasParser.DEFCAL, BraketPragmasParser.GATE, BraketPragmasParser.EXTERN, BraketPragmasParser.BOX, BraketPragmasParser.LET, BraketPragmasParser.BREAK, BraketPragmasParser.CONTINUE, BraketPragmasParser.IF, BraketPragmasParser.END, BraketPragmasParser.RETURN, BraketPragmasParser.FOR, BraketPragmasParser.WHILE, BraketPragmasParser.AnnotationKeyword, BraketPragmasParser.INPUT, BraketPragmasParser.OUTPUT, BraketPragmasParser.CONST, BraketPragmasParser.QREG, BraketPragmasParser.QUBIT, BraketPragmasParser.CREG, BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.GPHASE, BraketPragmasParser.INV, BraketPragmasParser.POW, BraketPragmasParser.CTRL, BraketPragmasParser.NEGCTRL, BraketPragmasParser.DURATIONOF, BraketPragmasParser.DELAY, BraketPragmasParser.RESET, BraketPragmasParser.MEASURE, BraketPragmasParser.BARRIER, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.enterOuterAlt(localctx, 2)
                self.state = 357
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==BraketPragmasParser.AnnotationKeyword:
                    self.state = 354
                    self.annotation()
                    self.state = 359
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                elif la_ == 27:
                    self.state = 386
                    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):

        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, 60, self.RULE_annotation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 391
            self.match(BraketPragmasParser.AnnotationKeyword)
            self.state = 393
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.RemainingLineContent:
                self.state = 392
                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):

        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, 62, self.RULE_scope)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 395
            self.match(BraketPragmasParser.LBRACE)
            self.state = 399
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << BraketPragmasParser.INCLUDE) | (1 << BraketPragmasParser.DEFCALGRAMMAR) | (1 << BraketPragmasParser.DEF) | (1 << BraketPragmasParser.DEFCAL) | (1 << BraketPragmasParser.GATE) | (1 << BraketPragmasParser.EXTERN) | (1 << BraketPragmasParser.BOX) | (1 << BraketPragmasParser.LET) | (1 << BraketPragmasParser.BREAK) | (1 << BraketPragmasParser.CONTINUE) | (1 << BraketPragmasParser.IF) | (1 << BraketPragmasParser.END) | (1 << BraketPragmasParser.RETURN) | (1 << BraketPragmasParser.FOR) | (1 << BraketPragmasParser.WHILE) | (1 << BraketPragmasParser.PRAGMA) | (1 << BraketPragmasParser.AnnotationKeyword) | (1 << BraketPragmasParser.INPUT) | (1 << BraketPragmasParser.OUTPUT) | (1 << BraketPragmasParser.CONST) | (1 << BraketPragmasParser.QREG) | (1 << BraketPragmasParser.QUBIT) | (1 << BraketPragmasParser.CREG) | (1 << BraketPragmasParser.BOOL) | (1 << BraketPragmasParser.BIT) | (1 << BraketPragmasParser.INT) | (1 << BraketPragmasParser.UINT) | (1 << BraketPragmasParser.FLOAT) | (1 << BraketPragmasParser.ANGLE) | (1 << BraketPragmasParser.COMPLEX))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (BraketPragmasParser.ARRAY - 64)) | (1 << (BraketPragmasParser.DURATION - 64)) | (1 << (BraketPragmasParser.STRETCH - 64)) | (1 << (BraketPragmasParser.GPHASE - 64)) | (1 << (BraketPragmasParser.INV - 64)) | (1 << (BraketPragmasParser.POW - 64)) | (1 << (BraketPragmasParser.CTRL - 64)) | (1 << (BraketPragmasParser.NEGCTRL - 64)) | (1 << (BraketPragmasParser.DURATIONOF - 64)) | (1 << (BraketPragmasParser.DELAY - 64)) | (1 << (BraketPragmasParser.RESET - 64)) | (1 << (BraketPragmasParser.MEASURE - 64)) | (1 << (BraketPragmasParser.BARRIER - 64)) | (1 << (BraketPragmasParser.BooleanLiteral - 64)) | (1 << (BraketPragmasParser.LPAREN - 64)) | (1 << (BraketPragmasParser.MINUS - 64)) | (1 << (BraketPragmasParser.TILDE - 64)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 64)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 64)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 64)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 64)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 64)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 64)) | (1 << (BraketPragmasParser.Identifier - 64)) | (1 << (BraketPragmasParser.HardwareQubit - 64)) | (1 << (BraketPragmasParser.FloatLiteral - 64)) | (1 << (BraketPragmasParser.TimingLiteral - 64)) | (1 << (BraketPragmasParser.BitstringLiteral - 64)))) != 0):
                self.state = 396
                self.statement()
                self.state = 401
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 402
            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):

        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, 64, self.RULE_pragma)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 404
            self.match(BraketPragmasParser.PRAGMA)
            self.state = 405
            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):

        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, 66, self.RULE_statementOrScope)
        try:
            self.state = 409
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.INCLUDE, BraketPragmasParser.DEFCALGRAMMAR, BraketPragmasParser.DEF, BraketPragmasParser.DEFCAL, BraketPragmasParser.GATE, BraketPragmasParser.EXTERN, BraketPragmasParser.BOX, BraketPragmasParser.LET, BraketPragmasParser.BREAK, BraketPragmasParser.CONTINUE, BraketPragmasParser.IF, BraketPragmasParser.END, BraketPragmasParser.RETURN, BraketPragmasParser.FOR, BraketPragmasParser.WHILE, BraketPragmasParser.PRAGMA, BraketPragmasParser.AnnotationKeyword, BraketPragmasParser.INPUT, BraketPragmasParser.OUTPUT, BraketPragmasParser.CONST, BraketPragmasParser.QREG, BraketPragmasParser.QUBIT, BraketPragmasParser.CREG, BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.GPHASE, BraketPragmasParser.INV, BraketPragmasParser.POW, BraketPragmasParser.CTRL, BraketPragmasParser.NEGCTRL, BraketPragmasParser.DURATIONOF, BraketPragmasParser.DELAY, BraketPragmasParser.RESET, BraketPragmasParser.MEASURE, BraketPragmasParser.BARRIER, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.enterOuterAlt(localctx, 1)
                self.state = 407
                self.statement()
                pass
            elif token in [BraketPragmasParser.LBRACE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 408
                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):

        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, 68, self.RULE_calibrationGrammarStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 411
            self.match(BraketPragmasParser.DEFCALGRAMMAR)
            self.state = 412
            self.match(BraketPragmasParser.StringLiteral)
            self.state = 413
            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):

        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, 70, self.RULE_includeStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 415
            self.match(BraketPragmasParser.INCLUDE)
            self.state = 416
            self.match(BraketPragmasParser.StringLiteral)
            self.state = 417
            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):

        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, 72, self.RULE_breakStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 419
            self.match(BraketPragmasParser.BREAK)
            self.state = 420
            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):

        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, 74, self.RULE_continueStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 422
            self.match(BraketPragmasParser.CONTINUE)
            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 EndStatementContext(ParserRuleContext):

        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, 76, self.RULE_endStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 425
            self.match(BraketPragmasParser.END)
            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 ForStatementContext(ParserRuleContext):

        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, 78, self.RULE_forStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 428
            self.match(BraketPragmasParser.FOR)
            self.state = 429
            self.scalarType()
            self.state = 430
            self.match(BraketPragmasParser.Identifier)
            self.state = 431
            self.match(BraketPragmasParser.IN)
            self.state = 438
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.LBRACE]:
                self.state = 432
                self.setExpression()
                pass
            elif token in [BraketPragmasParser.LBRACKET]:
                self.state = 433
                self.match(BraketPragmasParser.LBRACKET)
                self.state = 434
                self.rangeExpression()
                self.state = 435
                self.match(BraketPragmasParser.RBRACKET)
                pass
            elif token in [BraketPragmasParser.Identifier]:
                self.state = 437
                self.match(BraketPragmasParser.Identifier)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 440
            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):

        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, 80, self.RULE_ifStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 442
            self.match(BraketPragmasParser.IF)
            self.state = 443
            self.match(BraketPragmasParser.LPAREN)
            self.state = 444
            self.expression(0)
            self.state = 445
            self.match(BraketPragmasParser.RPAREN)
            self.state = 446
            localctx.if_body = self.statementOrScope()
            self.state = 449
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
            if la_ == 1:
                self.state = 447
                self.match(BraketPragmasParser.ELSE)
                self.state = 448
                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):

        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, 82, self.RULE_returnStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 451
            self.match(BraketPragmasParser.RETURN)
            self.state = 454
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.DURATIONOF, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.state = 452
                self.expression(0)
                pass
            elif token in [BraketPragmasParser.MEASURE]:
                self.state = 453
                self.measureExpression()
                pass
            elif token in [BraketPragmasParser.SEMICOLON]:
                pass
            else:
                pass
            self.state = 456
            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):

        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, 84, self.RULE_whileStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 458
            self.match(BraketPragmasParser.WHILE)
            self.state = 459
            self.match(BraketPragmasParser.LPAREN)
            self.state = 460
            self.expression(0)
            self.state = 461
            self.match(BraketPragmasParser.RPAREN)
            self.state = 462
            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):

        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, 86, self.RULE_barrierStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 464
            self.match(BraketPragmasParser.BARRIER)
            self.state = 466
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.Identifier or _la==BraketPragmasParser.HardwareQubit:
                self.state = 465
                self.gateOperandList()


            self.state = 468
            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):

        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, 88, self.RULE_boxStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 470
            self.match(BraketPragmasParser.BOX)
            self.state = 472
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.LBRACKET:
                self.state = 471
                self.designator()


            self.state = 474
            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):

        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, 90, self.RULE_delayStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 476
            self.match(BraketPragmasParser.DELAY)
            self.state = 477
            self.designator()
            self.state = 479
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.Identifier or _la==BraketPragmasParser.HardwareQubit:
                self.state = 478
                self.gateOperandList()


            self.state = 481
            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):

        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, 92, self.RULE_gateCallStatement)
        self._la = 0 # Token type
        try:
            self.state = 524
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,41,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 486
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 68)) & ~0x3f) == 0 and ((1 << (_la - 68)) & ((1 << (BraketPragmasParser.INV - 68)) | (1 << (BraketPragmasParser.POW - 68)) | (1 << (BraketPragmasParser.CTRL - 68)) | (1 << (BraketPragmasParser.NEGCTRL - 68)))) != 0):
                    self.state = 483
                    self.gateModifier()
                    self.state = 488
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 489
                self.match(BraketPragmasParser.Identifier)
                self.state = 495
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LPAREN:
                    self.state = 490
                    self.match(BraketPragmasParser.LPAREN)
                    self.state = 492
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if ((((_la - 57)) & ~0x3f) == 0 and ((1 << (_la - 57)) & ((1 << (BraketPragmasParser.BOOL - 57)) | (1 << (BraketPragmasParser.BIT - 57)) | (1 << (BraketPragmasParser.INT - 57)) | (1 << (BraketPragmasParser.UINT - 57)) | (1 << (BraketPragmasParser.FLOAT - 57)) | (1 << (BraketPragmasParser.ANGLE - 57)) | (1 << (BraketPragmasParser.COMPLEX - 57)) | (1 << (BraketPragmasParser.ARRAY - 57)) | (1 << (BraketPragmasParser.DURATION - 57)) | (1 << (BraketPragmasParser.STRETCH - 57)) | (1 << (BraketPragmasParser.DURATIONOF - 57)) | (1 << (BraketPragmasParser.BooleanLiteral - 57)) | (1 << (BraketPragmasParser.LPAREN - 57)) | (1 << (BraketPragmasParser.MINUS - 57)) | (1 << (BraketPragmasParser.TILDE - 57)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 57)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 57)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 57)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 57)) | (1 << (BraketPragmasParser.Identifier - 57)) | (1 << (BraketPragmasParser.HardwareQubit - 57)) | (1 << (BraketPragmasParser.FloatLiteral - 57)) | (1 << (BraketPragmasParser.TimingLiteral - 57)) | (1 << (BraketPragmasParser.BitstringLiteral - 57)))) != 0):
                        self.state = 491
                        self.expressionList()


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


                self.state = 498
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 497
                    self.designator()


                self.state = 500
                self.gateOperandList()
                self.state = 501
                self.match(BraketPragmasParser.SEMICOLON)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 506
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 68)) & ~0x3f) == 0 and ((1 << (_la - 68)) & ((1 << (BraketPragmasParser.INV - 68)) | (1 << (BraketPragmasParser.POW - 68)) | (1 << (BraketPragmasParser.CTRL - 68)) | (1 << (BraketPragmasParser.NEGCTRL - 68)))) != 0):
                    self.state = 503
                    self.gateModifier()
                    self.state = 508
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 509
                self.match(BraketPragmasParser.GPHASE)
                self.state = 515
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LPAREN:
                    self.state = 510
                    self.match(BraketPragmasParser.LPAREN)
                    self.state = 512
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if ((((_la - 57)) & ~0x3f) == 0 and ((1 << (_la - 57)) & ((1 << (BraketPragmasParser.BOOL - 57)) | (1 << (BraketPragmasParser.BIT - 57)) | (1 << (BraketPragmasParser.INT - 57)) | (1 << (BraketPragmasParser.UINT - 57)) | (1 << (BraketPragmasParser.FLOAT - 57)) | (1 << (BraketPragmasParser.ANGLE - 57)) | (1 << (BraketPragmasParser.COMPLEX - 57)) | (1 << (BraketPragmasParser.ARRAY - 57)) | (1 << (BraketPragmasParser.DURATION - 57)) | (1 << (BraketPragmasParser.STRETCH - 57)) | (1 << (BraketPragmasParser.DURATIONOF - 57)) | (1 << (BraketPragmasParser.BooleanLiteral - 57)) | (1 << (BraketPragmasParser.LPAREN - 57)) | (1 << (BraketPragmasParser.MINUS - 57)) | (1 << (BraketPragmasParser.TILDE - 57)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 57)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 57)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 57)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 57)) | (1 << (BraketPragmasParser.Identifier - 57)) | (1 << (BraketPragmasParser.HardwareQubit - 57)) | (1 << (BraketPragmasParser.FloatLiteral - 57)) | (1 << (BraketPragmasParser.TimingLiteral - 57)) | (1 << (BraketPragmasParser.BitstringLiteral - 57)))) != 0):
                        self.state = 511
                        self.expressionList()


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


                self.state = 518
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 517
                    self.designator()


                self.state = 521
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.Identifier or _la==BraketPragmasParser.HardwareQubit:
                    self.state = 520
                    self.gateOperandList()


                self.state = 523
                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):

        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, 94, self.RULE_measureArrowAssignmentStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 526
            self.measureExpression()
            self.state = 529
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.ARROW:
                self.state = 527
                self.match(BraketPragmasParser.ARROW)
                self.state = 528
                self.indexedIdentifier()


            self.state = 531
            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):

        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, 96, self.RULE_resetStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 533
            self.match(BraketPragmasParser.RESET)
            self.state = 534
            self.gateOperand()
            self.state = 535
            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):

        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, 98, self.RULE_aliasDeclarationStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 537
            self.match(BraketPragmasParser.LET)
            self.state = 538
            self.match(BraketPragmasParser.Identifier)
            self.state = 539
            self.match(BraketPragmasParser.EQUALS)
            self.state = 540
            self.aliasExpression()
            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 ClassicalDeclarationStatementContext(ParserRuleContext):

        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, 100, self.RULE_classicalDeclarationStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 545
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH]:
                self.state = 543
                self.scalarType()
                pass
            elif token in [BraketPragmasParser.ARRAY]:
                self.state = 544
                self.arrayType()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 547
            self.match(BraketPragmasParser.Identifier)
            self.state = 550
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.EQUALS:
                self.state = 548
                self.match(BraketPragmasParser.EQUALS)
                self.state = 549
                self.declarationExpression()


            self.state = 552
            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):

        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, 102, self.RULE_constDeclarationStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 554
            self.match(BraketPragmasParser.CONST)
            self.state = 555
            self.scalarType()
            self.state = 556
            self.match(BraketPragmasParser.Identifier)
            self.state = 557
            self.match(BraketPragmasParser.EQUALS)
            self.state = 558
            self.declarationExpression()
            self.state = 559
            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):

        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, 104, self.RULE_ioDeclarationStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 561
            _la = self._input.LA(1)
            if not(_la==BraketPragmasParser.INPUT or _la==BraketPragmasParser.OUTPUT):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 564
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH]:
                self.state = 562
                self.scalarType()
                pass
            elif token in [BraketPragmasParser.ARRAY]:
                self.state = 563
                self.arrayType()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 566
            self.match(BraketPragmasParser.Identifier)
            self.state = 567
            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):

        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, 106, self.RULE_oldStyleDeclarationStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 569
            _la = self._input.LA(1)
            if not(_la==BraketPragmasParser.QREG or _la==BraketPragmasParser.CREG):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 570
            self.match(BraketPragmasParser.Identifier)
            self.state = 572
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.LBRACKET:
                self.state = 571
                self.designator()


            self.state = 574
            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):

        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, 108, self.RULE_quantumDeclarationStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 576
            self.qubitType()
            self.state = 577
            self.match(BraketPragmasParser.Identifier)
            self.state = 578
            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):

        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, 110, self.RULE_defStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 580
            self.match(BraketPragmasParser.DEF)
            self.state = 581
            self.match(BraketPragmasParser.Identifier)
            self.state = 582
            self.match(BraketPragmasParser.LPAREN)
            self.state = 584
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 52)) & ~0x3f) == 0 and ((1 << (_la - 52)) & ((1 << (BraketPragmasParser.CONST - 52)) | (1 << (BraketPragmasParser.MUTABLE - 52)) | (1 << (BraketPragmasParser.QREG - 52)) | (1 << (BraketPragmasParser.QUBIT - 52)) | (1 << (BraketPragmasParser.CREG - 52)) | (1 << (BraketPragmasParser.BOOL - 52)) | (1 << (BraketPragmasParser.BIT - 52)) | (1 << (BraketPragmasParser.INT - 52)) | (1 << (BraketPragmasParser.UINT - 52)) | (1 << (BraketPragmasParser.FLOAT - 52)) | (1 << (BraketPragmasParser.ANGLE - 52)) | (1 << (BraketPragmasParser.COMPLEX - 52)) | (1 << (BraketPragmasParser.DURATION - 52)) | (1 << (BraketPragmasParser.STRETCH - 52)))) != 0):
                self.state = 583
                self.argumentDefinitionList()


            self.state = 586
            self.match(BraketPragmasParser.RPAREN)
            self.state = 588
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.ARROW:
                self.state = 587
                self.returnSignature()


            self.state = 590
            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):

        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, 112, self.RULE_externStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 592
            self.match(BraketPragmasParser.EXTERN)
            self.state = 593
            self.match(BraketPragmasParser.Identifier)
            self.state = 594
            self.match(BraketPragmasParser.LPAREN)
            self.state = 596
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 52)) & ~0x3f) == 0 and ((1 << (_la - 52)) & ((1 << (BraketPragmasParser.CONST - 52)) | (1 << (BraketPragmasParser.MUTABLE - 52)) | (1 << (BraketPragmasParser.CREG - 52)) | (1 << (BraketPragmasParser.BOOL - 52)) | (1 << (BraketPragmasParser.BIT - 52)) | (1 << (BraketPragmasParser.INT - 52)) | (1 << (BraketPragmasParser.UINT - 52)) | (1 << (BraketPragmasParser.FLOAT - 52)) | (1 << (BraketPragmasParser.ANGLE - 52)) | (1 << (BraketPragmasParser.COMPLEX - 52)) | (1 << (BraketPragmasParser.DURATION - 52)) | (1 << (BraketPragmasParser.STRETCH - 52)))) != 0):
                self.state = 595
                self.externArgumentList()


            self.state = 598
            self.match(BraketPragmasParser.RPAREN)
            self.state = 600
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.ARROW:
                self.state = 599
                self.returnSignature()


            self.state = 602
            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):

        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, 114, self.RULE_gateStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 604
            self.match(BraketPragmasParser.GATE)
            self.state = 605
            self.match(BraketPragmasParser.Identifier)
            self.state = 611
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.LPAREN:
                self.state = 606
                self.match(BraketPragmasParser.LPAREN)
                self.state = 608
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.Identifier:
                    self.state = 607
                    localctx.params = self.identifierList()


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


            self.state = 613
            localctx.qubits = self.identifierList()
            self.state = 614
            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):

        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, 116, self.RULE_assignmentStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 616
            self.indexedIdentifier()
            self.state = 617
            localctx.op = self._input.LT(1)
            _la = self._input.LA(1)
            if not(_la==BraketPragmasParser.EQUALS or _la==BraketPragmasParser.CompoundAssignmentOperator):
                localctx.op = self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 620
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.DURATIONOF, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.state = 618
                self.expression(0)
                pass
            elif token in [BraketPragmasParser.MEASURE]:
                self.state = 619
                self.measureExpression()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 622
            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):

        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, 118, self.RULE_expressionStatement)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 624
            self.expression(0)
            self.state = 625
            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):

        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, 120, self.RULE_defcalStatement)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 627
            self.match(BraketPragmasParser.DEFCAL)
            self.state = 628
            self.match(BraketPragmasParser.Identifier)
            self.state = 634
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.LPAREN:
                self.state = 629
                self.match(BraketPragmasParser.LPAREN)
                self.state = 631
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((((_la - 52)) & ~0x3f) == 0 and ((1 << (_la - 52)) & ((1 << (BraketPragmasParser.CONST - 52)) | (1 << (BraketPragmasParser.MUTABLE - 52)) | (1 << (BraketPragmasParser.QREG - 52)) | (1 << (BraketPragmasParser.QUBIT - 52)) | (1 << (BraketPragmasParser.CREG - 52)) | (1 << (BraketPragmasParser.BOOL - 52)) | (1 << (BraketPragmasParser.BIT - 52)) | (1 << (BraketPragmasParser.INT - 52)) | (1 << (BraketPragmasParser.UINT - 52)) | (1 << (BraketPragmasParser.FLOAT - 52)) | (1 << (BraketPragmasParser.ANGLE - 52)) | (1 << (BraketPragmasParser.COMPLEX - 52)) | (1 << (BraketPragmasParser.DURATION - 52)) | (1 << (BraketPragmasParser.STRETCH - 52)))) != 0):
                    self.state = 630
                    self.argumentDefinitionList()


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


            self.state = 636
            self.defcalArgumentList()
            self.state = 638
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.ARROW:
                self.state = 637
                self.returnSignature()


            self.state = 640
            self.match(BraketPragmasParser.LBRACE)
            self.state = 644
            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 = 641
                    self.matchWildcard() 
                self.state = 646
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,57,self._ctx)

            self.state = 647
            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):

        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 = 122
        self.enterRecursionRule(localctx, 122, self.RULE_expression, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 676
            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 = 650
                self.match(BraketPragmasParser.LPAREN)
                self.state = 651
                self.expression(0)
                self.state = 652
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 2:
                localctx = BraketPragmasParser.UnaryExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 654
                localctx.op = self._input.LT(1)
                _la = self._input.LA(1)
                if not(((((_la - 93)) & ~0x3f) == 0 and ((1 << (_la - 93)) & ((1 << (BraketPragmasParser.MINUS - 93)) | (1 << (BraketPragmasParser.TILDE - 93)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 93)))) != 0)):
                    localctx.op = self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 655
                self.expression(15)
                pass

            elif la_ == 3:
                localctx = BraketPragmasParser.CastExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 658
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH]:
                    self.state = 656
                    self.scalarType()
                    pass
                elif token in [BraketPragmasParser.ARRAY]:
                    self.state = 657
                    self.arrayType()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 660
                self.match(BraketPragmasParser.LPAREN)
                self.state = 661
                self.expression(0)
                self.state = 662
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 4:
                localctx = BraketPragmasParser.DurationofExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 664
                self.match(BraketPragmasParser.DURATIONOF)
                self.state = 665
                self.match(BraketPragmasParser.LPAREN)
                self.state = 666
                self.scope()
                self.state = 667
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 5:
                localctx = BraketPragmasParser.CallExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 669
                self.match(BraketPragmasParser.Identifier)
                self.state = 670
                self.match(BraketPragmasParser.LPAREN)
                self.state = 672
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if ((((_la - 57)) & ~0x3f) == 0 and ((1 << (_la - 57)) & ((1 << (BraketPragmasParser.BOOL - 57)) | (1 << (BraketPragmasParser.BIT - 57)) | (1 << (BraketPragmasParser.INT - 57)) | (1 << (BraketPragmasParser.UINT - 57)) | (1 << (BraketPragmasParser.FLOAT - 57)) | (1 << (BraketPragmasParser.ANGLE - 57)) | (1 << (BraketPragmasParser.COMPLEX - 57)) | (1 << (BraketPragmasParser.ARRAY - 57)) | (1 << (BraketPragmasParser.DURATION - 57)) | (1 << (BraketPragmasParser.STRETCH - 57)) | (1 << (BraketPragmasParser.DURATIONOF - 57)) | (1 << (BraketPragmasParser.BooleanLiteral - 57)) | (1 << (BraketPragmasParser.LPAREN - 57)) | (1 << (BraketPragmasParser.MINUS - 57)) | (1 << (BraketPragmasParser.TILDE - 57)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 57)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 57)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 57)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 57)) | (1 << (BraketPragmasParser.Identifier - 57)) | (1 << (BraketPragmasParser.HardwareQubit - 57)) | (1 << (BraketPragmasParser.FloatLiteral - 57)) | (1 << (BraketPragmasParser.TimingLiteral - 57)) | (1 << (BraketPragmasParser.BitstringLiteral - 57)))) != 0):
                    self.state = 671
                    self.expressionList()


                self.state = 674
                self.match(BraketPragmasParser.RPAREN)
                pass

            elif la_ == 6:
                localctx = BraketPragmasParser.LiteralExpressionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 675
                _la = self._input.LA(1)
                if not(((((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & ((1 << (BraketPragmasParser.BooleanLiteral - 78)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 78)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 78)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 78)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 78)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 78)) | (1 << (BraketPragmasParser.Identifier - 78)) | (1 << (BraketPragmasParser.HardwareQubit - 78)) | (1 << (BraketPragmasParser.FloatLiteral - 78)) | (1 << (BraketPragmasParser.TimingLiteral - 78)) | (1 << (BraketPragmasParser.BitstringLiteral - 78)))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 715
            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 = 713
                    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 = 678
                        if not self.precpred(self._ctx, 16):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 16)")
                        self.state = 679
                        localctx.op = self.match(BraketPragmasParser.DOUBLE_ASTERISK)
                        self.state = 680
                        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 = 681
                        if not self.precpred(self._ctx, 14):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 14)")
                        self.state = 682
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(((((_la - 94)) & ~0x3f) == 0 and ((1 << (_la - 94)) & ((1 << (BraketPragmasParser.ASTERISK - 94)) | (1 << (BraketPragmasParser.SLASH - 94)) | (1 << (BraketPragmasParser.PERCENT - 94)))) != 0)):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 683
                        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 = 684
                        if not self.precpred(self._ctx, 13):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 13)")
                        self.state = 685
                        localctx.op = self._input.LT(1)
                        _la = self._input.LA(1)
                        if not(_la==BraketPragmasParser.PLUS or _la==BraketPragmasParser.MINUS):
                            localctx.op = self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()
                        self.state = 686
                        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 = 687
                        if not self.precpred(self._ctx, 12):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 12)")
                        self.state = 688
                        localctx.op = self.match(BraketPragmasParser.BitshiftOperator)
                        self.state = 689
                        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 = 690
                        if not self.precpred(self._ctx, 11):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 11)")
                        self.state = 691
                        localctx.op = self.match(BraketPragmasParser.ComparisonOperator)
                        self.state = 692
                        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 = 693
                        if not self.precpred(self._ctx, 10):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 10)")
                        self.state = 694
                        localctx.op = self.match(BraketPragmasParser.EqualityOperator)
                        self.state = 695
                        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 = 696
                        if not self.precpred(self._ctx, 9):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 9)")
                        self.state = 697
                        localctx.op = self.match(BraketPragmasParser.AMPERSAND)
                        self.state = 698
                        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 = 699
                        if not self.precpred(self._ctx, 8):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 8)")
                        self.state = 700
                        localctx.op = self.match(BraketPragmasParser.CARET)
                        self.state = 701
                        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 = 702
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 703
                        localctx.op = self.match(BraketPragmasParser.PIPE)
                        self.state = 704
                        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 = 705
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 706
                        localctx.op = self.match(BraketPragmasParser.DOUBLE_AMPERSAND)
                        self.state = 707
                        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 = 708
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 709
                        localctx.op = self.match(BraketPragmasParser.DOUBLE_PIPE)
                        self.state = 710
                        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 = 711
                        if not self.precpred(self._ctx, 17):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 17)")
                        self.state = 712
                        self.indexOperator()
                        pass

             
                self.state = 717
                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):

        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, 124, self.RULE_aliasExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 718
            self.expression(0)
            self.state = 723
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BraketPragmasParser.DOUBLE_PLUS:
                self.state = 719
                self.match(BraketPragmasParser.DOUBLE_PLUS)
                self.state = 720
                self.expression(0)
                self.state = 725
                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):

        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, 126, self.RULE_declarationExpression)
        try:
            self.state = 729
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.LBRACE]:
                self.enterOuterAlt(localctx, 1)
                self.state = 726
                self.arrayLiteral()
                pass
            elif token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.DURATIONOF, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.enterOuterAlt(localctx, 2)
                self.state = 727
                self.expression(0)
                pass
            elif token in [BraketPragmasParser.MEASURE]:
                self.enterOuterAlt(localctx, 3)
                self.state = 728
                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):

        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, 128, self.RULE_measureExpression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 731
            self.match(BraketPragmasParser.MEASURE)
            self.state = 732
            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):

        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, 130, self.RULE_rangeExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 735
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 57)) & ~0x3f) == 0 and ((1 << (_la - 57)) & ((1 << (BraketPragmasParser.BOOL - 57)) | (1 << (BraketPragmasParser.BIT - 57)) | (1 << (BraketPragmasParser.INT - 57)) | (1 << (BraketPragmasParser.UINT - 57)) | (1 << (BraketPragmasParser.FLOAT - 57)) | (1 << (BraketPragmasParser.ANGLE - 57)) | (1 << (BraketPragmasParser.COMPLEX - 57)) | (1 << (BraketPragmasParser.ARRAY - 57)) | (1 << (BraketPragmasParser.DURATION - 57)) | (1 << (BraketPragmasParser.STRETCH - 57)) | (1 << (BraketPragmasParser.DURATIONOF - 57)) | (1 << (BraketPragmasParser.BooleanLiteral - 57)) | (1 << (BraketPragmasParser.LPAREN - 57)) | (1 << (BraketPragmasParser.MINUS - 57)) | (1 << (BraketPragmasParser.TILDE - 57)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 57)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 57)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 57)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 57)) | (1 << (BraketPragmasParser.Identifier - 57)) | (1 << (BraketPragmasParser.HardwareQubit - 57)) | (1 << (BraketPragmasParser.FloatLiteral - 57)) | (1 << (BraketPragmasParser.TimingLiteral - 57)) | (1 << (BraketPragmasParser.BitstringLiteral - 57)))) != 0):
                self.state = 734
                self.expression(0)


            self.state = 737
            self.match(BraketPragmasParser.COLON)
            self.state = 739
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((((_la - 57)) & ~0x3f) == 0 and ((1 << (_la - 57)) & ((1 << (BraketPragmasParser.BOOL - 57)) | (1 << (BraketPragmasParser.BIT - 57)) | (1 << (BraketPragmasParser.INT - 57)) | (1 << (BraketPragmasParser.UINT - 57)) | (1 << (BraketPragmasParser.FLOAT - 57)) | (1 << (BraketPragmasParser.ANGLE - 57)) | (1 << (BraketPragmasParser.COMPLEX - 57)) | (1 << (BraketPragmasParser.ARRAY - 57)) | (1 << (BraketPragmasParser.DURATION - 57)) | (1 << (BraketPragmasParser.STRETCH - 57)) | (1 << (BraketPragmasParser.DURATIONOF - 57)) | (1 << (BraketPragmasParser.BooleanLiteral - 57)) | (1 << (BraketPragmasParser.LPAREN - 57)) | (1 << (BraketPragmasParser.MINUS - 57)) | (1 << (BraketPragmasParser.TILDE - 57)) | (1 << (BraketPragmasParser.EXCLAMATION_POINT - 57)) | (1 << (BraketPragmasParser.ImaginaryLiteral - 57)) | (1 << (BraketPragmasParser.BinaryIntegerLiteral - 57)) | (1 << (BraketPragmasParser.OctalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.DecimalIntegerLiteral - 57)) | (1 << (BraketPragmasParser.HexIntegerLiteral - 57)) | (1 << (BraketPragmasParser.Identifier - 57)) | (1 << (BraketPragmasParser.HardwareQubit - 57)) | (1 << (BraketPragmasParser.FloatLiteral - 57)) | (1 << (BraketPragmasParser.TimingLiteral - 57)) | (1 << (BraketPragmasParser.BitstringLiteral - 57)))) != 0):
                self.state = 738
                self.expression(0)


            self.state = 743
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COLON:
                self.state = 741
                self.match(BraketPragmasParser.COLON)
                self.state = 742
                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):

        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, 132, self.RULE_setExpression)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 745
            self.match(BraketPragmasParser.LBRACE)
            self.state = 746
            self.expression(0)
            self.state = 751
            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 = 747
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 748
                    self.expression(0) 
                self.state = 753
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,68,self._ctx)

            self.state = 755
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 754
                self.match(BraketPragmasParser.COMMA)


            self.state = 757
            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):

        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, 134, self.RULE_arrayLiteral)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 759
            self.match(BraketPragmasParser.LBRACE)
            self.state = 762
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.DURATIONOF, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.state = 760
                self.expression(0)
                pass
            elif token in [BraketPragmasParser.LBRACE]:
                self.state = 761
                self.arrayLiteral()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 771
            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 = 764
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 767
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.DURATIONOF, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                        self.state = 765
                        self.expression(0)
                        pass
                    elif token in [BraketPragmasParser.LBRACE]:
                        self.state = 766
                        self.arrayLiteral()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 773
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,72,self._ctx)

            self.state = 775
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 774
                self.match(BraketPragmasParser.COMMA)


            self.state = 777
            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):

        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, 136, self.RULE_indexOperator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 779
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 798
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.LBRACE]:
                self.state = 780
                self.setExpression()
                pass
            elif token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.DURATIONOF, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.COLON, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.state = 783
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,74,self._ctx)
                if la_ == 1:
                    self.state = 781
                    self.expression(0)
                    pass

                elif la_ == 2:
                    self.state = 782
                    self.rangeExpression()
                    pass


                self.state = 792
                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 = 785
                        self.match(BraketPragmasParser.COMMA)
                        self.state = 788
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,75,self._ctx)
                        if la_ == 1:
                            self.state = 786
                            self.expression(0)
                            pass

                        elif la_ == 2:
                            self.state = 787
                            self.rangeExpression()
                            pass

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

                self.state = 796
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.COMMA:
                    self.state = 795
                    self.match(BraketPragmasParser.COMMA)


                pass
            else:
                raise NoViableAltException(self)

            self.state = 800
            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):

        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, 138, self.RULE_indexedIdentifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 802
            self.match(BraketPragmasParser.Identifier)
            self.state = 806
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==BraketPragmasParser.LBRACKET:
                self.state = 803
                self.indexOperator()
                self.state = 808
                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):

        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, 140, self.RULE_returnSignature)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 809
            self.match(BraketPragmasParser.ARROW)
            self.state = 810
            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):

        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, 142, self.RULE_gateModifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 825
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.INV]:
                self.state = 812
                self.match(BraketPragmasParser.INV)
                pass
            elif token in [BraketPragmasParser.POW]:
                self.state = 813
                self.match(BraketPragmasParser.POW)
                self.state = 814
                self.match(BraketPragmasParser.LPAREN)
                self.state = 815
                self.expression(0)
                self.state = 816
                self.match(BraketPragmasParser.RPAREN)
                pass
            elif token in [BraketPragmasParser.CTRL, BraketPragmasParser.NEGCTRL]:
                self.state = 818
                _la = self._input.LA(1)
                if not(_la==BraketPragmasParser.CTRL or _la==BraketPragmasParser.NEGCTRL):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 823
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LPAREN:
                    self.state = 819
                    self.match(BraketPragmasParser.LPAREN)
                    self.state = 820
                    self.expression(0)
                    self.state = 821
                    self.match(BraketPragmasParser.RPAREN)


                pass
            else:
                raise NoViableAltException(self)

            self.state = 827
            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):

        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, 144, self.RULE_scalarType)
        self._la = 0 # Token type
        try:
            self.state = 859
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BIT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 829
                self.match(BraketPragmasParser.BIT)
                self.state = 831
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 830
                    self.designator()


                pass
            elif token in [BraketPragmasParser.INT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 833
                self.match(BraketPragmasParser.INT)
                self.state = 835
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 834
                    self.designator()


                pass
            elif token in [BraketPragmasParser.UINT]:
                self.enterOuterAlt(localctx, 3)
                self.state = 837
                self.match(BraketPragmasParser.UINT)
                self.state = 839
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 838
                    self.designator()


                pass
            elif token in [BraketPragmasParser.FLOAT]:
                self.enterOuterAlt(localctx, 4)
                self.state = 841
                self.match(BraketPragmasParser.FLOAT)
                self.state = 843
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 842
                    self.designator()


                pass
            elif token in [BraketPragmasParser.ANGLE]:
                self.enterOuterAlt(localctx, 5)
                self.state = 845
                self.match(BraketPragmasParser.ANGLE)
                self.state = 847
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 846
                    self.designator()


                pass
            elif token in [BraketPragmasParser.BOOL]:
                self.enterOuterAlt(localctx, 6)
                self.state = 849
                self.match(BraketPragmasParser.BOOL)
                pass
            elif token in [BraketPragmasParser.DURATION]:
                self.enterOuterAlt(localctx, 7)
                self.state = 850
                self.match(BraketPragmasParser.DURATION)
                pass
            elif token in [BraketPragmasParser.STRETCH]:
                self.enterOuterAlt(localctx, 8)
                self.state = 851
                self.match(BraketPragmasParser.STRETCH)
                pass
            elif token in [BraketPragmasParser.COMPLEX]:
                self.enterOuterAlt(localctx, 9)
                self.state = 852
                self.match(BraketPragmasParser.COMPLEX)
                self.state = 857
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 853
                    self.match(BraketPragmasParser.LBRACKET)
                    self.state = 854
                    self.scalarType()
                    self.state = 855
                    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):

        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, 146, self.RULE_qubitType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 861
            self.match(BraketPragmasParser.QUBIT)
            self.state = 863
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.LBRACKET:
                self.state = 862
                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):

        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, 148, self.RULE_arrayType)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 865
            self.match(BraketPragmasParser.ARRAY)
            self.state = 866
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 867
            self.scalarType()
            self.state = 868
            self.match(BraketPragmasParser.COMMA)
            self.state = 869
            self.expressionList()
            self.state = 870
            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):

        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, 150, self.RULE_arrayReferenceType)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 872
            _la = self._input.LA(1)
            if not(_la==BraketPragmasParser.CONST or _la==BraketPragmasParser.MUTABLE):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 873
            self.match(BraketPragmasParser.ARRAY)
            self.state = 874
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 875
            self.scalarType()
            self.state = 876
            self.match(BraketPragmasParser.COMMA)
            self.state = 881
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.ARRAY, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH, BraketPragmasParser.DURATIONOF, BraketPragmasParser.BooleanLiteral, BraketPragmasParser.LPAREN, BraketPragmasParser.MINUS, BraketPragmasParser.TILDE, BraketPragmasParser.EXCLAMATION_POINT, BraketPragmasParser.ImaginaryLiteral, BraketPragmasParser.BinaryIntegerLiteral, BraketPragmasParser.OctalIntegerLiteral, BraketPragmasParser.DecimalIntegerLiteral, BraketPragmasParser.HexIntegerLiteral, BraketPragmasParser.Identifier, BraketPragmasParser.HardwareQubit, BraketPragmasParser.FloatLiteral, BraketPragmasParser.TimingLiteral, BraketPragmasParser.BitstringLiteral]:
                self.state = 877
                self.expressionList()
                pass
            elif token in [BraketPragmasParser.DIM]:
                self.state = 878
                self.match(BraketPragmasParser.DIM)
                self.state = 879
                self.match(BraketPragmasParser.EQUALS)
                self.state = 880
                self.expression(0)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 883
            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):

        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, 152, self.RULE_designator)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 885
            self.match(BraketPragmasParser.LBRACKET)
            self.state = 886
            self.expression(0)
            self.state = 887
            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):

        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, 154, self.RULE_gateOperand)
        try:
            self.state = 891
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.Identifier]:
                self.enterOuterAlt(localctx, 1)
                self.state = 889
                self.indexedIdentifier()
                pass
            elif token in [BraketPragmasParser.HardwareQubit]:
                self.enterOuterAlt(localctx, 2)
                self.state = 890
                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):

        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, 156, self.RULE_externArgument)
        self._la = 0 # Token type
        try:
            self.state = 899
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH]:
                self.enterOuterAlt(localctx, 1)
                self.state = 893
                self.scalarType()
                pass
            elif token in [BraketPragmasParser.CONST, BraketPragmasParser.MUTABLE]:
                self.enterOuterAlt(localctx, 2)
                self.state = 894
                self.arrayReferenceType()
                pass
            elif token in [BraketPragmasParser.CREG]:
                self.enterOuterAlt(localctx, 3)
                self.state = 895
                self.match(BraketPragmasParser.CREG)
                self.state = 897
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 896
                    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):

        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, 158, self.RULE_defcalArgument)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 901
            _la = self._input.LA(1)
            if not(_la==BraketPragmasParser.Identifier or _la==BraketPragmasParser.HardwareQubit):
                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):

        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, 160, self.RULE_argumentDefinition)
        self._la = 0 # Token type
        try:
            self.state = 917
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [BraketPragmasParser.BOOL, BraketPragmasParser.BIT, BraketPragmasParser.INT, BraketPragmasParser.UINT, BraketPragmasParser.FLOAT, BraketPragmasParser.ANGLE, BraketPragmasParser.COMPLEX, BraketPragmasParser.DURATION, BraketPragmasParser.STRETCH]:
                self.enterOuterAlt(localctx, 1)
                self.state = 903
                self.scalarType()
                self.state = 904
                self.match(BraketPragmasParser.Identifier)
                pass
            elif token in [BraketPragmasParser.QUBIT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 906
                self.qubitType()
                self.state = 907
                self.match(BraketPragmasParser.Identifier)
                pass
            elif token in [BraketPragmasParser.QREG, BraketPragmasParser.CREG]:
                self.enterOuterAlt(localctx, 3)
                self.state = 909
                _la = self._input.LA(1)
                if not(_la==BraketPragmasParser.QREG or _la==BraketPragmasParser.CREG):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 910
                self.match(BraketPragmasParser.Identifier)
                self.state = 912
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==BraketPragmasParser.LBRACKET:
                    self.state = 911
                    self.designator()


                pass
            elif token in [BraketPragmasParser.CONST, BraketPragmasParser.MUTABLE]:
                self.enterOuterAlt(localctx, 4)
                self.state = 914
                self.arrayReferenceType()
                self.state = 915
                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):

        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, 162, self.RULE_argumentDefinitionList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 919
            self.argumentDefinition()
            self.state = 924
            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 = 920
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 921
                    self.argumentDefinition() 
                self.state = 926
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,96,self._ctx)

            self.state = 928
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 927
                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):

        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, 164, self.RULE_expressionList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 930
            self.expression(0)
            self.state = 935
            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 = 931
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 932
                    self.expression(0) 
                self.state = 937
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,98,self._ctx)

            self.state = 939
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 938
                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):

        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, 166, self.RULE_defcalArgumentList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 941
            self.defcalArgument()
            self.state = 946
            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 = 942
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 943
                    self.defcalArgument() 
                self.state = 948
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,100,self._ctx)

            self.state = 950
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 949
                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):

        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, 168, self.RULE_identifierList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 952
            self.match(BraketPragmasParser.Identifier)
            self.state = 957
            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 = 953
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 954
                    self.match(BraketPragmasParser.Identifier) 
                self.state = 959
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,102,self._ctx)

            self.state = 961
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 960
                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):

        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, 170, self.RULE_gateOperandList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 963
            self.gateOperand()
            self.state = 968
            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 = 964
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 965
                    self.gateOperand() 
                self.state = 970
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,104,self._ctx)

            self.state = 972
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 971
                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):

        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, 172, self.RULE_externArgumentList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 974
            self.externArgument()
            self.state = 979
            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 = 975
                    self.match(BraketPragmasParser.COMMA)
                    self.state = 976
                    self.externArgument() 
                self.state = 981
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,106,self._ctx)

            self.state = 983
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==BraketPragmasParser.COMMA:
                self.state = 982
                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[61] = 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)
         




