[antlr-interest] line numbers in tree parser

hero_onethousand ebell at edgeofreality.com
Tue Nov 2 16:35:43 PST 2004



I apologize in advance if this topic has been discussed, but I had no
luck searching the archive.

I am using a tree parser to perform semantic checks/transformations
and I need to get line numbers to report errors. In the parser I can
use the lexer's shared input state or the line number stored in a
token, but neither of these apply when walking the AST in the tree
parser. AST nodes do not store line numbers like tokens do. 

I am looking for the path of least resistence. My current plan is to
make some minor alterations to CommonAST and the ASTFactory so the
current line number is always copied into the AST. 

Evan A. Bell
Game Programmer
www.edgeofreality.com





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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





More information about the antlr-interest mailing list