Merged gcj-eclipse branch to trunk.

From-SVN: r120621
This commit is contained in:
Tom Tromey
2007-01-09 19:58:05 +00:00
parent c648dedbde
commit 97b8365caf
17478 changed files with 606493 additions and 100744 deletions
@@ -72,6 +72,16 @@ abstract class REToken implements Serializable, Cloneable {
/** Returns true if the match succeeded, false if it failed. */
boolean match(CharIndexed input, REMatch mymatch) {
return match(input, mymatch, false);
}
boolean matchFake(CharIndexed input, REMatch mymatch) {
return match(input, mymatch, true);
}
private boolean match(CharIndexed input, REMatch mymatch, boolean fake) {
if (!fake) {
setHitEnd(input, mymatch);
}
REMatch m = matchThis(input, mymatch);
if (m == null) return false;
if (next(input, m)) {
@@ -81,6 +91,11 @@ abstract class REToken implements Serializable, Cloneable {
return false;
}
/** Sets whether the matching occurs at the end of input */
void setHitEnd(CharIndexed input, REMatch mymatch) {
input.setHitEnd(mymatch);
}
/** Returns true if the match succeeded, false if it failed.
* The matching is done against this REToken only. Chained
* tokens are not checked.