summaryrefslogtreecommitdiff
path: root/gnu/java/util/regex/RETokenLookAhead.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/java/util/regex/RETokenLookAhead.java')
-rw-r--r--gnu/java/util/regex/RETokenLookAhead.java48
1 files changed, 27 insertions, 21 deletions
diff --git a/gnu/java/util/regex/RETokenLookAhead.java b/gnu/java/util/regex/RETokenLookAhead.java
index 39defd715..1dc601938 100644
--- a/gnu/java/util/regex/RETokenLookAhead.java
+++ b/gnu/java/util/regex/RETokenLookAhead.java
@@ -48,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(CPStringBuilder 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 (')');
+ }
}
-