Re: What is the set of allowed characters in identifiers?

fantasai <> wrote:

> Eli Friedman wrote:
> > My question: Are the code points from 128 to 160 valid identifier
> > characters?
> > 
> > The CSS2.1 draft doesn't give a clear answer.  The prose in 4.1.3 says
> > that they are not allowed in identifiers, but the definition of the
> > IDENT token in 4.1.1 says that they are allowed.
> > 
> > IMO, it seems simpler to allow them instead of making an exception for
> > an arbitrary set of control characters.  It should definitely be
> > decided one way or the other, though.
> In general, the formal grammar is more permissive than the prose.
> The normative definition of valid CSS syntax is in the prose. As
> explained in 4.1.1, the core grammar is a grammar to which all
> future additions to CSS are expecteded to comply, but many things
> that would be allowed in the core grammar are nonetheless invalid
> CSS and must be ignored by the parser are specified in chapter 4.

I suggest that you add that paragraph to the formal grammar section of the
spec - it might save you having to re-type the same information in reply to
questions on this mailing list :-)

Stewart Brodie
Software Engineer
ANT Software Limited

Received on Friday, 24 August 2007 09:51:23 UTC