Blocks in parentheses or brackets

In CSS2 and CSS2.1, there is a conflict about block syntax. 
Section 4.1.6, "Blocks"
(<http://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#block>,
<http://www.w3.org/TR/2003/WD-CSS21-20030128/syndata.html#block>)
states:

    A block starts with a left curly brace ({) and ends with the
    matching right curly brace (}). In between there may be any
    characters, except that parentheses ((Ê)), brackets ([Ê])
    and braces ({Ê}) must always occur in matching pairs and may
    be nested. Single (') and double quotes (") must also occur
    in matching pairs, and characters between them are parsed as
    a string. See Tokenization above for the definition of a
    string. 

    Illegal example(s):

    Here is an example of a block. Note that the right brace
    between the double quotes does not match the opening brace
    of the block, and that the second single quote is an escaped
    character, and thus doesn't match the first single quote:

    { causta: "}" + ({7} * '\'') }

This prose and example contradict the formal grammar, in which a
block is forbidden inside parentheses and inside brackets. At
issue is the following production
(<http://www.w3.org/TR/1998/REC-CSS2-19980512/grammar.html>,
<http://www.w3.org/TR/2003/WD-CSS21-20030128/grammar.html>).

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

Amending the production as follows would allow blocks in
parentheses.

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

We can consider the matter a correction/erratum rather than a
change since the conflicting passages are equally normative.

-- 
Etan Wexler.
Mike Cousineau: "What really scares you or disgusts you or
                 freaks you out?"
Stuart Gordon:  "George Bush." [Audience gives wild applause.]
                "I'm fucking terrified right now."

Received on Friday, 14 February 2003 22:51:30 UTC