2002/css-validator/org/w3c/css/parser/analyzer CssParser.java,1.27,1.28 CssParser.jj,1.24,1.25 CssParserTokenManager.java,1.16,1.17

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

Modified Files:
	CssParser.java CssParser.jj CssParserTokenManager.java 
Log Message:
reverting to pre no-profile

Index: CssParserTokenManager.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParserTokenManager.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- CssParserTokenManager.java	24 Sep 2007 15:45:26 -0000	1.16
+++ CssParserTokenManager.java	27 Sep 2007 08:46:45 -0000	1.17
@@ -1,5 +1,6 @@
 /* Generated By:JavaCC: Do not edit this line. CssParserTokenManager.java */
 package org.w3c.css.parser.analyzer;
+
 import java.io.InputStream;
 import java.util.Vector;
 import java.util.Enumeration;
@@ -53,14 +54,15 @@
 import org.w3c.css.selectors.attributes.AttributeSubstr;
 import org.w3c.css.selectors.attributes.AttributeSuffix;
 
-public class CssParserTokenManager implements CssParserConstants
[...1354 lines suppressed...]
            error_line++;
            error_column = 0;
-        }
-        else
+					} else
            error_column++;
      }
      if (!EOFSeen) {
         input_stream.backup(1);
         error_after = curPos <= 1 ? "" : input_stream.GetImage();
      }
-     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
+				throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar,
+						TokenMgrError.LEXICAL_ERROR);
+			}
    }
   }
-}
 
 }

Index: CssParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- CssParser.java	26 Sep 2007 11:14:57 -0000	1.27
+++ CssParser.java	27 Sep 2007 08:46:45 -0000	1.28
@@ -107,7 +107,8 @@
     /**
      * The ac for handling errors and warnings.
      * 
-     * @param ac the new ac for the parser.
+	 * @param ac
+	 *            the new ac for the parser.
      */
     public final void setApplContext(ApplContext ac) {
         this.ac = ac;
@@ -116,7 +117,8 @@
     /**
[...3534 lines suppressed...]
         }
         p = p.next;
@@ -3899,10 +4088,15 @@
   final private void jj_save(int index, int xla) {
     JJCalls p = jj_2_rtns[index];
     while (p.gen > jj_gen) {
-      if (p.next == null) { p = p.next = new JJCalls(); break; }
+			if (p.next == null) {
+				p = p.next = new JJCalls();
+				break;
+			}
       p = p.next;
     }
-    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
+		p.gen = jj_gen + xla - jj_la;
+		p.first = token;
+		p.arg = xla;
   }
 
   static final class JJCalls {

Index: CssParser.jj
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.jj,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- CssParser.jj	26 Sep 2007 11:14:57 -0000	1.24
+++ CssParser.jj	27 Sep 2007 08:46:45 -0000	1.25
@@ -572,9 +572,7 @@
                     ac.getMsg().getString("parser.charset"));                    
             }
 	        // stricter rule for CSS21 and soon for CSS3
-            else if("none".equals(ac.getProfile())) {
-				ac.getFrame().addWarning("charsetspecial");
-			} else if ("css21".equals(ac.getCssVersion()) &&
+            else if("css21".equals(ac.getCssVersion()) &&
 			       (!" ".equals(space1Token.image) || (space2Token != null &&
 			       !"".equals(space2Token.image)))) {
 					    throw new ParseException(ac.getMsg().getString(
@@ -1177,18 +1175,6 @@
    current=simple_selector(null) 
        ( LOOKAHEAD(2) 
          comb=combinator() { 
-         if ("none".equals(ac.getProfile())) {
-           String[] warns = { String.valueOf(comb), ac.getMsg().getString(ac.getCssVersion()) };
-           if (ac.getCssVersion().equals("css1") ||
-               getAtRule().toString().equals("@media atsc-tv")) {
-               if (comb == '+')
-                  ac.getFrame().addWarning("nocomb", warns);
-               else if (comb == '>')
-                  ac.getFrame().addWarning("nocomb", warns);
-           } else if (!ac.getCssVersion().equals("css3") && comb == '~') {
-              ac.getFrame().addWarning("nocomb", warns);
-           }
-         } else {
 	       if (ac.getProfile() != null) {
 			  if (ac.getProfile().equals("mobile") || 
 				getAtRule().toString().equals("@media atsc-tv") ||
@@ -1200,13 +1186,13 @@
 			  } else if (ac.getProfile().equals("tv")) {
 			    if (comb == '+')
 				throw new InvalidParamException("nocomb", "+", ac);
+		    
 			  }
 			}
 			if (!ac.getCssVersion().equals("css3")) {
-              if (comb == '~')
+	    	      if (comb == '~') {
 			  throw new InvalidParamException("nocomb", "~", ac);
             }
-              
 	    }
 		switch(comb) {
                 case '+': 
@@ -1418,14 +1404,10 @@
 //          s.setElement(null);
             s.addUniversal(new UniversalSelector());
         } else {
-            if ("none".equals(ac.getProfile())) {
-                ac.getFrame().addWarning("notversion");
-            } else {
                 ac.getFrame().addError(new CssError(new InvalidParamException("notversion",
                 "*", ac.getCssVersion(), ac)));
             }
         }
-    }
 }
 
 /**
@@ -1520,19 +1502,9 @@
 		try {
 			if (ac.getCssVersion().equals("css3")) {
 				s.addPseudo(convertIdent(n.image).toLowerCase());
-			} else if ("none".equals(ac.getProfile())) {
-				String cssVersion = ac.getCssVersion();
-				ac.setCssVersion("css3");
-				try {
-				   s.addPseudo(convertIdent(n.image).toLowerCase());
-				} finally {
-					ac.setCssVersion(cssVersion);
-					ac.getFrame().addWarning("pseudo", new String[] { convertIdent(n.image).toLowerCase(), ac.getMsg().getString(ac.getCssVersion()) });
-				}
 			} else {
-				if (true)
-					throw new InvalidParamException("pseudo-element",
-							convertIdent(n.image).toLowerCase(), ac.getMsg().getString(ac.getCssVersion()), ac);
+			 	throw new InvalidParamException("pseudo-element", ":" + convertIdent(n.image).toLowerCase() ,
+			 		ac.getCssVersion() ,ac);
 			}
 		} catch(InvalidParamException e) {
 		     //e.printStackTrace();	

Received on Thursday, 27 September 2007 08:47:01 UTC