Re: reforming the grammar notation

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