2002/css-validator/org/w3c/css/parser/analyzer ASCII_CharStream.java,1.1,1.2 CommentSkipperInputStream.java,1.3,1.4 Couple.java,1.3,1.4 CssParser.java,1.18,1.19 CssParser.jj,1.16,1.17 CssParserTokenManager.java,1.11,1.12 ParseException.java,1.3,1.4 SimpleCharStream.java,1.2,1.3 TokenMgrError.java,1.5,1.6

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

Modified Files:
	ASCII_CharStream.java CommentSkipperInputStream.java 
	Couple.java CssParser.java CssParser.jj 
	CssParserTokenManager.java ParseException.java 
	SimpleCharStream.java TokenMgrError.java 
Log Message:
>From Jean-Guilhem Rouel (again!)
Reformatting of code
Fix for bug 774 [1] (even more warnings)
Fix for bug 768 [2]
Modification of the soap output format (each warning list and error list has 
the URI it refers to)


[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=774
[2] http://www.w3.org/Bugs/Public/show_bug.cgi?id=768



Index: TokenMgrError.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/TokenMgrError.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- TokenMgrError.java	8 Sep 2005 12:23:33 -0000	1.5
+++ TokenMgrError.java	14 Sep 2005 15:14:18 -0000	1.6
@@ -37,7 +37,7 @@
 
    public int getErrorLine() {
 	return errorLine;
-   } 
+   }
 
    /**
     * Replaces unprintable characters by their espaced (or unicode escaped)
@@ -91,7 +91,7 @@
    /**
     * Returns a detailed message for the Error when it is thrown by the
     * token manager to indicate a lexical error.
-    * Parameters : 
+    * Parameters :
     *    EOFSeen     : indicates if EOF caused the lexicl error
     *    curLexState : lexical state in which this error occured
     *    errorLine   : line number when the error occured
@@ -111,7 +111,7 @@
    /**
     * You can also modify the body of this method to customize your error messages.
     * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
-    * of end-users concern, so you can return something like : 
+    * of end-users concern, so you can return something like :
     *
     *     "Internal Error : Please file a bug report .... "
     *
@@ -133,9 +133,9 @@
       errorCode = reason;
    }
 
-   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, 
+   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine,
 	   int errorColumn, String errorAfter, char curChar, int reason) {
-      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), 
+      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar),
 	      reason);
       this.errorLine = errorLine;
    }

Index: CssParserTokenManager.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParserTokenManager.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- CssParserTokenManager.java	8 Sep 2005 12:51:36 -0000	1.11
+++ CssParserTokenManager.java	14 Sep 2005 15:14:18 -0000	1.12
@@ -358,7 +358,7 @@
 private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(0, old0, old1); 
+      return jjStartNfa_0(0, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(1, active0, active1);
@@ -401,7 +401,7 @@
 private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(1, old0, old1); 
+      return jjStartNfa_0(1, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(2, active0, active1);
@@ -456,7 +456,7 @@
 private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(2, old0, old1); 
+      return jjStartNfa_0(2, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(3, active0, active1);
@@ -500,7 +500,7 @@
 private final int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(3, old0, old1); 
+      return jjStartNfa_0(3, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(4, active0, active1);
@@ -540,7 +540,7 @@
 private final int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(4, old0, old1); 
+      return jjStartNfa_0(4, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(5, active0, active1);
@@ -577,7 +577,7 @@
 private final int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(5, old0, old1); 
+      return jjStartNfa_0(5, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(6, active0, active1);
@@ -615,7 +615,7 @@
 private final int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(6, old0, old1); 
+      return jjStartNfa_0(6, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(7, active0, active1);
@@ -640,7 +640,7 @@
 private final int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(7, old0, old1); 
+      return jjStartNfa_0(7, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(8, active0, active1);
@@ -669,7 +669,7 @@
 private final int jjMoveStringLiteralDfa10_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(8, old0, old1); 
+      return jjStartNfa_0(8, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(9, active0, active1);
@@ -696,7 +696,7 @@
 private final int jjMoveStringLiteralDfa11_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(9, old0, old1); 
+      return jjStartNfa_0(9, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(10, active0, active1);
@@ -718,7 +718,7 @@
 private final int jjMoveStringLiteralDfa12_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(10, old0, old1); 
+      return jjStartNfa_0(10, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(11, active0, active1);
@@ -740,7 +740,7 @@
 private final int jjMoveStringLiteralDfa13_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(11, old0, old1); 
+      return jjStartNfa_0(11, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(12, active0, active1);
@@ -764,7 +764,7 @@
 private final int jjMoveStringLiteralDfa14_0(long old0, long active0, long old1, long active1)
 {
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjStartNfa_0(12, old0, old1); 
+      return jjStartNfa_0(12, old0, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(13, 0L, active1);
@@ -783,7 +783,7 @@
 private final int jjMoveStringLiteralDfa15_0(long old1, long active1)
 {
    if (((active1 &= old1)) == 0L)
-      return jjStartNfa_0(13, 0L, old1); 
+      return jjStartNfa_0(13, 0L, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(14, 0L, active1);
@@ -802,7 +802,7 @@
 private final int jjMoveStringLiteralDfa16_0(long old1, long active1)
 {
    if (((active1 &= old1)) == 0L)
-      return jjStartNfa_0(14, 0L, old1); 
+      return jjStartNfa_0(14, 0L, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(15, 0L, active1);
@@ -821,7 +821,7 @@
 private final int jjMoveStringLiteralDfa17_0(long old1, long active1)
 {
    if (((active1 &= old1)) == 0L)
-      return jjStartNfa_0(15, 0L, old1); 
+      return jjStartNfa_0(15, 0L, old1);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(16, 0L, active1);
@@ -3872,7 +3872,7 @@
 int jjmatchedPos;
 int jjmatchedKind;
 
-public Token getNextToken() 
+public Token getNextToken()
 {
   int kind;
   Token specialToken = null;
@@ -3881,13 +3881,13 @@
 
   EOFLoop :
   for (;;)
-  {   
-   try   
-   {     
+  {
+   try
+   {
       curChar = input_stream.BeginToken();
-   }     
+   }
    catch(java.io.IOException e)
-   {        
+   {
       jjmatchedKind = 0;
       matchedToken = jjFillToken();
       return matchedToken;
@@ -3982,7 +3982,7 @@
             image.append(new String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))));
            image = CssParser.SPACE;
          break;
-      default : 
+      default :
          break;
    }
 }

Index: Couple.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/Couple.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Couple.java	8 Sep 2005 12:23:33 -0000	1.3
+++ Couple.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -13,18 +13,18 @@
  * This class represents a couple : an at-rule property and an at-rule
  * expression.
  *
- * @version $Revision$ 
+ * @version $Revision$
  */
 public class Couple {
 
   /**
    * The at-rule property.
-   */  
+   */
   protected String property;
-  
+
   /**
    * The at-rule expression.
-   */  
+   */
   protected CssExpression expression;
 
   /**
@@ -43,25 +43,25 @@
     this.property = property;
     this.expression = expression;
     this.important = important;
-  }  
+  }
 
   /**
    * Get the at-rule property
-   */  
+   */
   public final String getProperty() {
     return property;
   }
 
   /**
    * get the at-rule expression
-   */  
+   */
   public final CssExpression getExpression() {
     return expression;
   }
 
   /**
    * Is this at-rule is important
-   */  
+   */
   public final boolean getImportant() {
     return important;
   }

Index: CssParser.jj
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.jj,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- CssParser.jj	8 Sep 2005 12:51:36 -0000	1.16
+++ CssParser.jj	14 Sep 2005 15:14:18 -0000	1.17
@@ -1308,7 +1308,6 @@
         	  isLength = true;               
               }
               catch(Exception e) {
-        	  System.out.println("CssParser._class(): " + e.getClass());
         	  isLength = false;              
               }
               if(isLength) {
@@ -1540,7 +1539,6 @@
 		  isLength = true;               
 	      }
 	      catch(Exception e) {
-		  System.out.println("CssParser._id(): " + e.getClass());
 		  isLength = false;              
 	      }
 	      if(isLength) {

Index: CssParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- CssParser.java	8 Sep 2005 12:51:36 -0000	1.18
+++ CssParser.java	14 Sep 2005 15:14:18 -0000	1.19
@@ -88,7 +88,7 @@
     protected String currentProperty;
 
     /**
-     * <code>true</code> if the parser should recognized Aural properties, 
+     * <code>true</code> if the parser should recognized Aural properties,
      * <code>false</code> otherwise.
      */
     protected boolean mode;
@@ -103,7 +103,7 @@
 
     /**
      * The ac for handling errors and warnings.
-     * 
+     *
      * @param ac the new ac for the parser.
      */
     public final void setApplContext(ApplContext ac) {
@@ -193,14 +193,14 @@
      * with <code>property</code> and assign to it the expression with the
      * importance. Don't forget to set informations too.
      * <p>
-     * A subclass must provide an implementation of this method. 
+     * A subclass must provide an implementation of this method.
      *
      * @param  property  the name of the property
      * @param  values    the expression representation of values
      * @param  important <code>true</code> if values are important
      *
      * @return           <code>null</code>or a property
-     * 
+     *
      * @see              org.w3c.css.css.CssProperty
      */
     public abstract CssProperty handleDeclaration(String property,
@@ -211,7 +211,7 @@
     /**
      * Adds a vector of properties to a selector.
      * <p>
-     * A subclass must provide an implementation of this method. 
+     * A subclass must provide an implementation of this method.
      *
      * @param selector     the selector
      * @param declarations Properties to associate with contexts
@@ -673,7 +673,7 @@
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case MEDIARESTRICTOR:
         n = jj_consume_token(MEDIARESTRICTOR);
-                                              newRule.addMediaRestrictor(convertIdent(n.image), ac);
+        newRule.addMediaRestrictor(convertIdent(n.image), ac);
         label_16:
         while (true) {
           jj_consume_token(S);
@@ -766,7 +766,7 @@
           jj_consume_token(S);
         }
         p = mediadeclaration();
-                                                              newRule.addMediaFeature(p);
+        newRule.addMediaFeature(p);
         label_23:
         while (true) {
           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1800,7 +1800,7 @@
                   default:
                       current.addDescendant(new DescendantSelector());
                   }
-                //current.setConnector(comb); 
+                //current.setConnector(comb);
 
         current = simple_selector(current);
       }
@@ -2239,7 +2239,6 @@
                   isLength = true;
               }
               catch(Exception e) {
-                  System.out.println("CssParser._class(): " + e.getClass());
                   isLength = false;
               }
               if(isLength) {
@@ -2250,7 +2249,7 @@
               }
               else {
                   try {
-                      // for css > 1, we add the rule to have a context, 
+                      // for css > 1, we add the rule to have a context,
                       // and we then remove it
                       s.addClass(new ClassSelector(n.image));
 
@@ -2499,7 +2498,7 @@
               }
               try {
                   s.addAttribute(attribute);
-//	      	  s.addAttribute(att.image.toLowerCase(), val.image, 
+//	      	  s.addAttribute(att.image.toLowerCase(), val.image,
 //			     selectorType);
               } catch (InvalidParamException e) {
                   removeThisRule();
@@ -2527,7 +2526,7 @@
                                         ac.getCssVersion() ,ac);}
                          }
                 } catch(InvalidParamException e) {
-                     //e.printStackTrace();	
+                     //e.printStackTrace();
                      removeThisRule();
                      ac.getFrame().addError(new CssError(e));
                 }
@@ -2540,7 +2539,7 @@
                 try {
                      s.addPseudo(convertIdent(n.image).toLowerCase());
                 } catch(InvalidParamException e) {
-                     //e.printStackTrace();	
+                     //e.printStackTrace();
                      removeThisRule();
                      ac.getFrame().addError(new CssError(e));
                 }
@@ -2654,7 +2653,7 @@
                 "To make \"." + n.image + "\" a valid id, CSS2" +
                 " requires the first digit to be escaped " +
                 "(\"#" + cl + "\")");
-              // for css > 1, we add the rule to have a context, 
+              // for css > 1, we add the rule to have a context,
               // and we then remove it
               s.addId(new IdSelector(n.image));
               removeThisRule();
@@ -2667,7 +2666,6 @@
                   isLength = true;
               }
               catch(Exception e) {
-                  System.out.println("CssParser._id(): " + e.getClass());
                   isLength = false;
               }
               if(isLength) {
@@ -3039,7 +3037,7 @@
         semicolon.image = ";";
         if (t.kind == COLON) {
             /* @@SEEME. (generate a warning?) */
-            /* @@SEEME if expression is a single ident, 
+            /* @@SEEME if expression is a single ident,
 	       generate an error ? */
             addError(new ParseException(ac.getMsg().getString("parser.semi-colon")),
                      (CssExpression) null);

Index: ASCII_CharStream.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/ASCII_CharStream.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ASCII_CharStream.java	13 Mar 2002 19:55:52 -0000	1.1
+++ ASCII_CharStream.java	14 Sep 2005 15:14:18 -0000	1.2
@@ -190,7 +190,7 @@
   }
 
   /**
-   * @deprecated 
+   * @deprecated
    * @see #getEndColumn
    */
 
@@ -199,7 +199,7 @@
   }
 
   /**
-   * @deprecated 
+   * @deprecated
    * @see #getEndLine
    */
 
@@ -354,7 +354,7 @@
         bufcolumn[j] = newCol + columnDiff;
         columnDiff = nextColDiff;
         i++;
-     } 
+     }
 
      if (i < len)
      {

Index: ParseException.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/ParseException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ParseException.java	30 Mar 2004 13:24:18 -0000	1.3
+++ ParseException.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -121,7 +121,7 @@
         break;
       }
       retval += add_escapes(tok.image);
-      tok = tok.next; 
+      tok = tok.next;
     }
     retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
     retval += "." + eol;
@@ -138,7 +138,7 @@
    * The end of line string for this machine.
    */
   protected String eol = System.getProperty("line.separator", "\n");
- 
+
   /**
    * Used to convert raw characters to their escaped version
    * when these raw version cannot be used as part of an ASCII

Index: CommentSkipperInputStream.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CommentSkipperInputStream.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CommentSkipperInputStream.java	8 Aug 2005 13:18:11 -0000	1.3
+++ CommentSkipperInputStream.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -21,7 +21,7 @@
  * @version $Revision$
  * @author  Philippe Le Hegaret
  */
-public class CommentSkipperInputStream extends InputStream { 
+public class CommentSkipperInputStream extends InputStream {
 
     int previous;
     InputStream in;
@@ -31,7 +31,7 @@
     public CommentSkipperInputStream(InputStream input) {
 	in = input;
     }
-    
+
 
     public int read() throws IOException {
 	int c;
@@ -47,14 +47,14 @@
 	    return c;
 	}
 	previous = in.read();
-	
+
 	if (previous != '*') {
 	    return c;
 	}
 	previous = 0;
 	do {
 	    do {
-		c = in.read();	    
+		c = in.read();
 	    } while ((c != -1) && (c != '*'));
 	    c = in.read();
 	} while ((c != -1) && (c != '/'));

Index: SimpleCharStream.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/SimpleCharStream.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- SimpleCharStream.java	30 Mar 2004 13:24:18 -0000	1.2
+++ SimpleCharStream.java	14 Sep 2005 15:14:18 -0000	1.3
@@ -194,7 +194,7 @@
   }
 
   /**
-   * @deprecated 
+   * @deprecated
    * @see #getEndColumn
    */
 
@@ -203,7 +203,7 @@
   }
 
   /**
-   * @deprecated 
+   * @deprecated
    * @see #getEndLine
    */
 
@@ -378,7 +378,7 @@
         bufcolumn[j] = newCol + columnDiff;
         columnDiff = nextColDiff;
         i++;
-     } 
+     }
 
      if (i < len)
      {

Received on Wednesday, 14 September 2005 15:16:14 UTC