On Mon, Dec 26, 2005 at 07:34:06PM +0000, Luke Palmer wrote: > On 12/26/05, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > On Fri, Dec 23, 2005 at 02:09:19PM +0000, Luke Palmer wrote: > > > "x" ~~ / [ [ (x) ]* ]* / > > > > As I understand things, $/ would be "x". > > Hmm, that seems wrong. Consider: > > "xxxyxxyxy" ~~ / [ [ (x) ]* (y) ]* / > > I argue that by the structure of that rule, you should be able to tell > which xs go with which y. > ... > Is there a counterargument that I'm not seeing?
I'd say that if you want a structured rule, it should be written that way, as in ( (x)* y )* or ( (x)* (y) )* Then it's easy to know which xs go with which y. As I play more with rules, it seems that parens are the way to build/preserve structure in captures, while square brackets are the way to flatten or ignore it. Pm