diff options
Diffstat (limited to 'libjava/classpath/gnu/regexp/RETokenIndependent.java')
-rw-r--r-- | libjava/classpath/gnu/regexp/RETokenIndependent.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libjava/classpath/gnu/regexp/RETokenIndependent.java b/libjava/classpath/gnu/regexp/RETokenIndependent.java index 2eb1472..8bb95c6 100644 --- a/libjava/classpath/gnu/regexp/RETokenIndependent.java +++ b/libjava/classpath/gnu/regexp/RETokenIndependent.java @@ -57,14 +57,16 @@ final class RETokenIndependent extends REToken return re.getMaximumLength(); } - boolean match(CharIndexed input, REMatch mymatch) + REMatch matchThis(CharIndexed input, REMatch mymatch) { - if (re.match(input, mymatch)) { + boolean b = re.match(input, mymatch); + if (b) { // Once we have found a match, we do not see other possible matches. - mymatch.next = null; - return next(input, mymatch); + if (mymatch.backtrackStack != null) mymatch.backtrackStack.clear(); + return mymatch; + } - return false; + return null; } void dump(StringBuffer os) { |