Today in #parrot a question was done:
rule foo { <bar>* }
should be considered:
rule foo { <?ws><bar>*<?ws> }
or
rule foo { <?ws>(<bar><?ws>)* }
?
Cheers
Alberto
--
Alberto Simões - Departamento de Informática - Universidade do Minho
Campus de Gualtar - 4710-057 Braga - Portugal
"Beware of bugs in the above code;
I have only proved it correct, not tried it."
--- Donald Knuth
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