[antlr-interest] antlr-interest at antlr.org

Danila Piatov danilcha at gmail.com
Wed Dec 14 09:05:57 PST 2011


Hello,

Could you answer me about error recovery?

I started using ANTLR with this article from ANTLR front page:
http://w3.msi.vxu.se/users/tgumsi/antlr/ANTLRtutorial.pdf

I downloaded the latest ANTLRWorks, downloaded article's example Expr.g and
opened it and tried to play with it in interpreter. I also tried to
generate parser, compile it and launch -- results were the same -- parser
stops at the first error.

For example I enter:

5+5+7
somesymbol with spaces
5+6

And it stops at the second line. I was unable to write any, even the
smallest error such that ANTLR could tolerate it and go on. The article
says I can play with it and make errors and see how parser recovers after
them.

Am I doing something wrong?

Dan


More information about the antlr-interest mailing list