[antlr-interest] Stop ASTWalker on own Exception
Alexander Gängel
alexander at gaengel.de
Sun Mar 16 14:47:55 PDT 2008
I throw under some circumstances in an Action an exception.
Is it possible to stop the astwalker when the excetion occurs? In the
book the example only works when an RecognitionException occurs.
The rule is like this:
rule: Identifier
{
...owncode...
if(error){
throw new OwnException();
}
}
;
catch [OwnException e]{
System.err.println(e.toString());
}
Thank you
Alexander
More information about the antlr-interest
mailing list