[Home] [By Thread] [By Date] [Recent Entries]

  • From: Eric Bohlman <ebohlman@n...>
  • To: Michael Champion <Mike.Champion@s...>
  • Date: Thu, 18 May 2000 19:56:41 -0700 (PDT)

On Thu, 18 May 2000, Michael Champion wrote:

> From: "David Brownell" <david-b@p...>
> >
> > Actually I think the XML spec would have been substantially improved,
> > in the technical sense, were it to have been directly validated by an
> > implementation -- using only the standardized productions.
> 
> I strongly agree, and hope this is addressed in the corrected version of XML
> 1.0 if it ever comes out, or in XML 1.1 / 2.0.  A colleague implementing an
> XML parser "from scratch" --  that is, without previous exposure to all the
> folklore that one picks up from SGML, XML-DEV, deconstructing other people's
> code, etc. -- stumbled over all sorts of little problems with the
> standardized productions.

I have to at least partially disagree.  Many practical, widely used
languages cannot be specified *entirely* by EBNF productions and thus
the formal definition of their syntax includes prose in the language
specification.  For example, a context-free grammar cannot specify that
all identifiers in a programming language be declared before they're used,
or that a function must be called with the exact number of parameters
specfied in its declaration (Aho & Ullman, p.179).  Thus processors for
more-than-toy languages generally enforce such syntactic constraints via
"ad-hoc" code rather than through their parsing tables, and only the prose
in the spec can inform the processor's author how to write that code.



***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member