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 15:14:29 -0800
Message-ID: <CAAWBYDCkyfWJYSLYZaiggkz+qSNayMK5naLHAWACi8PzLqO41Q@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:
> Luckily the official grammar in Selectors, while wrong, is at least
> very simple and limited.  I think I've got all the token-based parsing
> cases mapped out.

Man, I was super wrong.  I attempted a token-based parse, and it turns
out there are *15* different cases you have to handle (11 if you
ignore whitespace tokens).  Within each case there are some pretty
differently-handled things, so it's even more complex than it sounds.

Most of the complexity comes from the fact that in the full an+b form,
spaces on either side of the sign are optional.

So never mind, string-based reparsing is definitely the better option.
 This is dumb.

Received on Friday, 1 February 2013 23:15:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC