qiskit/qasm/qasmparser.py
def p_decl(self, program):
        """
           decl : qreg_decl ';'
                | creg_decl ';'
                | qreg_decl error
                | creg_decl error
                | gate_decl
        """
        if len(program) > 2:
            if program[2] != ';':
                raise QasmError("Missing ';' in qreg or creg declaration."
                                " Instead received '" + program[2].value + "'")
        program[0] = program[1]
def p_decl(self, program):
        """
           decl : qreg_decl ';'
                | creg_decl ';'
                | qreg_decl error
                | creg_decl error
                | gate_decl
        """
        if len(program) > 2:
            if program[2] != ';':
                raise QasmError("Missing ';' in qreg or creg declaration."
                                " Instead received '" + program[2].value + "'")
        program[0] = program[1]
def p_decl ( self , program ) : if len ( program ) > 2 : if program [ 2 ] != ';' : raise QasmError ( "Missing ';' in qreg or creg declaration." " Instead received '" + program [ 2 ] . value + "'" ) program [ 0 ] = program [ 1 ]
decl : qreg_decl ';'
                | creg_decl ';'
                | qreg_decl error
                | creg_decl error
                | gate_decl
decl : qreg_decl ; | creg_decl ; | qreg_decl error | creg_decl error | gate_decl