[antlr-interest] ANTLR or ANTLR Eclipse plugin bug

Prashant Deva prashant.deva at gmail.com
Tue Aug 9 06:33:38 PDT 2005


Martin,
  Could you please file a bug report for this at -
http://www.antlr.org/misc/feedback
so that this can be looked into and corrected for the future versions of antlr.

PRASHANT

On 8/9/05, Martin Olsson <mnemo at minimum.se> wrote:
> > It seems to be a bug in the code gen. The recover() method is used
> > inside the parser.
> > The lexer as such i dont think can recover the lexing of the same
> > token. if something screws up, it will just skip that char to find the
> > next token.
> >
> > Seeing this I believe the defaultErrorHandler option should be
> > disallowed for lexer rules.
> 
> Having no defaultErrorHandler option specified at all makes my lexer stop
> lexing whenever it runs into a char that is not part of any rule. Having
> set defaultErrorHandler=false gives the same result. However, setting
> defaultErrorHandler=true and implementing a dummy method recover() in the
> lexer get's the job done. Having the dummy method feels ugly though, and
> just as you say I also believe that this might be a code generation bug of
> some sort.
> 
> However, I don't believe just removing defaultErrorHandler would solve all
> problems (not mine atleast). I think, the lexer error handling needs to be
> implemented so that it does what it suppose to do accoring to docs, ie it
> should not stop lexing/parsing when it runs into obscure unknown chars.
> 
> That's my $0.02 =)
> 
> 
> 
> Sincerly,
> martin
> 
>


More information about the antlr-interest mailing list