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

line/col info of node



Hi

This message was sent before right after I joining the mailing list; since this was my first and also since not finding any response, I am not sure whether this got posted. So I am re-posting it.

A frequent approach is to use a depth first adapter to find the first token under the node and use it's line/column info.

how can i get the first token of a node ? I did see the methods getLine/Pos on Token; but didnot know how to get a handle to it from node.

------First message----
Hi Etienne

I am working with SableCC tool to build a tool for PHP.

To handle the tokens I am subclassing DepthFirstAdapter and overriding the necessary functions.
Here I also need to get the location information of the node like line number and column it is
appearing. Any way to do this ?


Thanks in advance for your time
Anthos
------First message----