Hello,

I am trying to build a sophisticated AST using ANTLR. The attributes 
.line and .pos allow me to obtain the start line and column position of 
a token. However, is it also possible to get the end line and column? 
(since I want to have that information in the AST as well to allow 
underlining specific rules in the input text)

I think it would be possible by using .text and then counting chars and 
newlines in that string. However, I think text building is costly and 
not the right way to do it.

So what is the "best" way to get the end line and end column of a token 
or rule in ANTLR?

Best regards,
Jan Finis

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to