[antlr-interest] Re: How to locate errors?

lgcraymer lgc at mail1.jpl.nasa.gov
Wed Oct 23 23:30:33 PDT 2002


What you are seeing is an example of cascaded exceptions--the first 
exception had the line number set, but after that was caught and a 
second exception thrown, the second exception did not have the line 
info set.  Run antlr under a Java debugger and set it to catch ANTLR 
exceptions, then look at the appropriate field in the Exception 
instance.

--Loring


--- In antlr-interest at y..., "xdjicn" <xdji at u...> wrote:
> In compiling a parser file,ANTLR gives the following messages:
> 
> /////////////////////////////////////////////
> ANTLR Parser Generator   Version 2.7.1   1989-2000 jGuru.com
> error: Token stream error reading grammar
> (s):antlr.TokenStreamRecognitionExcepti
> on: expecting '*', found ' '
> TokenStreamException: expecting '*', found ' '
> /////////////////////////////////////////////
> How can I get the line number where the error occurs?
> Thanks!


 

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



More information about the antlr-interest mailing list