[antlr-interest] (newbie question) rewrite rule
Diehl, Matthew J
matthew.j.diehl at intel.com
Mon Jul 9 13:57:49 PDT 2007
> actualparameters
> :lc='('expression?(','(expression)?)*')'
> ->^(SLIST[$lc] (expression?)*)
> ;
For the parser rule, it looks fine, but the rewrite rule does not need
the ? and the *. It's redundant as * means 0 or more, and ? means 0 or
1.
actualparameters
: lc= '('expression?(','(expression)?)*')'
->^(SLIST[$lc] expression*)
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070709/51cdd76f/attachment.html
More information about the antlr-interest
mailing list