* css/tokenizer.flex: Rolled out the fix for 14453.
[WebKit-https.git] / WebCore / css / tokenizer.flex
index 94e957d..a05b655 100644 (file)
@@ -12,6 +12,7 @@ nmstart         [_a-zA-Z]|{nonascii}|{escape}
 nmchar          [_a-zA-Z0-9-]|{nonascii}|{escape}
 string1         \"([\t !#$%&(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
 string2         \'([\t !#$%&(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
+hexcolor        {h}{3}|{h}{6}
 
 ident           -?{nmstart}{nmchar}*
 name            {nmchar}+
@@ -44,7 +45,8 @@ range           \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|
 
 {ident}                 {yyTok = IDENT; return yyTok;}
 
-"#"{name}               {yyTok = HASH; return yyTok;}
+"#"{hexcolor}           {yyTok = HEX_OR_IDENT; return yyTok;}
+"#"{ident}              {yyTok = IDSEL; return yyTok;}
 
 "@import"               {BEGIN(mediaquery); yyTok = IMPORT_SYM; return yyTok;}
 "@page"                 {yyTok = PAGE_SYM; return yyTok;}