qiskit/qasm/qasmparser.py
def get_tokens(self):
        """Returns a generator of the tokens."""
        try:
            while True:
                token = self.lexer.token()

                if not token:
                    break

                yield token
        except QasmError as e:
            print('Exception tokenizing qasm file:', e.msg)
def get_tokens(self):
        """Returns a generator of the tokens."""
        try:
            while True:
                token = self.lexer.token()

                if not token:
                    break

                yield token
        except QasmError as e:
            print('Exception tokenizing qasm file:', e.msg)
Returns a generator of the tokens.