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

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

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 5 Feb 2013 20:10:49 -0700
To: François REMY <francois.remy.dev@outlook.com>
Cc: www-style@w3.org
Message-ID: <20130206031049.GA10481@crum.dbaron.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:05 GMT