}
}
- class Last<Tok extends Token> extends WalkTokenSet<Tok> {
- public Last(Topology<Tok> cs, Walk.Cache cache) { super(cs, cache); }
- public Topology<Tok> sequence(Sequence seq) { sequence(seq.firstp()); return cs; }
- private Topology<Tok> sequence(Position p) {
- if (p==null) return null;
- Topology<Tok> ret = sequence(p.next());
- if (ret!=null) return ret;
- if (p.isLast()) return null;
- if (p.element().possiblyEpsilon(c)) return null;
- if (p.element()==null) return null;
- return walk(p.element());
- }
- }
-
static class Follow<Tok extends Token> extends WalkTokenSet<Tok> {
private final Element me;
private final HashSet<Element> all;
Topology<Tok> cso = cs;
boolean eofo = eof;
- eof = false;
+ eof = c.eof.get(e) != null && c.eof.get(e).booleanValue();
cs = cso.empty();
- if (e instanceof Parser.Table.Top) eof = true;
for(Element x : all) {
boolean matched = false;
- if (x instanceof Parser.Table.Top) walk(x); // because this symbol might not appear in any other Sequence
if (!(x instanceof Sequence)) continue;
Sequence a = (Sequence)x;
Position mp = null;