[antlr-interest] need help for proceding forward:line number
mzukowski at yci.com
mzukowski at yci.com
Tue Jun 24 09:46:01 PDT 2003
An example of extending CommonAST would be in the gcc transformation toolkit
http://www.codetransform.com/gcc.html Specifically see the file
http://www.antlr.org/grammars/cgram/grammars/CToken.java
Monty
-----Original Message-----
From: ramesh_jun24 [mailto:ramesh_jun24 at yahoo.co.in]
Sent: Tuesday, June 24, 2003 5:13 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] need help for proceding forward:line number
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/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list