[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting line numbers


I am using the Java1.1 parser included in the
sablecc examples - I've found it very simple
to use for what I've needed so far.
(I'm working on a code duplication spotting
tool - http://condenser.sf.net)

How do I access the line numbers/character positions
that a node, e.g. an instance of
represents? I'd really like to be able to find out
the start and end positions of such a node in the
original source file. (If line numbers are available,
I would also want the character positions on the lines

I hope this question is phrased clearly enough,
I'm a newbee to the details of parsing and sablecc ...

many thanks,


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts