W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css3-syntax] Added an "an+b parsing" section, please review

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 1 Feb 2013 16:02:49 -0800
Message-ID: <CAAWBYDBDsnbYHD5aNSutdZFsMq5BbuXuXnp05bJw4e2yGDm3Mg@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style list <www-style@w3.org>
On Fri, Feb 1, 2013 at 12:43 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> All whitespace tokens are ignored. This is not the case in the "nth" grammar
>> from Selectors 3. In particular, no whitespace is allowed between a and its
>> sign, nor between a and n. (Whitespace *is* allowed around the +/- sign
>> after n, and around the whole an+b sequence.)
>>
>> nth
>>   : S* [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? |
>>          ['-'|'+']? INTEGER | {O}{D}{D} | {E}{V}{E}{N} ] S*
>>   ;
>
> Damn, you're right.  Hmm.  I was *really* trying to avoid having to
> deal with spaces between the signs and the numbers.  I suppose I can
> do whitespace-stripping late, so I can check the step and fail it if
> there is any trailing whitespace.  I'll look into how I want to do
> this.

Okay, should be fixed now.  The text was already hovering at the
*edge* of being too complex for a simple serial-paragraph structure,
so I took the opportunity to rearrange it into a list instead, and
simplified a few other rules.

(Oh, and my previous treatment was *extra* wrong - it would have
parsed "2 3" as an offset of 23.)

~TJ
Received on Saturday, 2 February 2013 00:03:36 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:05 GMT