public class Node {
private Forest.Ref holder = null;
+
private HashMap<Parser.Table.Reduction,Forest> cache = null;
- public HashMap<Parser.Table.Reduction,Forest> cache() { return cache==null ? (cache = new HashMap<Parser.Table.Reduction,Forest>()) : cache; }
- public Forest.Ref holder() { return holder==null ? (holder = new Forest.Ref()) : holder; }
- public Forest pending() { return Phase.this.closed ? holder().resolve() : holder; }
- public FastSet<Node> parents() { return parents; }
+ /** the set of nodes to which there is an edge starting at this node */
+ public final FastSet<Node> parents = new FastSet<Node>(); /* ALLOC */
- /** which Phase this Node belongs to (node that Node is also a non-static inner class of Phase) */
- public final Phase phase = Phase.this;
/** 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;
- /** the set of nodes to which there is an edge starting at this node */
- public final FastSet<Node> parents = new FastSet<Node>(); /* ALLOC */
+ public HashMap<Parser.Table.Reduction,Forest> cache() { return cache==null ? (cache = new HashMap<Parser.Table.Reduction,Forest>()) : cache; }
+ public Forest.Ref holder() { return holder==null ? (holder = new Forest.Ref()) : holder; }
+ public Forest pending() { return Phase.this.closed ? holder().resolve() : holder; }
+ public FastSet<Node> parents() { return parents; }
/** FIXME */
public void queueReductions() {