W3C home > Mailing lists > Public > www-validator-cvs@w3.org > April 2006

2002/css-validator/org/w3c/css/parser/analyzer CssParser.java,1.20,1.21 CssParser.jj,1.18,1.19 CssParserConstants.java,1.7,1.8 CssParserTokenManager.java,1.13,1.14

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 26 Apr 2006 12:44:17 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1FYjNR-0000j7-F5@lionel-hutz.w3.org>

Update of /sources/public/2002/css-validator/org/w3c/css/parser/analyzer
In directory hutz:/tmp/cvs-serv763/org/w3c/css/parser/analyzer

Modified Files:
	CssParser.java CssParser.jj CssParserConstants.java 
	CssParserTokenManager.java 
Log Message:
cmdline version revamped now using org.w3c.css.css.CssValidator

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2920
recorrected (now it only applies for CSS2.1)

text output is now real text, and not HTML served as text



Index: CssParserTokenManager.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParserTokenManager.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- CssParserTokenManager.java	19 Apr 2006 11:28:05 -0000	1.13
+++ CssParserTokenManager.java	26 Apr 2006 12:44:15 -0000	1.14
@@ -62,155 +62,155 @@
    switch (pos)
    {
       case 0:
-         if ((active0 & 0xfc00000000000000L) != 0L || (active1 & 0x7fL) != 0L)
-            return 56;
-         if ((active0 & 0x4000000L) != 0L)
-            return 219;
-         if ((active0 & 0x40080L) != 0L)
-            return 90;
+         if ((active0 & 0x20040L) != 0L)
+            return 89;
[...5126 lines suppressed...]
@@ -4057,19 +4034,4 @@
   }
 }
 
-void TokenLexicalActions(Token matchedToken)
-{
-   switch(jjmatchedKind)
-   {
-      case 2 :
-        if (image == null)
-            image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))));
-         else
-            image.append(new String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))));
-           image = CssParser.SPACE;
-         break;
-      default : 
-         break;
-   }
-}
 }

Index: CssParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- CssParser.java	19 Apr 2006 11:28:05 -0000	1.20
+++ CssParser.java	26 Apr 2006 12:44:15 -0000	1.21
@@ -59,7 +59,7 @@
 /**
  * A CSS3 parser  
  *
- * @author Philippe Le H�garet and Sijtsche Smeman
+ * @author Philippe Le H???garet and Sijtsche Smeman
  * @version $Revision$
  */
 public abstract class CssParser implements CssParserConstants {
@@ -345,7 +345,6 @@
     label_1:
     while (true) {
[...2836 lines suppressed...]
       la1tokens[i] = false;
     }
     if (jj_kind >= 0) {
       la1tokens[jj_kind] = true;
       jj_kind = -1;
     }
-    for (int i = 0; i < 179; i++) {
+    for (int i = 0; i < 120; i++) {
       if (jj_la1[i] == jj_gen) {
         for (int j = 0; j < 32; j++) {
           if ((jj_la1_0[i] & (1<<j)) != 0) {
@@ -4571,7 +3827,7 @@
         }
       }
     }
-    for (int i = 0; i < 85; i++) {
+    for (int i = 0; i < 84; i++) {
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;

Index: CssParserConstants.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParserConstants.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CssParserConstants.java	19 Apr 2006 11:28:05 -0000	1.7
+++ CssParserConstants.java	26 Apr 2006 12:44:15 -0000	1.8
@@ -4,97 +4,95 @@
 public interface CssParserConstants {
 
   int EOF = 0;
-  int SPC_CHAR = 1;
-  int S = 2;
-  int CDO = 6;
-  int CDC = 7;
-  int LBRACE = 8;
-  int RBRACE = 9;
-  int DASHMATCH = 10;
-  int INCLUDES = 11;
-  int PREFIXMATCH = 12;
-  int SUFFIXMATCH = 13;
-  int SUBSTRINGMATCH = 14;
-  int TILDE = 15;
-  int EQ = 16;
-  int PLUS = 17;
-  int MINUS = 18;
-  int COMMA = 19;
-  int SEMICOLON = 20;
-  int PRECEDES = 21;
-  int DIV = 22;
-  int LBRACKET = 23;
-  int RBRACKET = 24;
-  int ANY = 25;
-  int DOT = 26;
-  int LPARAN = 27;
-  int RPARAN = 28;
-  int COLON = 29;
-  int AND = 30;
-  int MEDIARESTRICTOR = 31;
-  int NONASCII = 32;
-  int H = 33;
-  int UNICODE = 34;
-  int ESCAPE = 35;
-  int NMSTART = 36;
-  int NMCHAR = 37;
-  int STRINGCHAR = 38;
-  int D = 39;
-  int NAME = 40;
-  int STRING = 41;
-  int IDENT = 42;
-  int NUMBER = 43;
-  int _URL = 44;
-  int URL = 45;
-  int PERCENTAGE = 46;
-  int LENGTH = 47;
-  int EMS = 48;
-  int EXS = 49;
-  int ANGLE = 50;
-  int TIME = 51;
-  int FREQ = 52;
-  int RESOLUTION = 53;
-  int DATE = 54;
-  int DIMEN = 55;
-  int HASH = 56;
-  int IMPORTANT_SYM = 57;
-  int IMPORT_SYM = 58;
-  int MEDIA_SYM = 59;
-  int PAGE_SYM = 60;
-  int FONT_FACE_SYM = 61;
-  int PREF_SYM = 62;
-  int COLOR_PROFILE = 63;
-  int CHARSET_SYM = 64;
-  int ATTOP = 65;
-  int ATRIGHT = 66;
-  int ATBOTTOM = 67;
-  int ATLEFT = 68;
-  int ATCOUNTER = 69;
-  int PHONETIC_ALPHABET_SYM = 70;
-  int ATKEYWORD = 71;
-  int RANGE0 = 72;
-  int RANGE1 = 73;
-  int RANGE2 = 74;
-  int RANGE3 = 75;
-  int RANGE4 = 76;
-  int RANGE5 = 77;
-  int RANGE6 = 78;
-  int RANGE = 79;
-  int UNI = 80;
-  int UNICODERANGE = 81;
-  int CLASS = 82;
-  int FUNCTION = 83;
+  int S = 1;
+  int CDO = 5;
+  int CDC = 6;
+  int LBRACE = 7;
+  int RBRACE = 8;
+  int DASHMATCH = 9;
+  int INCLUDES = 10;
+  int PREFIXMATCH = 11;
+  int SUFFIXMATCH = 12;
+  int SUBSTRINGMATCH = 13;
+  int TILDE = 14;
+  int EQ = 15;
+  int PLUS = 16;
+  int MINUS = 17;
+  int COMMA = 18;
+  int SEMICOLON = 19;
+  int PRECEDES = 20;
+  int DIV = 21;
+  int LBRACKET = 22;
+  int RBRACKET = 23;
+  int ANY = 24;
+  int DOT = 25;
+  int LPARAN = 26;
+  int RPARAN = 27;
+  int COLON = 28;
+  int AND = 29;
+  int MEDIARESTRICTOR = 30;
+  int NONASCII = 31;
+  int H = 32;
+  int UNICODE = 33;
+  int ESCAPE = 34;
+  int NMSTART = 35;
+  int NMCHAR = 36;
+  int STRINGCHAR = 37;
+  int D = 38;
+  int NAME = 39;
+  int STRING = 40;
+  int IDENT = 41;
+  int NUMBER = 42;
+  int _URL = 43;
+  int URL = 44;
+  int PERCENTAGE = 45;
+  int LENGTH = 46;
+  int EMS = 47;
+  int EXS = 48;
+  int ANGLE = 49;
+  int TIME = 50;
+  int FREQ = 51;
+  int RESOLUTION = 52;
+  int DATE = 53;
+  int DIMEN = 54;
+  int HASH = 55;
+  int IMPORTANT_SYM = 56;
+  int IMPORT_SYM = 57;
+  int MEDIA_SYM = 58;
+  int PAGE_SYM = 59;
+  int FONT_FACE_SYM = 60;
+  int PREF_SYM = 61;
+  int COLOR_PROFILE = 62;
+  int CHARSET_SYM = 63;
+  int ATTOP = 64;
+  int ATRIGHT = 65;
+  int ATBOTTOM = 66;
+  int ATLEFT = 67;
+  int ATCOUNTER = 68;
+  int PHONETIC_ALPHABET_SYM = 69;
+  int ATKEYWORD = 70;
+  int RANGE0 = 71;
+  int RANGE1 = 72;
+  int RANGE2 = 73;
+  int RANGE3 = 74;
+  int RANGE4 = 75;
+  int RANGE5 = 76;
+  int RANGE6 = 77;
+  int RANGE = 78;
+  int UNI = 79;
+  int UNICODERANGE = 80;
+  int CLASS = 81;
+  int FUNCTION = 82;
 
   int DEFAULT = 0;
   int IN_COMMENT = 1;
 
   String[] tokenImage = {
     "<EOF>",
-    "\" \"",
     "<S>",
     "\"/*\"",
     "\"*/\"",
-    "<token of kind 5>",
+    "<token of kind 4>",
     "\"<!--\"",
     "\"-->\"",
     "\"{\"",

Index: CssParser.jj
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.jj,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- CssParser.jj	19 Apr 2006 11:28:05 -0000	1.18
+++ CssParser.jj	26 Apr 2006 12:44:15 -0000	1.19
@@ -77,7 +77,7 @@
 /**
  * A CSS3 parser  
  *
- * @author Philippe Le H�garet and Sijtsche Smeman
+ * @author Philippe Le H???garet and Sijtsche Smeman
  * @version $Revision$
  */
 public abstract class CssParser {
@@ -346,9 +346,8 @@
 <DEFAULT>
 TOKEN :
 {
-    < SPC_CHAR : " " >
-    |< S : ( [ "\t" , "\n" , "\r", "\f" ] )+ > 
-         { image = CssParser.SPACE; }
+    < S : ( [ " ", "\t" , "\n" , "\r", "\f" ] )+ > 
+         /*{ image = CssParser.SPACE; }*/
 }
 
 <DEFAULT>
@@ -441,8 +440,8 @@
   | < IDENT         : ( <MINUS> )? <NMSTART> ( <NMCHAR> )* >
   | < NUMBER	  : ( <D> )+ | ( <D> )* "." ( <D> )+ > 
   | < #_URL       : [ "!","#","$","%","&","*"-"~" ] | <NONASCII> | <ESCAPE> >
-  | < URL         : "url(" ( ( <S> |<SPC_CHAR>) )*
-                    ( <STRING> | ( <_URL> )* ) ( ( <S> |<SPC_CHAR>) )* ")" >            
+  | < URL         : "url(" ( <S> )*
+                    ( <STRING> | ( <_URL> )* ) ( <S> )* ")" >            
 }
 
 <DEFAULT>
@@ -477,7 +476,7 @@
 <DEFAULT>
 TOKEN :
 {
- < IMPORTANT_SYM : "!" ( ( <S> |<SPC_CHAR>) )? "important" >
+ < IMPORTANT_SYM : "!" ( <S> )? "important" >
 }
 
 /* RESERVED ATRULE WORDS */
@@ -490,7 +489,7 @@
   | < FONT_FACE_SYM: "@font-face" >
   | < PREF_SYM     : "@preference" >
   | < COLOR_PROFILE: "@color-profile" >
-  | < CHARSET_SYM  : "@charset" >         
+  | < CHARSET_SYM  : "@charset" >
   | < ATTOP	   : "@top" >
   | < ATRIGHT      : "@right" >
   | < ATBOTTOM     : "@bottom" >
@@ -548,8 +547,8 @@
 {}
 {
   ( charset() )?
-  ( <S> | <SPC_CHAR> | ignoreStatement() )*
-  ( importDeclaration() ( ignoreStatement() ( <S> | <SPC_CHAR> )* )* )*
+  ( <S> | ignoreStatement() )*
+  ( importDeclaration() ( ignoreStatement() ( <S> )* )* )*
   afterImportDeclaration()
   <EOF>
 }
@@ -558,25 +557,38 @@
 {
     Token n = null;
     Token charsetToken = null;
+    Token space1Token = null;
+    Token space2Token = null;
 }
 {  
-    try {        
-        // @charset has a very specific syntax : 
-        // only one space allowed between @charset and the string 
-	charsetToken=<CHARSET_SYM> <SPC_CHAR> n=<STRING> ";"
-        //<CHARSET_SYM> n=<STRING> ";"
+    try {
+	// There was * instead of ? in previous versions, but it's useless since
+	// <S> is already a +
+	charsetToken=<CHARSET_SYM> ( space1Token=<S> )? n=<STRING> ( space2Token=<S> )? ";"
 	{
             // the @charset must be at the beginning of the document
             if(charsetToken.beginLine != 1 || charsetToken.beginColumn != 1) {                     
                 throw new ParseException(
                     ac.getMsg().getString("parser.charset"));                    
             }
-            else {
+	    // stricter rule for CSS21 and soon for CSS3
+            else if("css21".equals(ac.getCssVersion()) &&
+		    (!" ".equals(space1Token.image) || (space2Token != null &&
+		     !"".equals(space2Token.image)))) {
+			throw new ParseException(ac.getMsg().getString(
+						    "parser.charsetspecial"));
+	    } 
+	    else {
                 addCharSet(n.image);                    
             }
 	}
     } catch (Exception e) {
-        addError(e, charsetToken.image + " " + n.image + ";"); 
+	String skip = charsetToken +
+	    ((space1Token == null) ? "" : space1Token.image) +
+	    n +
+	    ((space2Token == null) ? "" : space2Token.image) +
+	    ";";
+        addError(e, skip); 
     }
 }
 
@@ -603,7 +615,7 @@
         }
       }
      )
-    ( ignoreStatement() ( <S> | <SPC_CHAR> )* )* )*
+    ( ignoreStatement() ( <S> )* )* )*
 }
 
 void ignoreStatement() :
@@ -625,7 +637,7 @@
 }
 {
  try {
-  <IMPORT_SYM> ( <S> | <SPC_CHAR> )*
+  <IMPORT_SYM> ( <S> )*
        ( n=<STRING> {
 		     importFile = n.image.substring(1, n.image.length() -1);
        } 
@@ -639,11 +651,11 @@
 	     }
 	 }
 	 )
-       ( <S> | <SPC_CHAR> )*
+       ( <S> )*
        ( medium(media) 
-	 ( <COMMA> ( <S> | <SPC_CHAR> )* medium(media) 
+	 ( <COMMA> ( <S> )* medium(media) 
 	   )* )? ";"
-       ( <S> | <SPC_CHAR> )*
+       ( <S> )*
    { 
      handleImport(getURL(), importFile, media);
    } 
@@ -665,10 +677,10 @@
  }
 {
  try {
-  <MEDIA_SYM> ( <S> | <SPC_CHAR> )* (n=<MEDIARESTRICTOR> { newRule.addMediaRestrictor(convertIdent(n.image), ac); } ( <S> | <SPC_CHAR> )+)?
+  <MEDIA_SYM> ( <S> )* (n=<MEDIARESTRICTOR> { newRule.addMediaRestrictor(convertIdent(n.image), ac); } ( <S> )+)?
    medium(newRule) 
-   ( <COMMA> ( <S> | <SPC_CHAR> )* medium(newRule) ( <S> | <SPC_CHAR> )* )* 
-     (<AND> ( <S> | <SPC_CHAR> )* <RPARAN> ( <S> | <SPC_CHAR> )* p=mediadeclaration() { newRule.addMediaFeature(p); } ( <S> | <SPC_CHAR> )* <LPARAN> ( <S> | <SPC_CHAR> )* )*
+   ( <COMMA> ( <S> )* medium(newRule) ( <S> )* )* 
+     (<AND> ( <S> )* <RPARAN> ( <S> )* p=mediadeclaration() { newRule.addMediaFeature(p); } ( <S> )* <LPARAN> ( <S> )* )*
    
  {
 	String media = getAtRule().toString();
@@ -688,7 +700,7 @@
 	    newAtRule(getAtRule());	
         }
 }
-   <LBRACE> ( <S> | <SPC_CHAR> )* ( ruleSet() )* <RBRACE> ( <S> | <SPC_CHAR> )*
+   <LBRACE> ( <S> )* ( ruleSet() )* <RBRACE> ( <S> )*
 {
 	if (!ac.getCssVersion().equals("css1")) {
 	    endOfAtRule();
@@ -709,7 +721,7 @@
 void medium(AtRuleMedia media) : /* tv, projection, screen, ... */
 {Token n;}
 {
-  n=<IDENT> ( <S> | <SPC_CHAR> )*
+  n=<IDENT> ( <S> )*
   { try {
         media.addMedia(convertIdent(n.image), ac); 
     } catch (InvalidParamException e) {
@@ -735,14 +747,14 @@
 }
 {
  try {
-  <PAGE_SYM> ( <S> | <SPC_CHAR> )* ( n=<IDENT> { newRule.setIdent(convertIdent(n.image)); } 
-			( <S> | <SPC_CHAR> )* )?
+  <PAGE_SYM> ( <S> )* ( n=<IDENT> { newRule.setIdent(convertIdent(n.image)); } 
+			( <S> )* )?
 
-  ( pseudo_page(newRule) )? <LBRACE> ( <S> | <SPC_CHAR> )* ( v=pageContent() 
+  ( pseudo_page(newRule) )? <LBRACE> ( <S> )* ( v=pageContent() 
 	{ 
 		collectv = v;
 	}
- ) <RBRACE> ( <S> | <SPC_CHAR> )*
+ ) <RBRACE> ( <S> )*
    {
 	if (!ac.getCssVersion().equals("css1")) {
 	    newAtRule(getAtRule());
@@ -797,8 +809,8 @@
 }
 {
     try {
-        (n=<ATTOP> | n=<ATBOTTOM> | n=<ATLEFT> | n=<ATRIGHT> ) ( <S> | <SPC_CHAR> )*
-        <LBRACE> ( <S> | <SPC_CHAR> )* v=declarations() <RBRACE> ( <S> | <SPC_CHAR> )* 
+        (n=<ATTOP> | n=<ATBOTTOM> | n=<ATLEFT> | n=<ATRIGHT> ) ( <S> )*
+        <LBRACE> ( <S> )* v=declarations() <RBRACE> ( <S> )* 
 	{
 		return v;
 	}
@@ -810,7 +822,7 @@
 void pseudo_page(AtRulePage page) :
 { Token n; }
 {
-  ":" n=<IDENT> ( <S> | <SPC_CHAR> )*
+  ":" n=<IDENT> ( <S> )*
   { try {
         page.setName(":" + convertIdent(n.image), ac); 
     } catch (InvalidParamException e) {
@@ -831,7 +843,7 @@
 }
 {
  try {
-  <FONT_FACE_SYM> ( <S> | <SPC_CHAR> )* 
+  <FONT_FACE_SYM> ( <S> )* 
 {
 	if (ac.getCssVersion().equals("css1")) {
 	    skipStatement();
@@ -843,7 +855,7 @@
         }
 
 }
-  <LBRACE> ( <S> | <SPC_CHAR> )* v=declarations() <RBRACE> ( <S> | <SPC_CHAR> )*
+  <LBRACE> ( <S> )* v=declarations() <RBRACE> ( <S> )*
    {
 	if (!ac.getCssVersion().equals("css1")) {
             addProperty(v);
@@ -875,7 +887,7 @@
 }
 {
   try {
-    <COLOR_PROFILE> ( <S> | <SPC_CHAR> )*
+    <COLOR_PROFILE> ( <S> )*
 {
 	if (!ac.getCssVersion().equals("svg")) {
 	    skipStatement();
@@ -887,7 +899,7 @@
         }
 
 }
-    <LBRACE> ( <S> | <SPC_CHAR> )* v=declarations() <RBRACE> ( <S> | <SPC_CHAR> )*
+    <LBRACE> ( <S> )* v=declarations() <RBRACE> ( <S> )*
     {
 	if (ac.getCssVersion().equals("svg")) {
 	    addProperty(v);
@@ -922,7 +934,7 @@
 }
 {
   try {
-    <PREF_SYM> ( <S> | <SPC_CHAR> )*
+    <PREF_SYM> ( <S> )*
 {
 	if (ac.getCssVersion().equals("css1")) {
 	    skipStatement();
@@ -934,7 +946,7 @@
         }
 
 }
-    <LBRACE> ( <S> | <SPC_CHAR> )* v=declarations() <RBRACE> ( <S> | <SPC_CHAR> )*
+    <LBRACE> ( <S> )* v=declarations() <RBRACE> ( <S> )*
     {
 	if (!ac.getCssVersion().equals("css1")) {
 	    addProperty(v);
@@ -968,7 +980,7 @@
 }
 {
  try {
-   <PHONETIC_ALPHABET_SYM> ( <S> | <SPC_CHAR> )* n=<STRING> ( <S> | <SPC_CHAR> )* ";"
+   <PHONETIC_ALPHABET_SYM> ( <S> )* n=<STRING> ( <S> )* ";"
    {
 	if (!ac.getCssVersion().equals("css3")) {
 	    skipStatement();
@@ -1013,8 +1025,8 @@
 void operator(CssExpression expr) :
 {}
 {
-  "/" ( <S> | <SPC_CHAR> )* { if (expr.getCount() > 0) expr.setOperator('/'); }
-| "," ( <S> | <SPC_CHAR> )* { if (expr.getCount() > 0) expr.setOperator(','); }
+  "/" ( <S> )* { if (expr.getCount() > 0) expr.setOperator('/'); }
+| "," ( <S> )* { if (expr.getCount() > 0) expr.setOperator(','); }
 }
 
 /**
@@ -1025,13 +1037,13 @@
 char connector = ' ';
 }
 {
-    "+" ( <S> | <SPC_CHAR> )* {  return '+'; }
-  | ">" ( <S> | <SPC_CHAR> )* { return '>'; }
-  | "~" ( <S> | <SPC_CHAR> )* { return '~'; }
-  | <S> | <SPC_CHAR>  ( ( "+" { connector = '+'; } 
+    "+" ( <S> )* {  return '+'; }
+  | ">" ( <S> )* { return '>'; }
+  | "~" ( <S> )* { return '~'; }
+  | <S>  ( ( "+" { connector = '+'; } 
            | ">" { connector = '>'; } 
 	   | "~" { connector = '~'; }) 
-  ( <S> | <SPC_CHAR> )* )? { return connector; }
+  ( <S> )* )? { return connector; }
 }
 
 /**
@@ -1050,7 +1062,7 @@
 String property() :
 {Token n; }
 {
-  n=<IDENT> ( <S> | <SPC_CHAR> )* { currentProperty = convertIdent(n.image); 
+  n=<IDENT> ( <S> )* { currentProperty = convertIdent(n.image); 
 		       return currentProperty; }
 }
 
@@ -1072,16 +1084,16 @@
        }
      }
    
-     ( <COMMA> ( <S> | <SPC_CHAR> )*
+     ( <COMMA> ( <S> )*
        contextual=selector()
        { if (contextual != null) {
           context_set.addElement(contextual); 
          }
        }  
      )*
-     <LBRACE> ( <S> | <SPC_CHAR> )*     
+     <LBRACE> ( <S> )*
      value_set=declarations()
-     <RBRACE> ( <S> | <SPC_CHAR> )*
+     <RBRACE> ( <S> )*
     {
       markRule = true;
 
@@ -1131,7 +1143,7 @@
          currentProperty = null;
        }
      )? 
-     ( ";" ( <S> | <SPC_CHAR> )*
+     ( ";" ( <S> )*
        ( values=declaration() 
 	{ if (values != null) {
 	   value_set.addElement(values);
@@ -1195,7 +1207,7 @@
                 //current.setConnector(comb); 
 	  }
 	 current=simple_selector(current) 
-	 )* ( <S> | <SPC_CHAR> )*
+	 )* ( <S> )*
    { return current; }
  }
  catch (InvalidParamException ie) {    
@@ -1248,7 +1260,7 @@
     CssSelectors current; }
 {
    current=simple_selector(null) 
-       ( ( <S> | <SPC_CHAR> )+
+       ( ( <S> )+
 	 current=simple_selector(current) 
 	 )*
    { return current; }
@@ -1408,20 +1420,20 @@
     int selectorType = CssSelectors.ATTRIBUTE_ANY;
 }
 {
-  "[" ( <S> | <SPC_CHAR> )* att=<IDENT> ( <S> | <SPC_CHAR> )*
+  "[" ( <S> )* att=<IDENT> ( <S> )*
       ( ("=" { selectorType = CssSelectors.ATTRIBUTE_EXACT; }
         | <INCLUDES> { selectorType = CssSelectors.ATTRIBUTE_ONE_OF; }
 	| <DASHMATCH> { selectorType = CssSelectors.ATTRIBUTE_BEGIN; }
 	| <PREFIXMATCH> { selectorType = CssSelectors.ATTRIBUTE_START; }
 	| <SUFFIXMATCH> { selectorType = CssSelectors.ATTRIBUTE_SUFFIX; }
 	| <SUBSTRINGMATCH> { selectorType = CssSelectors.ATTRIBUTE_SUBSTR; }
-	 ) ( <S> | <SPC_CHAR> )* 
+	 ) ( <S> )* 
 	 ( val=<IDENT> 
 	     { val.image = convertIdent(val.image); }
 	   | ( val=<STRING> 
 	       { val.image = convertStringIndex(val.image, 1, val.image.length() -1);} 
 			   ) 
-	   ( <S> | <SPC_CHAR> )* ) )?
+	   ( <S> )* ) )?
   "]"
       {
 	  if (selectorType == CssSelectors.ATTRIBUTE_ANY) {
@@ -1511,7 +1523,7 @@
 		     ac.getFrame().addError(new CssError(e));
 		}
  } )
-	| ( n=<FUNCTION> ( <S> | <SPC_CHAR> )* (language=<NUMBER> | language=<IDENT> | language=<STRING> | param=simple_selector(null)) ( <S> | <SPC_CHAR> )* ")"
+	| ( n=<FUNCTION> ( <S> )* (language=<NUMBER> | language=<IDENT> | language=<STRING> | param=simple_selector(null)) ( <S> )* ")"
 	    // :lang(en) is a very special case ...
 	    // since CSS3: contains(String), nth-of-type(n) and nth-child(n) and not(simple selector) too
 	    { 
@@ -1612,7 +1624,7 @@
 }
 {
 try {
-      string_property=property() (":" ( <S> | <SPC_CHAR> )* 
+      string_property=property() (":" ( <S> )* 
       values=expr() ( important=prio() )? )?
     {
 	
@@ -1659,7 +1671,7 @@
 }
 {
 try {
-     string_property=property() ":" ( <S> | <SPC_CHAR> )* 
+     string_property=property() ":" ( <S> )* 
       values=expr() ( important=prio() )?
     {
 	try {
@@ -1711,7 +1723,7 @@
 boolean prio() :
 {}
 {
-  <IMPORTANT_SYM> ( <S> | <SPC_CHAR> )* { return true; }
+  <IMPORTANT_SYM> ( <S> )* { return true; }
 }
 
 /**
@@ -1750,7 +1762,7 @@
     | n=<DIMEN> {  
 	addError(new ParseException("Unknown dimension"), n.image); }    
     | func=function() { setValue(func, exp, operator, null, FUNCTION); }
-      ) ( <S> | <SPC_CHAR> )* )
+      ) ( <S> )* )
   | (( n=<STRING> { setValue(new CssString(), exp, operator, n, STRING); }
     | n=<IDENT> 
     {
@@ -1784,7 +1796,7 @@
       }
     | n=<UNICODERANGE> { setValue(new CssUnicodeRange(), exp, operator, n, 
 				UNICODERANGE); }
-    ) ( <S> | <SPC_CHAR> )* )
+    ) ( <S> )* )
 }
 
 /**
@@ -1797,7 +1809,7 @@
  org.w3c.css.values.ATSCColor colorATSC = new org.w3c.css.values.ATSCColor();
 }
 {
-    n=<FUNCTION> ( <S> | <SPC_CHAR> )* exp=expr() 
+    n=<FUNCTION> ( <S> )* exp=expr() 
     ")" { 
 
 	if (n.image.toLowerCase().equals("rgb(")) {
Received on Wednesday, 26 April 2006 12:44:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:54 GMT