// FIXME: right now, these are the performance bottleneck
HashMapBag<Sequence,Phase.Waiting> waiting = new HashMapBag<Sequence,Phase.Waiting>();
// FIXME: right now, these are the performance bottleneck
HashMapBag<Sequence,Phase.Waiting> waiting = new HashMapBag<Sequence,Phase.Waiting>();
/** corresponds to a positions <i>between tokens</i> the input stream; same as Tomita's U_i's */
class Phase<Tok> implements Invokable<State, Forest, Phase<Tok>.Node>, IntegerMappable, GraphViz.ToGraphViz, Iterable<Phase.Node> {
/** corresponds to a positions <i>between tokens</i> the input stream; same as Tomita's U_i's */
class Phase<Tok> implements Invokable<State, Forest, Phase<Tok>.Node>, IntegerMappable, GraphViz.ToGraphViz, Iterable<Phase.Node> {
- if (!owner.lame)
- newNode(parent, pending, state, fromEmptyReduction);
+ newNode(parent, pending, state, fromEmptyReduction);
- if (pos==0) child.finish(r, r.rewrite(new Input.Region(child.phase().getLocation(), phase().getLocation())), target);
+ if (pos==0) child.finish(r, r.rewrite(child.phase().getLocation().createRegion(phase().getLocation())), target);
else child.reduce(r, pos-1, target, null);
}
else child.reduce(r, pos-1, target, null);
}