2002/css-validator/org/w3c/css/parser/analyzer CssParser.java,1.34,1.35 CssParserTokenManager.java,1.21,1.22

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

Modified Files:
	CssParser.java CssParserTokenManager.java 
Log Message:
see CssParser.jj

Index: CssParserTokenManager.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParserTokenManager.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- CssParserTokenManager.java	17 Mar 2008 13:44:04 -0000	1.21
+++ CssParserTokenManager.java	17 Mar 2008 14:46:26 -0000	1.22
@@ -61,6 +61,8 @@
 {
    jjmatchedKind = kind;
    jjmatchedPos = pos;
+   debugStream.println("   No more string literal token matches are possible.");
+   debugStream.println("   Currently matched the first " + (jjmatchedPos + 1) + " characters as a " + tokenImage[jjmatchedKind] + " token.");
    return pos + 1;
 }
 private final int jjMoveStringLiteralDfa0_0()
@@ -71,10 +73,10 @@
          return jjMoveStringLiteralDfa1_0(0x10000000000L, 0x0L);
       case 40:
[...7563 lines suppressed...]
+     {
+       int state = stateSet[j];
+       if (!kindDone[kindForState[lexState][state]])
+       {
+          kindDone[kindForState[lexState][state]] = true;
+          if (cnt++ > 0)
+             retVal += ", ";
+          if (cnt % 5 == 0)
+             retVal += "\n     ";
+          retVal += tokenImage[kindForState[lexState][state]];
+       }
+     }
+    }
+    if (cnt == 0)
+       return "{  }";
+    else
+       return "{ " + retVal + " }";
+  }
+
 }

Index: CssParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- CssParser.java	17 Mar 2008 13:44:04 -0000	1.34
+++ CssParser.java	17 Mar 2008 14:46:26 -0000	1.35
@@ -334,116 +334,123 @@
  * @exception ParseException exception during the parse
  */
   final public void parserUnit() throws ParseException {
-    Token n = null;
+    trace_call("parserUnit");
     try {
-      label_1:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case HTMLSTARTTAG:
-        case HTMLENDTAG:
[...3959 lines suppressed...]
+      System.out.print("Consumed token: <" + tokenImage[t.kind]);
+      if (t.kind != 0 && !tokenImage[t.kind].equals("\"" + t.image + "\"")) {
+        System.out.print(": \"" + t.image + "\"");
+      }
+      System.out.println(" at line " + t.beginLine + " column " + t.beginColumn + ">" + where);
+    }
+  }
+
+  final private void trace_scan(Token t1, int t2) {
+    if (trace_enabled) {
+      for (int i = 0; i < trace_indent; i++) { System.out.print(" "); }
+      System.out.print("Visited token: <" + tokenImage[t1.kind]);
+      if (t1.kind != 0 && !tokenImage[t1.kind].equals("\"" + t1.image + "\"")) {
+        System.out.print(": \"" + t1.image + "\"");
+      }
+      System.out.println(" at line " + t1.beginLine + " column " + t1.beginColumn + ">; Expected token: <" + tokenImage[t2] + ">");
+    }
   }
 
 }

Received on Monday, 17 March 2008 14:47:02 UTC