01: package persistence.antlr;
02:
03: /* ANTLR Translator Generator
04: * Project led by Terence Parr at http://www.jGuru.com
05: * Software rights: http://www.antlr.org/license.html
06: *
07: */
08:
09: public class DefaultFileLineFormatter extends FileLineFormatter {
10: public String getFormatString(String fileName, int line, int column) {
11: StringBuffer buf = new StringBuffer();
12:
13: if (fileName != null)
14: buf.append(fileName + ":");
15:
16: if (line != -1) {
17: if (fileName == null)
18: buf.append("line ");
19:
20: buf.append(line);
21:
22: if (column != -1)
23: buf.append(":" + column);
24:
25: buf.append(":");
26: }
27:
28: buf.append(" ");
29:
30: return buf.toString();
31: }
32: }
|