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

getting line numbers



Hello,

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
org.sablecc.java.node.AMethodDeclaration
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
too).

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

many thanks,

Ivan


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com