[antlr-interest] Repeating Tree Nodes, help.

Gavin Lambert antlr at mirality.co.nz
Thu Jul 24 01:00:17 PDT 2008


At 17:36 24/07/2008, craig at palantir.co.za wrote:
 >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.

I think you're getting bitten by precedence there.  Try this 
instead:

rule: ^(ROOT (xn+=IDENTIFIER)+);



More information about the antlr-interest mailing list