[antlr-interest] Syntax for token accumulation

Olivier Lefevre lefevrol at yahoo.com
Fri Mar 21 17:05:59 PDT 2008


Gavin Lambert wrote:

> Yes (for the moment anyway).

I hope Ter will consider this enhancement.

> But you can extract it to a subrule and then it will work: 
> a : (list+=b)* { ... };
> b : tok=ID { ... };

OK but for the rule I had in mind tok won't do me any good if exiled in a 
subrule. I can still build the list in @init and action blocks, though.

-- O.L.



More information about the antlr-interest mailing list