W3C home > Mailing lists > Public > public-css-testsuite@w3.org > August 2007

Re: problem with t040103-ident-03-c.htm?

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 22 Aug 2007 11:37:44 -0400
Message-ID: <46CC5848.3090601@inkedblade.net>
To: Stewart Brodie <stewart.brodie@antplc.com>
CC: public-css-testsuite@w3.org, www-style@w3.org

Stewart Brodie wrote:
> fantasai wrote:
>> According to
>>    http://www.w3.org/TR/CSS21/selector.html#id-selectors
>> an ID selector is an identifier, and these are not allowed to start with a
>> hyphen plus a number. I just checked with Bert, and he agrees the test is
>> correct.
> 
> OK.  Given that it must be an identifier, is there are reason why the rule
> in the grammar (in both specifications) should not be corrected to:
> 
> "#"{ident}   { return HASH;}
> 
> and delete the definition of 'name' completely?  This would make the grammar
> agree with the prose.  Apart from preventing "#-<digit>" being a HASH token,
> it would also prevent "#--" from generating a HASH token - also a correct
> change, I believe.
> 
> On reflection, this would have a knock-on effect in parsers that expect a
> HASH token for the value of a color property, of course.  Is that the reason
> why the grammar is still as it is?  If it is, I think that inserting a
> comment at the top of the lexical scanner would be a worthwhile addition.

Yeah, using the same token for both colors and IDs was imho not a very good
idea. If you write up the exact changes necessary to split them, I can add
this to the issues list. :)

~fantasai
Received on Wednesday, 22 August 2007 15:37:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:55 GMT