class originirParser
#include <originirParser.h>
class originirParser: public Parser
{
public:
// enums
enum
{
PI = 1,
QINIT_KEY = 2,
CREG_KEY = 3,
Q_KEY = 4,
C_KEY = 5,
BARRIER_KEY = 6,
QGATE_KEY = 7,
ENDQGATE_KEY = 8,
ECHO_GATE = 9,
H_GATE = 10,
X_GATE = 11,
NOT_GATE = 12,
T_GATE = 13,
S_GATE = 14,
Y_GATE = 15,
Z_GATE = 16,
X1_GATE = 17,
Y1_GATE = 18,
Z1_GATE = 19,
I_GATE = 20,
U2_GATE = 21,
RPHI_GATE = 22,
U3_GATE = 23,
U4_GATE = 24,
RX_GATE = 25,
RY_GATE = 26,
RZ_GATE = 27,
U1_GATE = 28,
CNOT_GATE = 29,
CZ_GATE = 30,
CU_GATE = 31,
ISWAP_GATE = 32,
SQISWAP_GATE = 33,
SWAPZ1_GATE = 34,
ISWAPTHETA_GATE = 35,
CR_GATE = 36,
TOFFOLI_GATE = 37,
DAGGER_KEY = 38,
ENDDAGGER_KEY = 39,
CONTROL_KEY = 40,
ENDCONTROL_KEY = 41,
QIF_KEY = 42,
ELSE_KEY = 43,
ENDIF_KEY = 44,
QWHILE_KEY = 45,
ENDQWHILE_KEY = 46,
MEASURE_KEY = 47,
RESET_KEY = 48,
ASSIGN = 49,
GT = 50,
LT = 51,
NOT = 52,
EQ = 53,
LEQ = 54,
GEQ = 55,
NE = 56,
AND = 57,
OR = 58,
PLUS = 59,
MINUS = 60,
MUL = 61,
DIV = 62,
COMMA = 63,
LPAREN = 64,
RPAREN = 65,
LBRACK = 66,
RBRACK = 67,
NEWLINE = 68,
Identifier = 69,
Integer_Literal = 70,
Double_Literal = 71,
Digit_Sequence = 72,
REALEXP = 73,
WhiteSpace = 74,
SingleLineComment = 75,
};
enum
{
RuleTranslationunit = 0,
RuleDeclaration = 1,
RuleQinit_declaration = 2,
RuleCinit_declaration = 3,
RuleQuantum_gate_declaration = 4,
RuleIndex = 5,
RuleC_KEY_declaration = 6,
RuleQ_KEY_declaration = 7,
RuleSingle_gate_without_parameter_declaration = 8,
RuleSingle_gate_with_one_parameter_declaration = 9,
RuleSingle_gate_with_two_parameter_declaration = 10,
RuleSingle_gate_with_three_parameter_declaration = 11,
RuleSingle_gate_with_four_parameter_declaration = 12,
RuleDouble_gate_without_parameter_declaration = 13,
RuleDouble_gate_with_one_parameter_declaration = 14,
RuleDouble_gate_with_four_parameter_declaration = 15,
RuleTriple_gate_without_parameter_declaration = 16,
RuleDefine_gate_declaration = 17,
RuleSingle_gate_without_parameter_type = 18,
RuleSingle_gate_with_one_parameter_type = 19,
RuleSingle_gate_with_two_parameter_type = 20,
RuleSingle_gate_with_three_parameter_type = 21,
RuleSingle_gate_with_four_parameter_type = 22,
RuleDouble_gate_without_parameter_type = 23,
RuleDouble_gate_with_one_parameter_type = 24,
RuleDouble_gate_with_four_parameter_type = 25,
RuleTriple_gate_without_parameter_type = 26,
RulePrimary_expression = 27,
RuleUnary_expression = 28,
RuleMultiplicative_expression = 29,
RuleAddtive_expression = 30,
RuleRelational_expression = 31,
RuleEquality_expression = 32,
RuleLogical_and_expression = 33,
RuleLogical_or_expression = 34,
RuleAssignment_expression = 35,
RuleExpression = 36,
RuleControlbit_list = 37,
RuleStatement = 38,
RuleDagger_statement = 39,
RuleControl_statement = 40,
RuleQelse_statement_fragment = 41,
RuleQif_statement = 42,
RuleQwhile_statement = 43,
RuleMeasure_statement = 44,
RuleReset_statement = 45,
RuleBarrier_statement = 46,
RuleExpression_statement = 47,
RuleDefine_gate_statement = 48,
RuleExplist = 49,
RuleExp = 50,
RuleGate_func_statement = 51,
RuleId = 52,
RuleId_list = 53,
RuleGate_name = 54,
RuleConstant = 55,
};
// structs
struct Initializer;
// classes
class Addtive_expressionContext;
class Assignment_expressionContext;
class Barrier_statementContext;
class C_KEY_declarationContext;
class Cinit_declarationContext;
class ConstantContext;
class Control_statementContext;
class Controlbit_listContext;
class Dagger_statementContext;
class DeclarationContext;
class Define_gate_declarationContext;
class Define_gate_statementContext;
class Double_gate_with_four_parameter_declarationContext;
class Double_gate_with_four_parameter_typeContext;
class Double_gate_with_one_parameter_declarationContext;
class Double_gate_with_one_parameter_typeContext;
class Double_gate_without_parameter_declarationContext;
class Double_gate_without_parameter_typeContext;
class Equality_expressionContext;
class ExpContext;
class ExplistContext;
class ExpressionContext;
class Expression_statementContext;
class Gate_func_statementContext;
class Gate_nameContext;
class IdContext;
class Id_listContext;
class IndexContext;
class Logical_and_expressionContext;
class Logical_or_expressionContext;
class Measure_statementContext;
class Multiplicative_expressionContext;
class Pri_ckeyContext;
class Pri_cstContext;
class Pri_exprContext;
class Primary_expressionContext;
class Q_KEY_declarationContext;
class Qelse_statement_fragmentContext;
class Qif_ifContext;
class Qif_ifelseContext;
class Qif_statementContext;
class Qinit_declarationContext;
class Quantum_gate_declarationContext;
class Qwhile_statementContext;
class Relational_expressionContext;
class Reset_statementContext;
class Single_gate_with_four_parameter_declarationContext;
class Single_gate_with_four_parameter_typeContext;
class Single_gate_with_one_parameter_declarationContext;
class Single_gate_with_one_parameter_typeContext;
class Single_gate_with_three_parameter_declarationContext;
class Single_gate_with_three_parameter_typeContext;
class Single_gate_with_two_parameter_declarationContext;
class Single_gate_with_two_parameter_typeContext;
class Single_gate_without_parameter_declarationContext;
class Single_gate_without_parameter_typeContext;
class StatementContext;
class TranslationunitContext;
class Triple_gate_without_parameter_declarationContext;
class Triple_gate_without_parameter_typeContext;
class Unary_expressionContext;
// construction
originirParser(antlr4::TokenStream* input);
// methods
virtual std::string getGrammarFileName() const;
virtual const antlr4::atn::ATN& getATN() const;
virtual const std::vector<std::string>& getTokenNames() const;
virtual const std::vector<std::string>& getRuleNames() const;
virtual antlr4::dfa::Vocabulary& getVocabulary() const;
TranslationunitContext* translationunit();
DeclarationContext* declaration();
Qinit_declarationContext* qinit_declaration();
Cinit_declarationContext* cinit_declaration();
Quantum_gate_declarationContext* quantum_gate_declaration();
IndexContext* index();
C_KEY_declarationContext* c_KEY_declaration();
Q_KEY_declarationContext* q_KEY_declaration();
Single_gate_without_parameter_declarationContext* single_gate_without_parameter_declaration();
Single_gate_with_one_parameter_declarationContext* single_gate_with_one_parameter_declaration();
Single_gate_with_two_parameter_declarationContext* single_gate_with_two_parameter_declaration();
Single_gate_with_three_parameter_declarationContext* single_gate_with_three_parameter_declaration();
Single_gate_with_four_parameter_declarationContext* single_gate_with_four_parameter_declaration();
Double_gate_without_parameter_declarationContext* double_gate_without_parameter_declaration();
Double_gate_with_one_parameter_declarationContext* double_gate_with_one_parameter_declaration();
Double_gate_with_four_parameter_declarationContext* double_gate_with_four_parameter_declaration();
Triple_gate_without_parameter_declarationContext* triple_gate_without_parameter_declaration();
Define_gate_declarationContext* define_gate_declaration();
Single_gate_without_parameter_typeContext* single_gate_without_parameter_type();
Single_gate_with_one_parameter_typeContext* single_gate_with_one_parameter_type();
Single_gate_with_two_parameter_typeContext* single_gate_with_two_parameter_type();
Single_gate_with_three_parameter_typeContext* single_gate_with_three_parameter_type();
Single_gate_with_four_parameter_typeContext* single_gate_with_four_parameter_type();
Double_gate_without_parameter_typeContext* double_gate_without_parameter_type();
Double_gate_with_one_parameter_typeContext* double_gate_with_one_parameter_type();
Double_gate_with_four_parameter_typeContext* double_gate_with_four_parameter_type();
Triple_gate_without_parameter_typeContext* triple_gate_without_parameter_type();
Primary_expressionContext* primary_expression();
Unary_expressionContext* unary_expression();
Multiplicative_expressionContext* multiplicative_expression();
Multiplicative_expressionContext* multiplicative_expression(int precedence);
Addtive_expressionContext* addtive_expression();
Addtive_expressionContext* addtive_expression(int precedence);
Relational_expressionContext* relational_expression();
Relational_expressionContext* relational_expression(int precedence);
Equality_expressionContext* equality_expression();
Equality_expressionContext* equality_expression(int precedence);
Logical_and_expressionContext* logical_and_expression();
Logical_and_expressionContext* logical_and_expression(int precedence);
Logical_or_expressionContext* logical_or_expression();
Logical_or_expressionContext* logical_or_expression(int precedence);
Assignment_expressionContext* assignment_expression();
ExpressionContext* expression();
Controlbit_listContext* controlbit_list();
StatementContext* statement();
Dagger_statementContext* dagger_statement();
Control_statementContext* control_statement();
Qelse_statement_fragmentContext* qelse_statement_fragment();
Qif_statementContext* qif_statement();
Qwhile_statementContext* qwhile_statement();
Measure_statementContext* measure_statement();
Reset_statementContext* reset_statement();
Barrier_statementContext* barrier_statement();
Expression_statementContext* expression_statement();
Define_gate_statementContext* define_gate_statement();
ExplistContext* explist();
ExpContext* exp();
ExpContext* exp(int precedence);
Gate_func_statementContext* gate_func_statement();
IdContext* id();
Id_listContext* id_list();
Gate_nameContext* gate_name();
ConstantContext* constant();
virtual bool sempred(
antlr4::RuleContext* _localctx,
size_t ruleIndex,
size_t predicateIndex
);
bool multiplicative_expressionSempred(
Multiplicative_expressionContext* _localctx,
size_t predicateIndex
);
bool addtive_expressionSempred(
Addtive_expressionContext* _localctx,
size_t predicateIndex
);
bool relational_expressionSempred(
Relational_expressionContext* _localctx,
size_t predicateIndex
);
bool equality_expressionSempred(
Equality_expressionContext* _localctx,
size_t predicateIndex
);
bool logical_and_expressionSempred(
Logical_and_expressionContext* _localctx,
size_t predicateIndex
);
bool logical_or_expressionSempred(
Logical_or_expressionContext* _localctx,
size_t predicateIndex
);
bool expSempred(
ExpContext* _localctx,
size_t predicateIndex
);
};