Re: [CSS21] core grammar doesn't generate example in 4.1.6 Blocks

This is issue 140[1]: define better how illegal tokens are parsed inside
bracket pairs.

Change the grammar rule for "any" in 4.1.1[2] from

    any    : [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING
             | DELIM | URI | HASH | UNICODE-RANGE | INCLUDES
             | DASHMATCH | ':' | FUNCTION S* any* ')'
             | '(' S* any* ')' | '[' S* any* ']' ] S*;

to

    any    : [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING
             | DELIM | URI | HASH | UNICODE-RANGE | INCLUDES
             | DASHMATCH | ':' | FUNCTION S*  [any|unsused]* ')'
             | '(' S* [any|unused]* ')' | '[' S* [any|unused]* ']'
             ] S*;
    unused : block | ATKEYWORD S* | ';' S* | CDO S* | CDC S*;

And add this paragraph immediately after those rules:

    The "unused" production is not used in CSS and will not be used by
    any future extension. It is included here only to help with error
    handling. (See 4.2 "Rules for handling parsing errors.")

[1] http://wiki.csswg.org/spec/css2.1#issue-140
[2] http://www.w3.org/TR/CSS2/syndata.html#tokenization



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Sunday, 22 August 2010 21:33:17 UTC