[antlr-interest] Re: need help for proceding forward:line number

antlrlist antlrlist at yahoo.com
Wed Jun 25 10:59:53 PDT 2003


This is one of the problems you could handle with antlraux 
(http://imaginatica.us.es/~enrique/antlraux).

LexInfoAST does what you want, but a bit extended (with column and 
filename). You can see LexInfoAST's javadoc documentation here:
http://imaginatica.us.es/~enrique/antlraux/javadoc/antlraux/util/LexIn
foAST.html. Even if you don't want to use LexInfoAST, I recommend you 
to read that link.

Have a look!

Enrique


--- In antlr-interest at yahoogroups.com, "ramesh_jun24" 
<ramesh_jun24 at y...> wrote:
> hi,
> 
> I have got to know how to extned CommonAST.
> with code
> 
> import antlr.CommonAST;
> import antlr.Token;
> public class CommonASTWithLines extends CommonAST {
>      private int line = 0;
>      public void initialize(Token tok) {
>           super.initialize(tok);
>           line=tok.getLine();
>      }
>      public int getLine(){
>           return line;
>      }
> }
> 
> 
> but then were all i have to make modification for the code  can 
> anybody tell me. I am parsing java file.
> 
> ramesh


 

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




More information about the antlr-interest mailing list