[antlr-interest] Tree grammar for 'zero or more' rewrite

Ted Villalba ted.villalba at gmail.com
Wed Jul 11 15:44:57 PDT 2007


Hi,

I'm trying to write the tree grammar that will recognize the output from the
following rewrite rule:

value   : (terms-> ^(TERMS terms)) ((WS)+ operator (WS)+ v=value ->
^(operator $value ^(VALUE $v)))*

I can't find any examples of rewrite rules that are similar, where the
resulting tree may or may not have the operator, and subsequent values.
Having had assistance to this point, I thought I could carry the torch but
am floundering.
Can someone suggest what the resulting tree grammar should look like?

Thanks in advance.

Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070711/2227d1ad/attachment.html 


More information about the antlr-interest mailing list