[antlr-interest] Request enhancement ANTLR

Silvain Piree s.piree at enneya.com
Thu Jun 20 00:25:11 PDT 2002


John,

> I've had to implement the same thing by using custom
>  tokens and custom AST. 

I've considered this and it should work for most situations,
but there is one problem: in case of a syntax error the
parser throws a NoViableAltException where it calls
the getFilename() of the parser which could be different
than the filename for the token:

 throw new NoViableAltException(LT(1), getFilename())

which should be somthing like:

 throw new NoViableAltException(LT(1), LT(1).getFilename())

Did you encounter this problem? Any solution there?
(I guess this is caused by the fact that have 
"defaultErrorHandler=true")

Silvain




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list