[antlr-interest] How to get line number during parse?

Trey Spiva Trey.Spiva at embarcadero.com
Fri Jan 18 11:31:42 PST 2002


Tokens have the line number and column that contains the token.  However,
AST's lose the line number and 
column information.  We created a new AST that retained the line and column
number.

-----Original Message-----
From: Todd Blanchard [mailto:todd.blanchard at cacheon.com]
Sent: Friday, January 18, 2002 12:30 PM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] How to get line number during parse?


I'm needing to make a tool that analyzes java code and cites various items.
When a pattern is matched, how do I find out the line number (or even
character number) of the input stream at the location of match?
 
Thanks

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20020118/6803a364/attachment.html


More information about the antlr-interest mailing list