// Interface Methods //////////////////////////////////////////////////////////////////////////////
+ public boolean isAccepting() { return accept; }
+
public boolean canShift(Token t) { return shifts.contains(t); }
public Iterable<State> getShifts(Token t) { return shifts.get(t); }
- public boolean isAccepting() { return accept; }
+
public Iterable<Reduction> getReductions(Token t) { return t==null ? eofReductions : reductions.get(t); }
public boolean hasReductions(Token t) { return t==null ? eofReductions.size()>0 : reductions.has(t); }
- public Iterable<Reduction> getEofReductions() { return eofReductions; }
+
public Iterator<Position> iterator() { return hs.iterator(); }
+ public <B,C> void invokeShifts(Token t, Invokable<State,B,C> irbc, B b, C c) { shifts.invoke(t, irbc, b, c); }
+ public <B,C> void invokeReductions(Token t, Invokable<Reduction,B,C> irbc, B b, C c) {
+ if (t==null) for(Reduction r : eofReductions) irbc.invoke(r, b, c);
+ else reductions.invoke(t, irbc, b, c);
+ }
+
// Constructor //////////////////////////////////////////////////////////////////////////////
/**