diff options
Diffstat (limited to 'libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java')
-rw-r--r-- | libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java b/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java index 134f17c609c..1dc6019380f 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.util.regex; +import gnu.java.lang.CPStringBuilder; + /** * @since gnu.regexp 1.1.3 * @author Shashank Bapat @@ -46,35 +48,41 @@ final class RETokenLookAhead extends REToken REToken re; boolean negative; - RETokenLookAhead(REToken re, boolean negative) throws REException { - super(0); + RETokenLookAhead (REToken re, boolean negative) throws REException + { + super (0); this.re = re; this.negative = negative; } - int getMaximumLength() { + int getMaximumLength () + { return 0; } - REMatch matchThis(CharIndexed input, REMatch mymatch) + REMatch matchThis (CharIndexed input, REMatch mymatch) { - REMatch trymatch = (REMatch)mymatch.clone(); - if (re.match(input, trymatch)) { - if (negative) return null; - trymatch.index = mymatch.index; - return trymatch; - } - else { - if (negative) return mymatch; - return null; - } + REMatch trymatch = (REMatch) mymatch.clone (); + if (re.match (input, trymatch)) + { + if (negative) + return null; + trymatch.index = mymatch.index; + return trymatch; + } + else + { + if (negative) + return mymatch; + return null; + } } - void dump(StringBuffer os) { - os.append("(?"); - os.append(negative ? '!' : '='); - re.dumpAll(os); - os.append(')'); - } + void dump (CPStringBuilder os) + { + os.append ("(?"); + os.append (negative ? '!' : '='); + re.dumpAll (os); + os.append (')'); + } } - |