GSS: add isFrontier(), make next private
authoradam <adam@megacz.com>
Mon, 26 Feb 2007 01:23:04 +0000 (20:23 -0500)
committeradam <adam@megacz.com>
Mon, 26 Feb 2007 01:23:04 +0000 (20:23 -0500)
darcs-hash:20070226012304-5007d-3e8adf91a49e589f69de49b624c8870ac028e1ff.gz

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;
 
         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;
         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);
         }
             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)
         public boolean isDone() throws ParseFailed {
             if (token != null) return false;
             if (token==null && finalResult==null)