Re: reforming the grammar notation

Dave Peterson wrote:
> 
> At 8:47 AM 7/17/97, Dan Connolly wrote:
> 
> >Bert looked into this, and he came up with:
> 
> >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)?;
> 
> Attribute declarations outside the prolog?  I hope not.

If you look into the details[1], you'll see that Bert is using
the PI syntax for attribute defaults proposed (and revoked)
a while back. It has the advantage that it can be lexically
scoped inside any element.

[1] http://www.w3.org/XML/9707/XML-in-C

-- 
Dan Connolly
http://www.w3.org/People/Connolly/

Received on Sunday, 20 July 1997 13:55:55 UTC