I am trying to get the line number in the grammar of the ANTLR3 tree (the code generated by ANTLR3 belongs to the TreeParser class).
Google just found solutions for ANTLR2 that, unfortunately, do not work in ANTLR3.
for clarification, I'm trying to access the line number in the .g file itself.
I think I need to rewrite the method or extend the class, I just don't know which one.
tnx in advance
Edit: I have to indicate that I am using java api
source
share