checkpoint
[sbp.git] / src / edu / berkeley / sbp / Parser.java
index d258b78..08c49a9 100644 (file)
@@ -343,9 +343,8 @@ public abstract class Parser<T extends Token, R> {
                     rex = position.rewrite(target.getLocation());
                 }
                 for(GSS.Phase.Node child : parent.parents())
                     rex = position.rewrite(target.getLocation());
                 }
                 for(GSS.Phase.Node child : parent.parents())
-                    //if (pos==0) finish(parent, rex, target);
-                    //else
-                    reduce(child, pos-1, rex, target);
+                    if (pos==0) finish(child, rex, target);
+                    else reduce(child, pos-1, rex, target);
                 return rex;
             }
             private Forest finish(GSS.Phase.Node parent, Forest result, GSS.Phase target) {
                 return rex;
             }
             private Forest finish(GSS.Phase.Node parent, Forest result, GSS.Phase target) {