checkpoint
[sbp.git] / src / edu / berkeley / sbp / Parser.java
index dc6c1f6..90f86f2 100644 (file)
@@ -184,7 +184,7 @@ public abstract class Parser<T extends Token, R> {
             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 reductions.get(t); }
+            public Iterable<Reduction> getReductions(Token t)      { return t==null ? eofReductions : reductions.get(t); }
             public Iterable<Reduction> getEofReductions()          { return eofReductions; }
             public Iterator<Position>  iterator()                  { return hs.iterator(); }