W3C home > Mailing lists > Public > www-style@w3.org > May 2010

About CSS3 selectors

From: Ivan Enderlin @ Hoa <@>
Date: Thu, 27 May 2010 17:18:03 +0200
Message-ID: <4BFE8D2B.5030508@hoa-project.net>
To: www-style@w3.org
Hey group :-),

This is my first message in this group, so thank you for your 
forbearance :-).

I'm working on CSS3 selectors and I noted that in the selector grammar 
[1], in the /expression/ rule (from the /functional_pseudo/ rule), there 
is no comma. Why? A pseudo-function cannot have an arity greather than 1?
Nonce, we have:

    expression
    /* … */
    : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
    ;

It would be great to have:

    expression
    /* … */
    : [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S*
    [ COMMA S* [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]*
    ;

or simpler:

    expression
    /* … */
    : [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S*
    [ COMMA S* expression ]*
    ;


And I wonder whether the lexical scanner cannot be simplified. Actually, 
the ATKEYWORD token is not used, as the INVALID, PERCENTAGE, CDO and CDC 
tokens.


Thanks for your time :-),
Best regards.


[1] <http://www.w3.org/TR/css3-selectors/#w3cselgrammar>

-- 
Ivan Enderlin
Developer of Hoa Framework
http://hoa-project.net/
Received on Thursday, 27 May 2010 15:18:31 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:46 UTC