- From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
- Date: Thu, 6 Jan 2022 09:24:49 -0700
- To: Tomos Hillman <yamahito@gmail.com>
- Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, Norm Tovey-Walsh <norm@saxonica.com>, ixml <public-ixml@w3.org>
> On 6,Jan2022, at 8:39 AM, C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> wrote: > > > >> On 6,Jan2022, at 3:40 AM, Tomos Hillman <yamahito@gmail.com> wrote: >> >> I'm not sure I understand approach B, or how it avoids ambiguity within the non-terminal definition: there may be only one parse tree, but surely the fact that it contains a choice means that it is itself ambiguous in some way? > > Define “ambiguity”. To put it another way: I think you may be appealing here to an intuitive but hazy notion that there are two different ways to derive the empty string from the right-hand side ‘a’*; ‘b’*. I think that if you attempt to make that notion explicit and clear, you will discover that you have just undertaken to reinvent parsing theory with a new definition of what it means to derive a string of terminals from a start symbol using a grammar. The two ‘derivations' S => ‘a’*; ‘b’* => ‘a’* => ‘’ and S => ‘a’*; ‘b’* => ‘b’* => ‘’ I offered as a way of making more explicit the intuition I think you are working from are not, of course, derivations at all. In the usual account, a derivation is a sequence of sentential forms beginning with the start symbol and ending with a sequence of terminal symbols, in which each sentential form replaces one nonterminal symbol in the preceding form with a right-hand side for that symbol. But sentential forms are sequences of terminal and nonterminal symbols. The expression ‘a’*; ‘b’* is not a sentential form and cannot appear as a step in a derivation, as that term is normally defined. Since derivation as normally defined requires the right-hand side which replaces a nonterminal in a sentential form to be a sequence of symbols, it can apply only to BNF, not to EBNF. So if in this discussion anyone wants to appeal to any intuitive notion of ‘ambiguity’ in ixml, I am increasingly likely to point out that I do not know what you mean, since in the context of ixml, ‘ambiguity’ is not defined. To put it a third way: what do you mean by “ambiguous in some way”? Michael
Received on Thursday, 6 January 2022 16:25:08 UTC