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

>  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