W3C home > Mailing lists > Public > public-ixml@w3.org > April 2021

Re: design question? or puzzle?

From: Tomos Hillman <yamahito@gmail.com>
Date: Tue, 13 Apr 2021 12:00:12 +0100
To: public-ixml@w3.org, "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
Message-ID: <f69ab53d-04de-47a8-b604-adf7b7578ea6@Spark>
It's verbose, but couldn't you do something like:

expression: ursum.
    -ursum: urproduct; sum.
       sum: product+addop.
-urproduct: urfactor; product.
etc

This is (correctly) ambiguous, but the first parse according to  the order of rule would return `<expression><number>3</number></expression>` - which I think is what you would want?

Tom

_________________
Tomos Hillman
eXpertML Ltd
+44 7793 242058
On 12 Apr 2021, 01:25 +0100, C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>, wrote:
>
> Is there a way to write the ixml grammar so as to achieve the goal of serializing a nonterminal as an element if and only if it has two element children, and not to serialize it when it has only one element child?
Received on Tuesday, 13 April 2021 11:00:32 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 13 April 2021 11:00:32 UTC