3 ms·
I've heard many compilers started with yacc/bison, but later went hand-written for better error messages. Currently, jq (pretty much, awk for json https://sted
by hyperpallium 10y ago
I've heard many compilers started with yacc/bison, but later went hand-written for better error messages.
Currently, jq (pretty much, awk for json https://stedolan.github.io/jq/ https://stedolan.github.io/jq/) uses bison, but sometimes has unhelpful syntax error messages. I'm not the maintainer or anything, but trying to trigger error messages more precisely (i.e. diagnosis) was a nightmare.
While a generator can't match a custom parser for control, is it plausible to have arbitrarily precise hooks in ANTLR for diagnostic messages?
BTW unfortunately deadlink http://stackoverflow.com/questions/16503217/antlr-for-commercial-compilers-why-not/16503455#16503455 http://stackoverflow.com/questions/16503217/antlr-for-commer...