[antlr-interest] Bug in 2.7.6 with lexer option defaultErrorHandler = true

Terence Parr parrt at cs.usfca.edu
Wed Feb 15 10:35:32 PST 2006


On Feb 15, 2006, at 5:53 AM, Alexey Demakov wrote:

> When lexer option defaultErrorHandler is set to true,
> antlr-2.7.6 generates error handlers with call of
> public void recover( RecognitionException ex, BitSet tokenSet )
>
> but this method is defined only in Parser, not in CharScanner,
> so it causes compilation errors.
>
> antlr-2.7.2 "inlines" this method as
>
> consume();
> consumeUntil( tokenSet );
>
> Workaround - define this method in lexer:
>
> public void recover( RecognitionException ex, BitSet tokenSet )  
> throws CharStreamException {
>  consume();
>  consumeUntil( tokenSet );
> }

I swear I fixed that but as you say...fix did not get in there. : 
(  We're going to do a 2.7.7 soon.

Ter


More information about the antlr-interest mailing list