Ken Fox wrote:

> A question: Do rules matched in a { code } block set backtrack points for
> the outer rule? 

I don't believe so. From A5:

        A pattern nested within a closure is classified as its own rule,
        however, so it never gets the chance to pass out of a {...} closure.

Indeed, to get a rule in a closure to even continue matching from the same
point in the string, you would need to write:


        rule expr1 {
            <term> { m:cont/@operators/ or fail } <term>
        }

Backtracking would just step back over the rule as if it were atomic
(or followed by a colon).

Damian


Reply via email to