Re: [css-syntax] <an+b> grammar: escaping

On Mon, May 27, 2013 at 7:55 PM, Simon Sapin <simon.sapin@exyr.org> wrote:
> Another "interesting" corner case:
>
> In some cases, a minus sign is part of an <ident> token. But once
> tokenization is done, we don’t know anymore if that character was escaped in
> the CSS source. This is a similar issue to that of the syntax of ID
> selectors.
>
> So, what exactly do we want to allow to be escaped or not? Selectors 3 uses
> {N} and ['-'|'+'], which means that n can be escaped but not a plus or minus
> sign.

I don't think it matters in any way, shape, or form which way we go
here, so I'm happy to just let the answer fall out of the grammar I've
defined.  That means that, depending on where the + or - appears, it
might be escapable or not.  This is not a detail that matters to
anyone.

The presence/absence of escaping rules in the Selectors grammar isn't
a great indicator, because it's very annoying to specify escapability.
 Once you're already specifying caselessness you can just cargo-cult
the escapability in, but I'd never purposely add new non-letter tokens
if I was writing a token grammar like that.

~TJ

Received on Tuesday, 28 May 2013 15:38:32 UTC