import java.lang.reflect.*;
class Node
- implements GraphViz.ToGraphViz {
+ implements IntegerMappable,
+ GraphViz.ToGraphViz {
// GraphViz //////////////////////////////////////////////////////////////////////////////
}
public boolean isTransparent() { return false; }
public boolean isHidden() { return false; }
+
+ // IntegerMappable ////////////////////////////////////////////////////////////
+
+ private static int node_idx = 0;
+ private final int idx = node_idx++;
+ public int toInt() { return idx; }
+
}
\ No newline at end of file
final class StateNode
extends Node
implements Invokable<Pos, ResultNode, Object>,
- IntegerMappable,
Iterable<ResultNode> {
/** which GSS.Phase this StateNode belongs to */
public Iterator<ResultNode> iterator() { return results.iterator(); }
public Parser.Table.State state() { return state; }
- public int toInt() { return idx; }
-
boolean destroyed = false;
public void check() {
//////////////////////////////////////////////////////////////////////
- private static int node_idx = 0;
- private final int idx = node_idx++;
-
private final GSS.Phase phase;
private final GSS.Phase predPhase;
private final Parser.Table.State state;