Lines Matching refs:match
433 name = None # Optional name used to store match in results dict
454 def match(self, node, results=None):
456 Does this pattern exactly match a node?
481 Does this pattern exactly match a sequence of nodes?
487 return self.match(nodes[0], results)
496 if nodes and self.match(nodes[0], r):
522 def match(self, node, results=None):
523 """Override match() to insist on a leaf node."""
526 return BasePattern.match(self, node, results)
555 non-leaf nodes that also match the content pattern.
558 must match the node's children exactly. If the content is
600 if not subpattern.match(child, results):
608 A wildcard pattern can match zero or more nodes.
627 min: optional minimum number of times to match, default 0
628 max: optional maximum number of times to match, default HUGE
629 name: optional name assigned to this match
673 def match(self, node, results=None):
674 """Does this pattern exactly match a node?"""
678 """Does this pattern exactly match a sequence of nodes?"""
697 count: the match comprises nodes[:count];
746 # for each match, iterate down the nodes
771 if leaf[0].match(nodes[count], r):
808 def match(self, node):
809 # We never match a node in its entirety
813 # We only match an empty sequence of nodes in its entirety
818 # Return a match if there is an empty sequence
822 # Return a match if the argument pattern has no matches