Re: [CSS21] minor issue: location of comment tokens

On Monday 01 December 2008 15:16, Daniel Glazman wrote:
> Andrey Mikhalev wrote:
> > btw:
> >
> > 4.1.1 Tokenization
> > COMMENT tokens do not occur in the grammar (to keep it readable),
> > but any number of these tokens may appear anywhere between other
> > tokens.
> >
> > G.2 Lexical scanner
> > ...
> > "!"({w}|{comment})*{I}{M}{P}{O}{R}{T}{A}{N}{T}    {return
> > IMPORTANT_SYM;}
> >
> > yet another exception?
>
> Well, no, IMPORTANT_SYM is a token.

Also, if you are referring to the fact that a comment seems to occur 
*inside* a token:

You should be careful mixing chapter 4 (the forward-compatible, core 
grammar) with appendix G (a more restrictive grammar that is closer to 
what is actually meaningful in CSS level 2).

When chapter 4 says that comments can occur "between tokens," it means 
tokens of the core grammar. The "!important" in the appendix is in fact 
made up of two core tokens, DELIM ("!") and IDENT ("important"), and 
thus comments can occur between them.

So, no, this is not an exception.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Wednesday, 21 January 2009 15:24:40 UTC