[antlr-interest] Bug in 2.7.6 with lexer option defaultErrorHandler
= true
Alexey Demakov
allex at all-x.net
Wed Feb 15 05:53:49 PST 2006
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 );
}
Regards,
Alexey
-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com
More information about the antlr-interest
mailing list