Inconsistencies across CSS3 specs

Hello all,

I originally wrote a CSS 2.1 parser in JavaScript and have been going about trying to update to CSS3. The problem I'm having is that, whereas CSS 2.1's grammar was wholly contained in http://www.w3.org/TR/CSS2/grammar.html, there is no such canonical source for a CSS3 grammar. In fact, quite confusingly, the grammar is spread out amongst multiple specs. Thusfar, I've noticed the following problems:

1. Inconsistent naming of tokens across specifications. Some examples:

  In the CSS3 Grammar spec:
    {num}{ident}               {return DIMEN;}

  In the CSS3 Selectors spec:
    {num}{ident}     return DIMENSION;
  -----------------------------------------------------------
  In the CSS3 Media Queries spec:
    {N}{O}{T}         {return NOT;}

  In the CSS3 Selectors spec:
    ":"{N}{O}{T}"("  return NOT;

2. Not every spec has a section for its associated grammar.

3. When specs do have grammars, they're in inconsistent places. The CSS3 Grammar spec has its listing under "Grammar" while CSS3 Media Queries have it listed under "Syntax". Other specs have sections called "Syntax" that simply show example code.

All of these inconsistencies make it incredibly difficult to implement a CSS3 parser from scratch. Is there any plan to rationalize these specs against each other? Further, any plan to move the specs into a more consistent format such that the module definitions, syntax, and grammar are all available in predictable order?

Thanks.


-Nicholas

______________________________________________
Commander Lock: "Dammit Morpheus, not everyone believes what you believe!"
Morpheus: "My beliefs do not require them to."

Received on Tuesday, 7 December 2010 18:25:06 UTC