In section 10.4, The Definitive ANTLR reference tells you to override mismatch() & recoverFromMismatchedSet() if you want to exit upon the first parsing error. But, at least in ANTLR 3.2, it appears that there is no mismatch() method, and the recoverFromMismatchedSet() documentation says that it is "Not Currently Used". So it appears things have changed since the book was published.
What am I supposed to do instead to exit upon the first parsing error in ANTLR 3.2?
I posted this question to anltr-interest, and Andrew Haritonkin answered. Bart K is half right; you need to override recoverFromMismatchedSet(), but also recoverFromMismatchedToken().
If you also want the lexer to exit upon the first error, there is a wiki page that explains what to do:
http://www.antlr.org/wiki/pages/viewpage.action?pageId=5341217
Briefly, it states that:
Here is an example grammar that exits upon the first lexer or parser error:
Sample output: