Re: Allow whitespace before the commas?

fantasai <fantasai.lists@inkedblade.net> wrote:
> Andrey Mikhalev wrote:
> > On Mon, 8 Dec 2008, fantasai wrote:
> >> Unless I'm missing something we need to replace
> >>  : selector [ COMMA S* selector ]*
> >> with
> >>  : selector [ S* COMMA S* selector ]*
> > 
> > i think (in css2.1) tokens
> > {w}","            {return COMMA;}
> > ...etc.
> > intended for elimination parser state conflict between
> > selector S+ selector
> > and
> > selector S* COMMA S* selector
> > ...etc.
> 
> Thanks, Andrey. I think you're right. I guess that solves
> the grammar problem, then. :)

Objection: the lexical analysis rules are already too complicated, and
it is already too hard to tell whether the lexical rules in section 4
are consistent with the rules in appendix G.  We should not add any more
special token productions.

I see what Andrey is saying, that your original suggestion requires
two tokens of lookahead in the parser, but I much prefer that to an
even messier lexer.  (CSS2.1 appendix G asserts that the grammar is
LALR(1) but I strongly suspect this is not true for a parser that
honors the section 4 conventions as well.)

zw

Received on Tuesday, 30 December 2008 03:32:08 UTC