W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

Re: [csswg-drafts] [css-images-4] Editorial: comma is incorrect in syntax graph in 2.3. Gradient Color-Stops

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Fri, 31 Mar 2017 21:22:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-290833495-1490995351-sysbot+gh@w3.org>
>  In this case, the commas are separating things, no?

Not if the second thing is omitted, no.

That is, given the original grammar of `[ a , b? ]# a`, you can't write `a ,, a` - the first comma is no longer separating an `a` from a `b`, so it must be omitted.

Or for a somewhat simpler/clearer example, in a grammar like `a? , b? , c?`, all the "obvious" things are valid - `b`, `a, c`, `a, b, c`, etc - but not things like `b,` or `a,,c`, because those have commas that aren't separating things.

> Also, if commas are implicitly omittable, why do we even have the # quantifier? We could just use + then!

I said implicitly omittable *if they're not separating things*. Separating repetitions is exactly what the comma does in `#`.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/976#issuecomment-290833495 using your GitHub account
Received on Friday, 31 March 2017 21:22:38 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:10 UTC