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

On Wednesday 21 October 2009, Dan Connolly wrote:
> In 4.1.6 Blocks
>  http://www.w3.org/TR/CSS2/syndata.html#block
>
> this is given as an example of a block:
>
>   { causta: "}" + ({7} * '\'') }
>
> but it doesn't match the core grammar in 4.1.1,
> because between ()s can only be any*, and
> the { token isn't part of any. i.e. any doesn't
> contain blocks.

True, but it is marked as illegal already. The idea is to show that 
curly braces must be balanced, even in input that is going to be 
ignored. The rules further down in 4.2 under "malformed declarations" 
apply: there is an unexpected token in the value of the property and 
thus the property and its value must be ignored. And to know where the 
value ends, you must know where the block ends.



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 Wednesday, 21 October 2009 16:04:09 UTC