W3C home > Mailing lists > Public > www-style@w3.org > February 2003

CSS2 core syntax

From: Michael Day <mikeday@yeslogic.com>
Date: Tue, 18 Feb 2003 00:07:35 -0500 (EST)
Message-ID: <Pine.LNX.4.44.0302181613040.17160-100000@lorien.yeslogic.com>
To: www-style@w3.org




Hi,

The grammar for the CSS2 core syntax appears to be incorrect:

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

Note that the production for any contains FUNCTION, which is defined as:

	FUNCTION {ident}\(

However there is no way to match the arguments and closing bracket of the 
function, making the grammar break for cases like this:

	@example foo(bar, "baz");

This could be corrected by replacing the reference to FUNCTION in the any 
production with:

	FUNCTION S* any [ ',' any ]* ')'

Any thoughts?

Michael
Received on Tuesday, 18 February 2003 04:38:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:19 GMT