X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fedu%2Fberkeley%2Fsbp%2FParser.java;h=0504a111e587a76e6c675fcaf5befc0664f265c1;hb=82f9b8d4a2fadb14cb004e5cc9f14944458f2e6c;hp=300ff27fd31156ea7a4daf2f3914fe6a7fce15b2;hpb=a26089cd0d7c95cad657b745e836cb4cba35a97a;p=sbp.git diff --git a/src/edu/berkeley/sbp/Parser.java b/src/edu/berkeley/sbp/Parser.java index 300ff27..0504a11 100644 --- a/src/edu/berkeley/sbp/Parser.java +++ b/src/edu/berkeley/sbp/Parser.java @@ -15,9 +15,9 @@ public abstract class Parser { protected Parser(Table pt) { this.pt = pt; } /** implement this method to create the output forest corresponding to a lone shifted input token */ - public abstract Forest shiftToken(Input.Location oldloc, Tok t, Input.Location newloc); + protected abstract Forest shiftToken(Tok t, Input.Location newloc); - public boolean helpgc = true; + boolean helpgc = true; public String toString() { return pt.toString(); } @@ -32,7 +32,7 @@ public abstract class Parser { Input.Location oldloc = loc; loc = input.getLocation(); current.reduce(); - Forest forest = current.token==null ? null : shiftToken(oldloc, (Tok)current.token, loc); + Forest forest = current.token==null ? null : shiftToken((Tok)current.token, loc); GSS.Phase next = gss.new Phase(current, this, current, input.next(), loc, forest); if (!helpgc) { FileOutputStream fos = new FileOutputStream("out-"+idx+".dot");