[antlr-interest] Parser does not exit immediately upon first recognition error
Can Zhen
canjren at yahoo.com
Thu Oct 16 08:18:42 PDT 2008
I work on a project that requires that Parser does exit immediately upon first recognition error. So I overrode two methods, mismatch() and recoverFromMismatchedSet and add the following to parser grammar:
@rulecatch
{
catch (RecognitionException re)
{
throw re;
}
}
Most of the time, parser does exit immediately upon first recognition error. But sometimes, it only wrote the first RecognitionException message to the System output and continued instead of throwing the exception and exiting out. Any idea why that happened and how to fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081016/d6e45083/attachment.html
More information about the antlr-interest
mailing list