X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FParser.java;h=ddee582a4c91bc2e95d8179d639012da5274e036;hp=1a0d307dedd8236d536f05303e07ed4c1ae4bdcc;hb=ebb5fe5647046306f415e31e4967b23169c9004e;hpb=08aa6cdd07a882fdedf7a6d5c7bd0d754460965b diff --git a/src/edu/berkeley/sbp/Parser.java b/src/edu/berkeley/sbp/Parser.java index 1a0d307..ddee582 100644 --- a/src/edu/berkeley/sbp/Parser.java +++ b/src/edu/berkeley/sbp/Parser.java @@ -41,12 +41,12 @@ public abstract class Parser { int count = 1; for(;;) { loc = input.getLocation(); + //current.checkFailure(); GSS.Phase next = gss.new Phase(current, input.next(count), loc); current.reduce(); Forest forest = current.token==null ? null : shiftedToken((T)current.token, loc); current.shift(next, forest); count = next.hash.size(); - current.checkFailure(); if (current.isDone()) return (Forest)current.finalResult; current = next; } @@ -61,7 +61,7 @@ public abstract class Parser { public Failed() { this("", null); } public Failed(String message, Token.Location loc) { this.location = loc; this.message = message; } public Token.Location getLocation() { return location; } - public String toString() { return message + (location==null ? "" : (" at " + location)); } + public String toString() { return message/* + (location==null ? "" : (" at " + location))*/; } } public static class Ambiguous extends RuntimeException {