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

On Fri, Feb 1, 2013 at 11:23 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> Le 02/02/2013 01:02, Tab Atkins Jr. a écrit :
>>
>> 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.)
>
> Looks good, except when you start adding comments:
>
> 2/**/3
>
> (Maybe that’s good enough?)

Sigh, damn comments.

I'll have to see if the rest of the WG is okay with ignoring this.

It might not be too hard to work around this, though. If I export the
list of token pairs that need to have comments inserted when
serializing, I can invoke that here, and just insert whitespace
instead.  That'll still possible be wrong, though - putting a comment
between the step and the "n" will fail.

Switching to a pure token-based parsing is the way to fix that for
good, but it's so complicated. :/  It's not hard to write down, it's
just *long* and *annoying*.

~TJ

Received on Sunday, 3 February 2013 22:14:43 UTC