- 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());
- }
- }
-