Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
parent
c648dedbde
commit
97b8365caf
17478 changed files with 606493 additions and 100744 deletions
|
@ -58,15 +58,20 @@ final class RETokenChar extends REToken {
|
|||
}
|
||||
|
||||
REMatch matchThis(CharIndexed input, REMatch mymatch) {
|
||||
int z = ch.length;
|
||||
if (matchOneString(input, mymatch.index)) {
|
||||
mymatch.index += z;
|
||||
mymatch.index += matchedLength;
|
||||
return mymatch;
|
||||
}
|
||||
// java.util.regex.Matcher#hitEnd() requires that the length of
|
||||
// partial match be counted.
|
||||
mymatch.index += matchedLength;
|
||||
input.setHitEnd(mymatch);
|
||||
return null;
|
||||
}
|
||||
|
||||
boolean matchOneString(CharIndexed input, int index) {
|
||||
private int matchedLength;
|
||||
private boolean matchOneString(CharIndexed input, int index) {
|
||||
matchedLength = 0;
|
||||
int z = ch.length;
|
||||
char c;
|
||||
for (int i=0; i<z; i++) {
|
||||
|
@ -74,6 +79,7 @@ final class RETokenChar extends REToken {
|
|||
if (! charEquals(c, ch[i])) {
|
||||
return false;
|
||||
}
|
||||
++matchedLength;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue