Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user