On Fri, Aug 11, 2006 at 04:43:55PM +0100, Alberto Simões wrote:
> Hi
> 
> Today in #parrot a question was done:
> 
>   rule foo { <bar>* }
> 
> should be considered:
> 
>   rule foo { <?ws><bar>*<?ws> }
> 
> or
> 
>   rule foo { <?ws>(<bar><?ws>)* }

In the past we've always gone with the former.

If <bar> is also a rule, then it presumably
eats its own whitespace.  If one wants
to grab the whitespace as well, as in the
latter example, it's not too difficult to write

    rule foo { [<bar> ]* }

Pm

Reply via email to