checkpoint
[sbp.git] / src / edu / berkeley / sbp / Parser.java
index f087a05..817aea6 100644 (file)
@@ -311,8 +311,9 @@ public abstract class Parser<T extends Token, R> {
             }
             public String toString() { return "[reduce " + position + "]"; }
 
-            public Forest reduce(GSS.Phase.Node parent, GSS.Phase.Node onlychild, Forest rex) {
-                Forest ret = reduce(parent, numPop-1, rex, onlychild, parent.phase());
+            public Forest reduce(GSS.Phase.Node parent) {
+                Forest rex = numPop==0 ? zero() : null;
+                Forest ret = reduce(parent, numPop-1, rex, null, parent.phase());
                 return ret;
             }