HashMap<Pos,State<Token>> gotoSetNonTerminals = new HashMap<Pos,State<Token>>();
private transient TopologicalBag<Token,State<Token>> gotoSetTerminals = new TopologicalBag<Token,State<Token>>();
- private TopologicalBag<Token,Pos> reductions = new TopologicalBag<Token,Pos>();
- private HashSet<Pos> eofReductions = new HashSet<Pos>();
+ TopologicalBag<Token,Pos> reductions = new TopologicalBag<Token,Pos>();
+ HashSet<Pos> eofReductions = new HashSet<Pos>();
private TopologicalBag<Token,State<Token>> shifts = new TopologicalBag<Token,State<Token>>();
private boolean accept = false;
Iterable<Pos> positions() { return hs; }
boolean canShift(Token t) { return oshifts!=null && oshifts.contains(t); }
- void invokeShifts(Token t, GSS.Phase phase, Result r) { oshifts.invoke(t, phase, r); }
+ void invokeShifts(Token t, GSS.Phase phase, Node pred, Forest f) { oshifts.invoke(t, phase, pred, f); }
boolean canReduce(Token t) {
return oreductions != null && (t==null ? eofReductions.size()>0 : oreductions.contains(t)); }
void invokeEpsilonReductions(Token t, Node node) {
- if (t==null) for(Pos r : eofReductions) node.invoke(r, null);
- else oreductions.invoke(t, node, null);
+ if (t==null) for(Pos r : eofReductions) node.invoke(r, null, null);
+ else oreductions.invoke(t, node, null, null);
}
void invokeReductions(Token t, Node node, Result b) {
- if (t==null) for(Pos r : eofReductions) node.invoke(r, b);
- else oreductions.invoke(t, node, b);
+ if (t==null) for(Pos r : eofReductions) node.invoke(r, b, null);
+ else oreductions.invoke(t, node, b, null);
}
// Constructor //////////////////////////////////////////////////////////////////////////////