Matcher implementation. Although the Recurse name, the code uses no recursion.