[antlr-interest] Knowing line and position in tree parser

BeRniTo bernito.lb at gmail.com
Sun Nov 21 06:28:52 PST 2010


I forgot to mention I'm using Java as the resulting language.

The thing is I've moved some semantic checking I was doing in the parser
into a tree grammar and now the *start* argument of a rule is returning the
matching text instead of what it returns in the parser (the line and
position of what the rule matched and some other things I don't understand).
With that information I managed to get the line and position but I'm stuck
now in the tree grammar.

I'm new to ANTLR and chose it to do a project for university.

Sorry if I wasn't clear enough earlier. The question would be:
How can I get the line and position of what a rule matched in a tree
grammar?

Thanks!

P.S: Sorry about my english, I'm from Uruguay and our first language is
spanish. :-P


More information about the antlr-interest mailing list