[antlr-interest] NoViableAltException.expecting ?

Geir Ove Skjaervik geiroves at online.no
Wed Nov 16 00:53:03 PST 2005


Hello,
 
Not a stupid question at all. I think it is just a ANTLR 2.x weakness
that we can just hope will get rectified in an 2.x upgrade. I sure miss
a more sensible exception in that case as well.
 
 
Geir Ove

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Sebastien Boving
Sent: 16. november 2005 07:49
To: antlr-interest at antlr.org
Subject: [antlr-interest] NoViableAltException.expecting ?



I searched the mailing list but noone seems to have asked for this so
far, yet i'm a newbie so it must be a stupid proposal... Basically i
can't find why, next to the unexpected token, NoViableAltException
doesn't record what it tried to match against (such as
MismatchedTokenException.expecting does)?  This looks like it would be
useful information to include for error reporting or auto-completion
features.  Or are there other, better ways of investigating the parser's
state at the time of a RecognitionException?

thanks,
-seb.









-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20051116/362ff448/attachment-0001.html


More information about the antlr-interest mailing list