int count = 0;
Parser.Table.Reduction r = null;
for(Parser.Table.Reduction red : token==null ? state.getEofReductions() : state.getReductions(token)) { r = red; count++; }
- //if (count==0) return; // BEWARE! this optimization is suspected to cause really nasty heisenbugs
+ if (count==0) return; // BEWARE! this optimization is suspected to cause really nasty heisenbugs
//if (count > 1) break;
//if (r.numPop == 0) break;
//r.reduce(pending, parent, null, Phase.this, null);
public final class Node {
private Forest.Ref holder = null;
+ private boolean allqueued = false;
private HashMap<Parser.Table.Reduction,Forest> cache = null;
/** what state this node is in */
public final Parser.Table.State state;
+
/** which Phase this Node belongs to (node that Node is also a non-static inner class of Phase) */
public final Phase phase = Phase.this;
for(Node n : h) queueReductions(n);
}
- private boolean allqueued = false;
- private HashSet<Node> queued = new HashSet<Node>();
/** FIXME */
public void queueReductions(Node n2) {
if (!allqueued) { queueReductions(); return; }
- if (queued.contains(n2)) return;
- queued.add(n2);
Node n = this;
for(Parser.Table.Reduction r : token==null ? n.state.getEofReductions() : n.state.getReductions(token)) {