Re: Syntactic ambiguity in XML spec

At 06:16 PM 7/22/98 -0400, Paul Abrahams wrote:
>I've noticed a syntactic ambiguity in productions 49/50 that could be
>troublesome for parsers even though it has an obvious interpretation.
>If "children" has the form "(Name)", i.e., it's a singleton, then it can
>be interpreted either as a choice or as a seq.  One cure would be to
>replace the *s in P49/P50 by +s and to add a production P50A:
>  singleton ::= '(' S? cp ')'

Tim> OK, but why?  When there's only one, the semantics are the same.

I believe that standard parsers have trouble with ambiguous grammars,
and this one is ambiguous.  But as you say, the semantics are
unambiguous even if the syntax is ambiguous.

Received on Wednesday, 22 July 1998 19:11:29 UTC