GSS: add isFrontier(), make next private
[sbp.git] / src / edu / berkeley / sbp / GSS.java
index be4276f..f0a4cea 100644 (file)
@@ -38,7 +38,7 @@ class GSS {
 
         public IntPairMap<Node> hash;  /* ALLOC */
         private boolean good;
-         Phase next = null;
+        private Phase next = null;
         private Phase prev;
         private Input.Location location;
         private Input.Location nextLocation;
@@ -61,7 +61,8 @@ class GSS {
             finalResult = null;
             if (prev != null) prev.shift(this, forest);
         }
-      
+
+        public boolean isFrontier() { return next==null; }
         public boolean isDone() throws ParseFailed {
             if (token != null) return false;
             if (token==null && finalResult==null)