[antlr-interest] Detecting incomplete input in ANTLR V2

Scott Amort jsamort at gmail.com
Tue Aug 8 06:10:49 PDT 2006


Hi Thomas,

Thomas Rolfs wrote:
> No worries, I got it to work. However, I had to hack
> RecognitionException so that I could safely up cast to
> MismatchedTokenException in my overloaded reportError().

I'm not sure how (or why) you could do this as MismatchedTokenException 
derives from RecognitionException, not the other way around (i.e. any 
MismatchedTokenException will be caught by the more general 
RecognitionException).  Perhaps you meant downcasting?  But either way, 
I don't see why you would need to have altered RecognitionException.

Best,
Scott



More information about the antlr-interest mailing list