Error concerning defaultErrorHandler in Lexer's / antlr.2.7.5 / Java
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kai_Koehne
Posted On:   Tuesday, February 22, 2005 01:38 AM

If I compile a lexer with defaultErrorHandler=true; , antlr 2.7.5 generates following Java code for error handling:

			
catch (RecoginitionException ex) {
if (inputState.guessing==0) {
reportError(ex);
recover(ex,_tokenSet_0);
} else {
throw ex;
}
}


which doesn't compile because the recover() method doesn't exist.

A simple demo for this problem is add the defaultErrorHandler=true; line to the lexer options in examples/java/java/Java.g
About | Sitemap | Contact