Re: [css-syntax] value grammar, <value> type and browser implementations

On Tuesday 2013-02-05 15:57 +0100, François REMY wrote:
> This is much simpler that the current syntax which allows     x: {a:a}     but not    x: {a}     or     x: {"a":"a"}.

I do not think this is correct.  To break things down how each of
these matches 'value' (I'm presuming you're talknig about "x" being
a variable):

  value(block("{" any(IDENT(a)) any(':') any(IDENT(a)) "}"))
  value(block("{" any(IDENT(a)) "}"))
  value(block("{" any(STRING(a)) any(':') any(STRING(a)) "}"))

Of course, if you weren't talking about "x" being a variable, but
wanted the whole "x: FOO" to be value, that's also straightforward,
since the start breaks down as:
  value(any(IDENT("x"))any(":"S*(" ")))
and then the rest can still continue matching the entire [...]+ in
the value production.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Wednesday, 6 February 2013 03:11:13 UTC