W3C home > Mailing lists > Public > www-style@w3.org > June 2011

[CSS21] questions about Lex regexes used to define tokens

From: Jack Smiley <zxcv_890@hotmail.com>
Date: Fri, 10 Jun 2011 09:37:39 -0700
Message-ID: <SNT106-W27E550F20B386DE356463BB6640@phx.gbl>
To: <www-style@w3.org>

Hi,

I have three questions about the Lex regexes used to define the CSS tokens (section 4.1.1, Tokenization)

1) What do the dashes mean in the character class of the second alternate in 
the definition of URI

url\({w}([!#$%&*-\[\]-~]|{nonascii}|{escape})*{w}\)

They're
 not escaped, so I'm assuming 
they're metacharacters (refer to ranges), but ranges don't seem to make 
sense here (what's the character range from * to [ or from ] to ~)?

2) In the macro definitions of string2 and badstring2, why are the single quotes escaped? According to the Lex website (http://dinosaur.compilertools.net/lex/index.html), single quotes are not metacharacters.

3) Regarding the macro definition for nonascii, why does it go up to octal 237? (what's special about 237?) Why not octal 177 (decimal 127 -- standard ASCII) or octal 377 (decimal 255 -- extended ASCII)?

Thank you,
 		 	   		  
Received on Friday, 10 June 2011 16:38:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:41 GMT