checkpoint
authoradam <adam@megacz.com>
Wed, 4 Jan 2006 10:49:14 +0000 (05:49 -0500)
committeradam <adam@megacz.com>
Wed, 4 Jan 2006 10:49:14 +0000 (05:49 -0500)
darcs-hash:20060104104914-5007d-913ac463629afb684e9ce5b99e7681453c298558.gz

src/edu/berkeley/sbp/GSS.java
src/edu/berkeley/sbp/Parser.java

index a4f3d6a..0bc14ae 100644 (file)
@@ -202,7 +202,7 @@ class GSS {
                 int where = parents().size();
                 for(Parser.Table.Reduction r : state.getReductions(token))
                     if (r.numPop >= 1)
-                        r.reduce(this, null, null);
+                        r.reduce(this);
             }
 
             public void queueReductions(Node n2) {
@@ -217,7 +217,7 @@ class GSS {
                 if (reducing)
                     for(Parser.Table.Reduction r : token==null ? state.getEofReductions() : state.getReductions(token))
                         if (r.numPop==0)
-                            r.reduce(this, null, r.zero());
+                            r.reduce(this);
             }
 
             private Node(Node parent, Forest pending, Parser.Table.State state, Phase start) {
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;
             }