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

Re: [css3-syntax] Parser rewritten as recursive-descent, review requested

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Tue, 12 Feb 2013 19:34:32 -0800
Message-ID: <511B09C8.3010701@kozea.fr>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Le 12/02/2013 12:41, Tab Atkins Jr. a écrit :
> Per discussion at the last f2f, I've rewritten the parser section of
> Syntax to be a recursive-descent parser instead of a state machine.
> It surprised me just how much simpler this strategy made it, as nearly
> all error-handling is now automatic in the structure of the parser and
> much more intuitive.  The parser itself is much shorter and easier to
> read now, too.  Finally, the parser entry points now work *correctly*
> - they were subtly wrong when I tried to just hack them on top of the
> state machine.
> Please review and let me know if anything looks wrong.


I notice three changes from the previous draft:

1. Invalid declarations (after the initial ident token) are ignored 
silently. They should trigger a parse error.

2. "! important" (with whitespace in-between) is no longer a priority 

3. A delim(!) token in a declaration not followed by "important" is no 
longer a parse error.

Other than that, looks fine after a first pass.

Simon Sapin
Received on Wednesday, 13 February 2013 03:35:01 UTC

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