[antlr-interest] Possible to Maintain LineNum Info For _ALL_ AST Nodes...

Ric Klaren klaren at cs.utwente.nl
Wed Jul 30 05:14:09 PDT 2003


On Tue, Jul 29, 2003 at 11:19:03PM -0000, JonFroehlich wrote:
> 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.

It's best to set line info on imaginary nodes by hand. Since they are
imaginary there's no failsafe way to set the line info automatically. So
you'd probably have to do setLine, setColumn on them manually.

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
     Human beings, who are almost unique in having the ability to learn
   from the experience of others, are also remarkable for their apparent
         disinclination to do so. --- Douglas Adams, Last Chance to See


 

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




More information about the antlr-interest mailing list