W3C home > Mailing lists > Public > www-style@w3.org > January 2003

Re: small errors in the CSS2.1 grammar

From: Bert Bos <bert@w3.org>
Date: Wed, 15 Jan 2003 19:27:21 +0100
Message-ID: <15909.43017.194596.879438@lanalana.inria.fr>
To: Lars Knoll <lars@trolltech.com>, www-style@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:19 GMT