Re: What is "S" in CSS grammar?

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 UTC