summaryrefslogtreecommitdiff
path: root/gnu/java/util/regex/CharIndexedInputStream.java
diff options
context:
space:
mode:
authorIto Kazumitsu <kaz@maczuka.gcd.org>2006-08-20 14:47:30 +0000
committerIto Kazumitsu <kaz@maczuka.gcd.org>2006-08-20 14:47:30 +0000
commitcc4b3d34f0b1854867f160727dcfc78bcb90442c (patch)
tree0e92990411754ff5bab246005a48417fff21b683 /gnu/java/util/regex/CharIndexedInputStream.java
parent94103ccfadf1a006fbd18e4751e5a8394403aed4 (diff)
downloadclasspath-cc4b3d34f0b1854867f160727dcfc78bcb90442c.tar.gz
2006-08-20 Ito Kazumitsu <kaz@maczuka.gcd.org>
Fixes bug #28412 * gnu/java/util/regex/CharIndexed.java(move1, setHitEnd, hitEnd): New methods. * gnu/java/util/regex/CharIndexedCharSequence.java, gnu/java/util/regex/CharIndexedInputStream.java: Implemented the new methods above. * gnu/java/util/regex/RE.java(REG_FIX_STARTING_POSITION): New flag, (match): call the new method setHitEnd of the input, (getMatchImpl): Handle the new flag REG_FIX_STARTING_POSITION, Some optimization commented out, Use CharIndexed#move1 instead of move. * gnu/java/util/regex/REMatch.java: Made some debugging methods public. * gnu/java/util/regex/REToken.java(match): The method body has been moved to an internal private method, (matchFake): New method, (setHitEnd): New method. * gnu/java/util/regex/RETokenChar.java(matchThis): Call setHitEnd if the match is not complete, (matchOneString): Count the number of characters which matched the pattern. * gnu/java/util/regex/RETokenEnd.java(fake): New field, (setFake): New method, (match): Call super.match or super.matchFake. * gnu/java/util/regex/RETokenEndSub.java(setHitEnd): New method. * gnu/java/util/regex/RETokenOneOf.java(match): call the new method setHitEnd of the input, * gnu/java/util/regex/RETokenRepeated.java(match): Likewise. * java/util/regex/Matcher.java(lookingAt, match): Use the new flag RE.REG_FIX_STARTING_POSITION, (hitEnd, toString): New methods.
Diffstat (limited to 'gnu/java/util/regex/CharIndexedInputStream.java')
-rw-r--r--gnu/java/util/regex/CharIndexedInputStream.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/java/util/regex/CharIndexedInputStream.java b/gnu/java/util/regex/CharIndexedInputStream.java
index 77cd1abd5..844fada51 100644
--- a/gnu/java/util/regex/CharIndexedInputStream.java
+++ b/gnu/java/util/regex/CharIndexedInputStream.java
@@ -166,6 +166,16 @@ class CharIndexedInputStream implements CharIndexed {
"difficult to support getLastMatch for an input stream");
}
+ public void setHitEnd(REMatch match) {
+ throw new UnsupportedOperationException(
+ "difficult to support setHitEnd for an input stream");
+ }
+
+ public boolean hitEnd() {
+ throw new UnsupportedOperationException(
+ "difficult to support hitEnd for an input stream");
+ }
+
public int getAnchor() {
throw new UnsupportedOperationException(
"difficult to support getAnchor for an input stream");
@@ -176,6 +186,10 @@ class CharIndexedInputStream implements CharIndexed {
"difficult to support setAnchor for an input stream");
}
+ public boolean move1(int index) {
+ throw new UnsupportedOperationException(
+ "difficult to support move1 for an input stream");
+ }
}