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

Re: What is "S" in CSS grammar?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 27 Dec 2011 15:39:06 -0800
Message-ID: <CAAWBYDCjLaEURb3epbh7mLEfsBgSSS2Di5yNab5jyDVSM0oZSw@mail.gmail.com>
To: Peng Yu <pengyu.ut@gmail.com>
Cc: www-style@w3.org
On Tue, Dec 27, 2011 at 2:24 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
> Hi,
>
> http://www.w3.org/TR/CSS2
>
> The above document mentioned something link this.
>
> hexcolor
> : HASH S*
> ;
>
> I also see the following. I'm wondering if the following S is the above S.
>
> S s|\\0{0,4}(53|73)(\r\n|[ \t\r\n\f])?|\\s
>
> I know some of above syntax, but not all. Could anybody help me
> understand what the above sentence mean?
>
> I'm not familiar enough with flex syntax. Sorry for asking a naive question.

The S* you see there comes from Chapter 4.1.1, where it's defined as
"[ \t\r\n\f]+".

The S definition you've quoted from Appendix G is used in the lexical
scanner to represent a literal "S" or "s" character (or an escaped
variant of those two).  I'm not sure if there's a conflict there, or
if the tokens on the right side of the lexical scanner definitions are
drawn from a different place from the ones on the left.

~TJ
Received on Tuesday, 27 December 2011 23:40:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT