[antlr-interest] Showing Line and Column information for tokens in TreeParser?

Terence Parr parrt at jguru.com
Sun Apr 6 14:07:40 PDT 2003


On Sunday, April 6, 2003, at 01:52  PM, alexanderhars wrote:

> I am trying to parse Java source code using the Java 1.3 grammar. I am
> using the JavaTreeParser but it only displays Text and Type
> information. I would like to add Line and Column information to all
> the elements shown in the tree. Is there a way of doing this?

I"m sort of doing the same thing right now.  I'm storing the token 
object in the AST rather than the text/type by making my own derivative 
of BaseAST.

Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

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




More information about the antlr-interest mailing list