X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FGSS.java;h=8053ae8a8b7a014f259dbdd81c8a30dac879fa46;hp=cff543d699845a77aa71ee30ec05570fb724472f;hb=a22c5074e705e3ffcf03e9f9d174aed8ef79fc91;hpb=c366dacc334fe2e35835164f5a37d3eebb2ca6d5;ds=sidebyside diff --git a/src/edu/berkeley/sbp/GSS.java b/src/edu/berkeley/sbp/GSS.java index cff543d..8053ae8 100644 --- a/src/edu/berkeley/sbp/GSS.java +++ b/src/edu/berkeley/sbp/GSS.java @@ -154,10 +154,10 @@ class GSS { return ret.toString(); } - public boolean isDone() throws Parser.Failed { + public boolean isDone() throws ParseFailed { if (token != null) return false; if (token==null && finalResult==null) - throw new Parser.Failed(error(red("unexpected end of file\n")), + throw new ParseFailed(error(red("unexpected end of file\n")), getLocation()); return true; } @@ -304,7 +304,7 @@ class GSS { } /** perform all shift operations, adding promoted nodes to next */ - public void shift(Phase next, Forest result) throws Parser.Failed { + public void shift(Phase next, Forest result) throws ParseFailed { if (prev!=null) prev.hash = null; this.next = next; closed = true; @@ -320,10 +320,10 @@ class GSS { } if (!good && token!=null) - throw new Parser.Failed(error(red("unexpected character")+" "+purple(token)+" encountered at "+green(getLocation())+"\n"), + throw new ParseFailed(error(red("unexpected character")+" "+purple(token)+" encountered at "+green(getLocation())+"\n"), getLocation()); if (token==null && finalResult==null) - throw new Parser.Failed(error(red("unexpected end of file\n")), + throw new ParseFailed(error(red("unexpected end of file\n")), getLocation()); // this massively improves GC performance