Re: small errors in the CSS2.1 grammar

Bert Bos writes:
> 
> Lars Knoll writes:

> > My version of flex doesn't seem to handle the comment specification correctly 
> > (the end of comments as eg "/***/" are not recognised for some reason), 
> > although the expression looks correct to me:
> > 
> > \/\*[^*]*\*+([^/][^*]*\*+)*\/   /* ignore comments */
> > 
> > In khtml, I've gone back to the CSS1 grammar for the definition of comments.
> 
> They are supposed to be equivalent, so that should be OK.
> 
> I'll try to find out why the pattern doesn't work. I'll change the
> pattern in CSS 2.1, if needed.

The error was that the middle [^/] could match the third *. It works
when you change the pattern to this:

    \/\*[^*]*\*+([^/*][^*]*\*+)*\/
                    ^

(with an extra * in the excluded list).

I'll put this into CSS 2.1, unless somebody finds another bug...



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Wednesday, 15 January 2003 13:27:28 UTC