checkpoint
[sbp.git] / src / edu / berkeley / sbp / Parser.java
index a440628..4aa6515 100644 (file)
@@ -21,7 +21,7 @@ public abstract class Parser<Tok, Result> {
 
     public String toString() { return pt.toString(); }
 
-    /** parse <tt>input</tt>, using the table <tt>pt</tt> to drive the parser */
+    /** parse <tt>input</tt>, and return the shared packed parse forest (or throw an exception) */
     public Forest<Result> parse(Input<Tok> input) throws IOException, ParseFailed {
         GSS gss = new GSS();
         Input.Location loc = input.getLocation();
@@ -144,7 +144,7 @@ public abstract class Parser<Tok, Result> {
                     // if the element following this position is an atom, copy the corresponding
                     // set of rows out of the "master" goto table and into this state's shift table
                     if (p.element() != null && p.element() instanceof Atom)
-                        state.shifts.addAll(state.gotoSetTerminals.subset(((Atom)p.element()).underlying()));
+                        state.shifts.addAll(state.gotoSetTerminals.subset(((Atom)p.element()).getTokenTopology()));
                 }
             if (top instanceof IntegerTopology)
                 for(State<Tok> state : all_states.values()) {
@@ -237,7 +237,7 @@ public abstract class Parser<Tok, Result> {
                     Atom a = (Atom)position.element();
                     HashSet<Position> hp = new HashSet<Position>();
                     reachable(position.next(), hp);
-                    bag0.addAll(a.underlying(), hp);
+                    bag0.addAll(a.getTokenTopology(), hp);
                 }
 
                 // Step 1b: for each _minimal, contiguous_ set of characters having an identical next-position