qiskit/qasm/qasmparser.py
def verify_exp_list(self, obj):
        """Verify each expression in a list."""
        # A tad harder.  This is a list of expressions each of which could be
        # the head of a tree. We need to recursively walk each of these and
        # ensure that any Id elements resolve to the current stack.
        #
        # I believe we only have to look at the current symtab.
        if obj.children is not None:
            for children in obj.children:
                if isinstance(children, node.Id):
                    if children.name in self.external_functions:
                        continue

                    if children.name not in self.current_symtab:
                        raise QasmError("Argument '" + children.name
                                        + "' in expression cannot be "
                                        + "found, line", str(children.line),
                                        "file", children.file)
                else:
                    if hasattr(children, "children"):
                        self.verify_exp_list(children)
def verify_exp_list(self, obj):
        """Verify each expression in a list."""
        # A tad harder.  This is a list of expressions each of which could be
        # the head of a tree. We need to recursively walk each of these and
        # ensure that any Id elements resolve to the current stack.
        #
        # I believe we only have to look at the current symtab.
        if obj.children is not None:
            for children in obj.children:
                if isinstance(children, node.Id):
                    if children.name in self.external_functions:
                        continue

                    if children.name not in self.current_symtab:
                        raise QasmError("Argument '" + children.name
                                        + "' in expression cannot be "
                                        + "found, line", str(children.line),
                                        "file", children.file)
                else:
                    if hasattr(children, "children"):
                        self.verify_exp_list(children)
def verify_exp_list ( self , obj ) : # A tad harder.  This is a list of expressions each of which could be # the head of a tree. We need to recursively walk each of these and # ensure that any Id elements resolve to the current stack. # # I believe we only have to look at the current symtab. if obj . children is not None : for children in obj . children : if isinstance ( children , node . Id ) : if children . name in self . external_functions : continue if children . name not in self . current_symtab : raise QasmError ( "Argument '" + children . name + "' in expression cannot be " + "found, line" , str ( children . line ) , "file" , children . file ) else : if hasattr ( children , "children" ) : self . verify_exp_list ( children )
Verify each expression in a list.
Verify each expression in a list .