if (start0.contains(p.owner()) && p.next()==null)
state.accept = true;
- if (p.isRightNullable(cache)) {
+ if (isRightNullable(p)) {
Walk.Follow wf = new Walk.Follow(top.empty(), p.owner(), all_elements, cache);
Reduction red = new Reduction(p);
}
}
+ private boolean isRightNullable(Position p) {
+ if (p.isLast()) return true;
+ if (!p.element().possiblyEpsilon(this)) return false;
+ return isRightNullable(p.next());
+ }
+
/** a single state in the LR table and the transitions possible from it */
public class State implements Comparable<Table.State>, IntegerMappable, Iterable<Position> {