[antlr-interest] Fwd: zero-or-more or one-or-more in tree grammars
Mike J. Bell
ckimyt at gmail.com
Thu May 28 11:15:49 PDT 2009
On Thu, May 28, 2009 at 12:45 PM, Jim Idle <jimi at temporal-wave.com> wrote:
>
> I think that perhaps people just assume that this is obvious, but it
> seems to get a lot of people so perhaps you can add this to the Wiki? ;-) :
>
I'll try to do this later (haven't authored anything up there personally)...
> collection returns [String value]
> :
> ( t=thing
> { $value += $t.text; }
> )*
> ;
>
This was the trick...thanks!
--
Mike J. Bell on gmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090528/ab3e4cde/attachment.html
More information about the antlr-interest
mailing list