X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FParseFailed.java;h=316caafe6bc6d284fdb83da30792f5ad9ba26426;hp=d1e60aea000771313fb538496ce064bef0c6f003;hb=b8a597c8d1a29afc24f9b89f726d5b1a9b9aeec1;hpb=f09d2abb95f106197aea99c345282c3bf0cd3717 diff --git a/src/edu/berkeley/sbp/ParseFailed.java b/src/edu/berkeley/sbp/ParseFailed.java index d1e60ae..316caaf 100644 --- a/src/edu/berkeley/sbp/ParseFailed.java +++ b/src/edu/berkeley/sbp/ParseFailed.java @@ -12,14 +12,14 @@ public class ParseFailed extends Exception { private final Input.Location location; private final String message; - public ParseFailed() { this("", null); } - public ParseFailed(String message, Input.Location loc) { this.location = loc; this.message = message; } + ParseFailed() { this("", null); } + ParseFailed(String message, Input.Location loc) { this.location = loc; this.message = message; } public Input.Location getLocation() { return location; } public String toString() { return message/* + (location==null ? "" : (" at " + location))*/; } // FIXME private static HashSet touched = new HashSet(); - public static void complain(GSS.Phase.Node n, HashMap> errors, boolean force) { + static void complain(GSS.Phase.Node n, HashMap> errors, boolean force) { if (touched.contains(n)) return; touched.add(n); for(Position p : n.state) { @@ -35,7 +35,7 @@ public class ParseFailed extends Exception { } } - public static String el(Object e) { + static String el(Object e) { String s = e.toString(); if (s.length()==0 || s.charAt(0)!='\"' || s.charAt(s.length()-1)!='\"') return /*ANSI.yellow(s)*/s; s = s.substring(1); @@ -47,7 +47,7 @@ public class ParseFailed extends Exception { } return /*ANSI.purple(ret.toString())*/ret.toString(); } - public static String error(String message, Object token, Iterable nodes) { + static String error(String message, Object token, Iterable nodes) { String lookAhead = token==null ? "" : token.toString(); StringBuffer ret = new StringBuffer(); ret.append("\n ");