checkpoint
[sbp.git] / src / edu / berkeley / sbp / Parser.java
index 4c01e33..31bd1b3 100644 (file)
@@ -22,7 +22,7 @@ public abstract class Parser<Tok, Result> {
         GSS gss = new GSS();
         Input.Location loc = input.getLocation();
         GSS.Phase current = gss.new Phase<Tok>(null, this, null, input.next(1, 0, 0), loc, null);
-        current.newNode(null, Forest.leaf(null, null), pt.start, true);
+        current.newNode(null, Forest.leaf(null, null, null), pt.start, true);
         int count = 1;
         for(;;) {
             loc = input.getLocation();
@@ -38,7 +38,7 @@ public abstract class Parser<Tok, Result> {
     // Table //////////////////////////////////////////////////////////////////////////////
 
     /** an SLR(1) parse table which may contain conflicts */
-    public static class Table<Tok> extends Walk.Cache {
+    static class Table<Tok> extends Walk.Cache {
 
         public final Walk.Cache cache = this;
 
@@ -111,13 +111,13 @@ public abstract class Parser<Tok, Result> {
 
         private boolean isRightNullable(Position p) {
             if (p.isLast()) return true;
-            if (!p.element().possiblyEpsilon(this)) return false;
+            if (!possiblyEpsilon(p.element())) return false;
             return isRightNullable(p.next());
         }
 
         /** a single state in the LR table and the transitions possible from it */
 
-        public class State<Tok> implements Comparable<State<Tok>>, IntegerMappable, Iterable<Position> {
+        class State<Tok> implements Comparable<State<Tok>>, IntegerMappable, Iterable<Position> {
         
             public  final     int               idx    = master_state_idx++;
             private final     HashSet<Position> hs;