Re: Numeric quantifiers

Thanks both.  Is this a feature that is planned for inclusion in the next iteration of the spec?

Sheila

On 7 October 2025 13:18:33 BST, John Lumley <john@saxonica.com> wrote:
>On 07/10/2025 13:08, Bethan Tovey-Walsh wrote:
>> No, there's no shortcut to do that in iXML - it's going to have to be repeating the pattern, I'm afraid. I would probably put the pattern in its own suppressed nonterminal (with a very brief name!) and repeat that nonterminal as many times as required. 
>
>Note that if you do this for a range of repeats, e.g. B{2-4}, and expand to a simple pattern
>
>   B,B,B?,B?
>
>then you will get correct results for BB and BBBB but ambiguity for BBB (3), as the optional pair can match either way for the third B. You'll need to make a nested optional part:
>
>   B,B,(B,B?)?
>
>to ensure the third matches only once and a similarly recursively nested structure for wider repeat ranges.
>
>-- 
>*John Lumley* MA PhD CEng FIEE
>john@saxonica.com
Sheila Thomson

Received on Tuesday, 7 October 2025 13:02:24 UTC