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