On Wed, Jan 27, 2016 at 4:43 PM, Michał Górny <mgo...@gentoo.org> wrote: > Yes, that part makes some sense. Except that it immediately follows > braces which makes me think it applies only to the thing in the braces. > Furthermore, the use of {} vs () seems pretty much random, and the & > is completely unclear what it could mean (I'm not reading the docs > here!). I look at it and I wonder if that forces some ordering or not, > if it supports interspersing or not. And finally, the fact that '*' > follows closing brace on the other end of file does not help > readability.
A full expression runs from a keyword to the closing brace (e.g. "element <name> { }"). Parentheses are only used to group expressions that have the infix operators (one of "," for concatenate -- e.g., order --, "|" -- alternative -- and "&" -- interleaving), because there's no implicit precedence order. Yes, the quantizer comes at the end. On the other hand, you could rewrite the large expression to be a named pattern, and then put the quantization after the pattern name if you prefer that style. That would probably make more sense for large named patterns. :) Cheers, Dirkjan