Re: How is ambiguity defined?

> To put it a third way: what do you mean by “ambiguous in some way”?
It's a fair question, but not one that I feel I can answer to your satisfaction until I understand what it is that I don't understand!  Otherwise we run the risk of my answer being intuitive but hazy...

If I were to try, I would suggest that parsing a string against a grammar is ambiguous if there are multiple choices given by the grammar that result in any number of complete, valid parsed results.
> 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 do think that: can you help me understand what makes it hazy?  Surely the fact that `;` denotes a choice, so that either choice may represent the empty string, means that there is more than one way of interpreting the input string from the grammar?  Whether or not all of those interpretations render the same result?


PS:
As is often the case, I worry that you assume some common semantic definitions which we do not, in fact have in common (almost certainly due to my own ignorance)!  "Sentential" has certainly thrown me, as I'm not sure what it means in this context beyond "relating to a sentence"...

_________________
Tomos Hillman
eXpertML Ltd
+44 7793 242058
On 6 Jan 2022, 16:24 +0000, C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>, wrote:
>
>
> > 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:52:27 UTC