- Annotation Tutorial
- - Get at least *some* sort of moderate improvement in the error messages
-
..................................................
- evil problems with: (x y? z /ws)
private final HashSet<SequenceOrElement> all;
private boolean eof = false;
public boolean includesEof() { return eof; }
- public Follow(Topology<Tok> cs, SequenceOrElement me, HashSet<SequenceOrElement> all, Cache c) { super(cs, c); this.me = me; this.all = all; }
+ public Follow(Topology<Tok> cs, SequenceOrElement me, HashSet<SequenceOrElement> all, Cache c) {
+ super(cs, c); this.me = me; this.all = all; }
public Topology<Tok> bottom(SequenceOrElement e) { return cs; }
public Topology<Tok> sequence(Sequence seq) { return cs; }
public Topology<Tok> walkAtom(Atom r) { return walk((SequenceOrElement)r); }
if (end < start) end = start;
if (end > cache.length()) end = cache.length();
String ret;
- if (end-start < 60) ret = cache.substring(start, end);
- else ret = cache.substring(start, start+25) +
+ if (end-start < 60) ret = cachesubstring(start, end);
+ else ret = cachesubstring(start, start+25) +
"..." +
- cache.substring(end-25, end);
+ cachesubstring(end-25, end);
return StringUtil.escapify(ret, "\n\r");
}
+ private String cachesubstring(int start, int end) {
+ if (start < 0) start = 0;
+ if (end < 0) end = 0;
+ if (start >= cache.length()) start = cache.length();
+ if (end >= cache.length()) end = cache.length();
+ return cache.substring(start, end);
+ }
+
}