public boolean isDone() throws ParseFailed {
if (token != null) return false;
if (token==null && finalResult==null)
- throw new ParseFailed(ParseFailed.error(("unexpected end of file\n"),
- token, hash.values()),
- getLocation().createRegion(getLocation()), input);
+ ParseFailed.error("unexpected end of file",
+ getLocation(),
+ token,
+ hash.values(),
+ getLocation().createRegion(getLocation()),
+ input,
+ GSS.this);
return true;
}
}
if (!good && token!=null)
- throw new ParseFailed(ParseFailed.error(("unexpected character ")+" \'"+
- ANSI.purple(StringUtil.escapify(token+"", "\\\'\r\n"))+
- "\' encountered at "+
- ANSI.green(next.getRegion())+"\n", token, hash.values()),
- next.getRegion(), input);
+ ParseFailed.error("unexpected character",
+ getLocation(),
+ token,
+ hash.values(),
+ getRegion(),
+ input,
+ GSS.this);
+
if (token==null && finalResult==null)
- throw new ParseFailed(ParseFailed.error(("unexpected end of file at "+getLocation()+"\n"), token, hash.values()),
- getLocation().createRegion(getLocation()), input);
+ ParseFailed.error("unexpected end of file",
+ getLocation(),
+ token,
+ hash.values(),
+ getLocation().createRegion(getLocation()),
+ input,
+ GSS.this);
}