Re: [CSS21][CSS3] Grammar Error

On Thu, Sep 2, 2010 at 09:49, Mark <markjord@gmail.com> wrote:
> If anyone cares, there's another error in the grammar:-
>
> ruleset
>  : selector [ ',' S* selector ]*
>    '{' S* declaration? [ ';' S* declaration? ]* '}' S*
>
> This rule won't parse 99.9% of existing CSS files. There is a space
> missing from the front before '{'. It should be:-
>
> ruleset
>  : selector [ ',' S* selector ]*
>    S* '{' S* declaration? [ ';' S* declaration? ]* '}' S*

I don't think this is an error. The "selector" production already
takes care of the white space following it:

selector
  : simple_selector [ combinator selector | S+ [ combinator? selector ]? ]?


Regards,

Jorrit

Received on Thursday, 2 September 2010 12:33:28 UTC