Both the Tree and Token interfaces have a method getLine().

Sam

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David Smith
Sent: Wednesday, August 10, 2011 9:02 AM
To: [email protected]
Subject: [antlr-interest] Access to line numbers

It seems that the parse tree generated by the parser has a data field 'line'
that seems to correspond to the source line when parsing.  How do i access
that to include the line number in the tree generated by my grammar?

DMS

David M. Smith http://www.cc.gatech.edu/fac/David.Smith
Georgia Institute of Technology, College of Computing Sent from my ASR-33
Teletype 


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to