W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: [css3-page] Error in grammar of section 3.4.1

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Thu, 19 Apr 2012 15:27:25 +0200
Message-ID: <4F9012BD.4030001@kozea.fr>
To: www-style@w3.org
Le 19/04/2012 15:11, Werner Donné a écrit :
> Hello,
>
> There is a problem with the following part of the "page" production:
>
> '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}'
>
> It can't parse two consecutive "margin" elements, for example,
> because with this production they must be separated by a semi-colon.
> This is not what the rest of the draft suggests.

Indeed.


> The production
> should be something like this:
>
> '{' S* [ [ declaration [ ';' S* declaration ]* ] | margin ]* '}'

But this new grammar allows consecutive declarations without a ';'

The only case where a declaration is not followed by a semi-colon is 
when it is last in the block. This should do it:

'{' S* [ [ declaration ';' S* ] | margin ]* [ declaration ]? '}'


Side issue:

The ED uses 'ruleset' in the grammar where the the WD uses 
'declaration'. I think that 'declaration' is correct.

-- 
Simon Sapin
Received on Thursday, 19 April 2012 13:27:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT