[antlr-interest] v3 - how to disable error recovery

Terence Parr parrt at cs.usfca.edu
Sun Aug 13 10:17:32 PDT 2006


On Aug 12, 2006, at 12:43 PM, Tamas Kerecsen wrote:

> Hi Everyone,
>
> Is there an easy way in v3 to completely disable error recovery?  
> I'd like to receive an exception on any lexer, parser or tree  
> walker issue and just bail out... v2 had an option that would allow  
> this, but I couldn't find the equivalent in v3 :(
>

Hi Tamas,

Try defining an action:

@rulecatch {}

which will replace the rule catch blocks with nothing.  Exceptions  
should fall through to invoking program.

Ter



More information about the antlr-interest mailing list