W3C home > Mailing lists > Public > xml-editor@w3.org > July to September 1998

Re: Syntactic ambiguity in XML spec

From: Paul Abrahams <abrahams@acm.org>
Date: Wed, 22 Jul 98 19:11:22 -0400
Message-Id: <9807222311.AA0277@valinet.com>
To: tbray@textuality.com
Cc: abrahams@acm.org, xml-editor@w3.org, abrahams@acm.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:29 GMT