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

Tamas Kerecsen kerecsen at gmail.com
Mon Aug 14 19:49:24 PDT 2006


Terence,

The cardinal difficulty is that Lexer.nextToken's 'throws' signature doesn't
allow me to throw an exception even if I override it. For the time being I
hacked around this limitation by adding a new member (using @lexer::members)
to the lexer and overriding nextToken (again, using @lexer::members) to set
the new variable when it encounters a recognition exception. But this isn't
pretty at all, so please add a more convenient mechanism down the line when
you get a chance...

Thanks,
  Tamas

On 8/14/06, Terence Parr <parrt at cs.usfca.edu> wrote:
>
> Override the lexer to alter nextToken I guess.  It normally tries to
> get another token.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060814/d0d56c5f/attachment.html


More information about the antlr-interest mailing list