[antlr-interest] Possible to Maintain LineNum Info For _ALL_ AST Nodes...
JonFroehlich
jonfroehlich at hotmail.com
Tue Jul 29 16:19:03 PDT 2003
I've extended the CommonAST class to track line number information
for each AST node. However, there are still a few nodes in the tree
that don't call "initialize(token tok)" and therefore don't get their
line # info set. For instance, using the java.g grammar, CLASS_DEF,
VARIABLE_DEF, METHOD_DEF, etc. contain no line number information
(though their children always do so I'm usually able to figure out
something based on that).
Ideally, every single node in the tree would have a line number
assigned to it. I'm new to parsing/ANTLR so I'm not sure if this is
possible or easy to do.
Any advice would greatly be appreciated.
j
Please reply to the group list and not directly to my e-mail account.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list