- final <T> Forest<T> rewrite(Input.Location loc) {
- if (this==firstp()) return epsilonForm();
- return rewrite2(loc);
- }
-
- final <T> Forest<T> rewrite2(Input.Location loc) {
+ final <T> Forest<T> rewrite(Input.Location loc) { return rewrite(loc, true); }
+ private final <T> Forest<T> rewrite(Input.Location loc, boolean epsilonCheck) {
+ if (epsilonCheck && this==firstp()) return epsilonForm();