W3C home > Mailing lists > Public > www-style@w3.org > December 1997

Re: Forget what I said about whitespace

From: Sho Kuwamoto <skuwamoto@macromedia.com>
Date: Fri, 19 Dec 1997 12:05:22 -0800
Message-Id: <v03007803b0c07f260dbd@[192.168.65.69]>
To: www-style@w3.org
Bert Bos writes:
>Neil St.Laurent writes:
> > "WHITESPACE and COMMENT tokens do not occur in the grammar (to keep it
> > readable), but any number of these tokens may appear anywhere. The
> > content of these tokens (the matched text) doesn't matter, but their
> > presence or absence may change the interpretation of some part of the
> > style sheet.  For example, in CSS2 the WHITESPACE is significant in
> > selectors."
> >
> > That to me would seem to imply that WHITESPACE is of NO significance
> > inside declaration sets and that "red  green" is treated like
> > "redgreen".  This would be consistant with the assumed effort in the
> > standard to ensure that no property tokens can accidently form other
> > tokens when in combination -- and the longest ones can always be
> > checked first.
>
>English is not a formal language, and what "significant" means is not
>expressible as a logical formula.

One way to sort out this confusion might be to differentiate between
lexical significance and grammatical significance. Whitespace is
lexically significant in that it affects how the input stream is
tokenized, but is not grammatically significant inside declaration
sets in that any number of whitespace tokens can be inserted between
other tokens without affecting the way the declaration set is
interpreted.

I believe that what Neil is talking about is lexical significance
whereas the quote from the spec refers to grammatical significance.

-Sho
--
sho@macromedia.com
Senior Software Engineer
Macromedia Dreamweaver
Received on Friday, 19 December 1997 14:57:50 GMT

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