+// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
+
package edu.berkeley.sbp;
import edu.berkeley.sbp.*;
import edu.berkeley.sbp.util.*;
protected final Table<Token> pt;
/** create a parser to parse the grammar with start symbol <tt>u</tt> */
- protected Parser(Union u, Topology<Token> top) { this.pt = new Table<Token>(u, top); }
- protected Parser(Table<Token> pt) { this.pt = pt; }
+ public Parser(Union u, Topology<Token> top) { this.pt = new Table<Token>(u, top); }
+ Parser(Table<Token> pt) { this.pt = pt; }
/** implement this method to create the output forest corresponding to a lone shifted input token */
- protected abstract Forest<NodeType> shiftToken(Token t, Input.Location newloc);
+ public abstract Forest<NodeType> shiftToken(Token t, Input.Location newloc);
boolean helpgc = true;
/** parse <tt>input</tt>, and return the shared packed parse forest (or throw an exception) */
public Forest<NodeType> parse(Input<Token> input) throws IOException, ParseFailed {
- GSS gss = new GSS();
+ GSS gss = new GSS(input);
Input.Location loc = input.getLocation();
Token tok = input.next();
GSS.Phase current = gss.new Phase<Token>(null, this, null, tok, loc, input.getLocation(), null);