|
... Note: 'nonbin' must NOT contain wildcards, 'patt' may
... Failed
... Matched once only
... Continue to next section
... The preparation section is done. At this point, this may or may ... not be the first attempt, but it mattereth not. Be sure to ... set could_have_more_matches so that second attempts will ... cause a jump to this section to search for further matches.
... This is the point at which we iterate through all remaining ... permutations. These are permutations for trying wildcards ... against expressions which were left over from the non-wildcard ... pair matching above. Thus, we are trying to pair and match ... the expression in mismatches against the wildcard trees in ... wild_args.
... Iterate permutator
... Try this permutation for a full match.
... Note that we do not have to actually check every match that ... the permutation vector shows. But rather, some number of ... elements of the left-hande side (lower-indexed) of the ... permutation vector will already have been matched and ... validated last time. We can skip these and assume that ... they are still the same now (which they will be, assuming ... that all user-defined patterns are deterministic).
... Already matched is min of those which matched last time and ... those elements in the permutation vector which were the same ... last time.
... The number of arguments which we are considering ... already matched is smaller than the ones which we ... actually succeeded in matching last iteration. This ... means that the permutation changed in a way that ... we are throwing away some matches. We need to ... clear any matches in these wildcard arguments which ... we are throwing away from last time.
... Check the permutation for a match
... Increment both iterators past the pairs which we already know ... passed equality tests last time.
... Try next permutation
... The match failed. We need to clear any matches in the ... wildcard arguments which matched during the last iteration
Definition at line 8254 of file Expression.cc.
References consider_side_effects, could_have_more_matches, Iterator< T >::current(), dbx_wildcards_debug_level, False, Permutation::first_change(), first_time, leftmost_matched_pairs, mismatches, NO_MATCHES, num_mismatches, ONE_MATCH, p, True, Iterator< T >::valid(), Permutation::valid(), wild_args, and ZERO_OR_MORE_MATCHES.
Referenced by NonBinaryExpr::_args_are_equal(). |