[antlr-interest] How to throw an exception for all parsing errors?
Peter C. Chapin
pcc482719 at gmail.com
Fri Apr 3 13:22:51 PDT 2009
On Fri, 3 Apr 2009, Paul Bouché wrote:
> Seems like you forgot to override a method. If you want an exception
> upon first error you must make sure that the recovery mechanism does not
> start. In ANTLR v3.1.x the mismatch() method was renamed to
> recoverFromMismatchedToken() - imo that should be clearer in the release
> notes, i.e. a BIG FAT warning because it is so different from the book.
Yes, that is good to know. It also helps if I use the right name. In the
C# target that's RecoverFromMismatchedToken and RecoverFromMismatchedSet
(note the initial upper case 'R').
It seems to be working much more like I expected now.
Thanks!
Peter
More information about the antlr-interest
mailing list