[antlr-interest] Repeating Tree Nodes, help.
craig at palantir.co.za
craig at palantir.co.za
Wed Jul 23 22:36:03 PDT 2008
Hi,
I know this probably a very elementary question, but I have tried quite a few
combinations. I have a working template grammar that I am trying to convert to
using trees.
I have a production that looks like this:
rule: ROOT id+=IDENTIFIER (SEP id+=IDENTIFIER)+
-> ^(ROOT $id)
I want to match something in the tree, and get out all the identifier(s) in a
list.
In the tree I have
rule: ^(ROOT xn+=IDENTIFIER+)
I only manage to ever get one identifer out. The above is a list with one token.
I don't really want to make a tree root with each identifer because then getting
them out into a list is a mission.
What should I do?
Thanks
Regards
Craig.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the antlr-interest
mailing list