[antlr-interest] Cust error recovery
Martin Olsson
mnemo at minimum.se
Tue Jul 26 03:20:17 PDT 2005
Hi (again :o),
When ANTLR runs into a parse error I would like it to skip chars/tokens
until a specific char/token is seen. After digging a while in the ANTLR
source I noticed that there is a method called consumeUntil() which seems
to do what I what.
The problem is, when should I call it? How can I hook my own stuff into
the lexer's bad-token-found code?
And if I do this must I set the defaultErrorHandler=false option? Because
it's not everywhere in the lexer I want to change the recovery procedure.
sincerly,
martin
More information about the antlr-interest
mailing list