W3C home > Mailing lists > Public > www-style@w3.org > November 2002

Quote marks allowed unmatched in core grammar (CSS2)

From: Etan Wexler <ewexler@stickdog.com>
Date: Wed, 6 Nov 2002 18:40:43 -0500
Message-Id: <v03102801b9ee545cdb09@[64.24.91.50]>
To: www-style@w3.org, css2-editors@w3.org, "David Baron" <dbaron@fas.harvard.edu>

The core grammar of CSS2 (at
<http://www.w3.org/TR/REC-CSS2-19980512/syndata.html#tokenization>) allows
unmatched quote marks as delimiters.

Consider the following one-rule stylesheet.

e{p:"}

Since there is no partner for the quote mark, it is impossible to parse as
a string.  Following are the tokens of the given style sheet according to
the core grammar.

IDENT: 'e';
{:     '{';
IDENT: 'p';
DELIM: ':';
DELIM: '"';
}:     '}';

I assume that the intent was not to allow such usage.  To prohibit such
usage, we should add token types for quote marks so that unmatched quote
marks do not return a 'DELIM' token.

--
Etan Wexler <mailto:ewexler@stickdog.com>
Received on Wednesday, 6 November 2002 18:52:31 GMT

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