W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > July 1997

Re: reforming the grammar notation

From: Dan Connolly <connolly@w3.org>
Date: Thu, 17 Jul 1997 08:47:19 -0500
Message-ID: <33CE2267.4AEF@w3.org>
To: Michael Sperberg-McQueen <U35395@UICVM.UIC.EDU>
CC: w3c-sgml-wg@w3.org, Murata Makoto <murata@wrc.xerox.com>, "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, Paul Prescod <papresco@calum.csclub.uwaterloo.ca>, "Norbert H. Mikula" <e_nmiku@utila.ifi.uni-klu.ac.at>, "Norbert H. Mikula" <nmikula@edu.uni-klu.ac.at>, bbos@w3.org
Catching up on old threads...

It was a while ago, but...

Michael Sperberg-McQueen wrote:
> 
> A request for advice about the XML-lang grammar.  Should we change the
> grammar by dropping most or all mentions of S?  If we do, what else
> needs to change to avoid changing the language we recognize in ways we
> don't want?

Bert looked into this, and he came up with:

=========
http://www.w3.org/XML/9707/XML-in-C

Bison grammar

(See the source.)

The grammar contains just 13 productions, and it could have been shorter
and
clearer if Bison had accepted some common notations for grammars. The
grammar that is actually intended is as follows:

document: prolog element misc*;
prolog: VERSION? ENCODING? misc*;
misc: COMMENT | attribute_decl;
attribute_decl: ATTDEF NAME attribute+ ENDDEF;  
element: START attribute* empty_or_content;
empty_or_content: SLASH CLOSE | CLOSE content END NAME? CLOSE;
content: (DATA | misc | element)*;
attribute: NAME (EQ VALUE)?;

... or just 8 productions.
=========

Hmmm... evidently he didn't deal with the internal DTD subset.
Oh: he's suggesting "Split the core syntax and the meta-syntax."
Hmmm... that sounds appealing... and familiar: I think
I brought it up myself a while back.

But he did look into the details of implementation. Source
is available.

-- 
Dan Connolly
http://www.w3.org/People/Connolly/
Received on Thursday, 17 July 1997 09:49:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:27 UTC