[pkg-java] r16833 - in trunk/javacc/debian: . patches

Emmanuel Bourg ebourg-guest at alioth.debian.org
Thu Jun 6 14:09:54 UTC 2013


Author: ebourg-guest
Date: 2013-06-06 14:09:53 +0000 (Thu, 06 Jun 2013)
New Revision: 16833

Added:
   trunk/javacc/debian/patches/ParseGen.diff
Modified:
   trunk/javacc/debian/changelog
   trunk/javacc/debian/patches/series
Log:
Fixed a regression causing the encountered/expected token list to be empty (https://java.net/jira/browse/JAVACC-244)



Modified: trunk/javacc/debian/changelog
===================================================================
--- trunk/javacc/debian/changelog	2013-06-06 13:29:02 UTC (rev 16832)
+++ trunk/javacc/debian/changelog	2013-06-06 14:09:53 UTC (rev 16833)
@@ -1,5 +1,7 @@
 javacc (5.0-5) unstable; urgency=low
 
+  * Fixed a regression causing the encountered/expected token list to be empty
+    (see https://java.net/jira/browse/JAVACC-244)
   * Fixed the watch file
   * Enabled the unit tests
   * debian/control:

Added: trunk/javacc/debian/patches/ParseGen.diff
===================================================================
--- trunk/javacc/debian/patches/ParseGen.diff	                        (rev 0)
+++ trunk/javacc/debian/patches/ParseGen.diff	2013-06-06 14:09:53 UTC (rev 16833)
@@ -0,0 +1,36 @@
+Description: Fixes a regression causing the encountered/expected token list to be empty
+Author: Dag H. Wanvik <dag.wanvik at oracle.com>
+Forwarded: yes
+Bug: https://java.net/jira/browse/JAVACC-244
+--- a/src/org/javacc/parser/ParseGen.java
++++ b/src/org/javacc/parser/ParseGen.java
+@@ -570,21 +570,24 @@
+           ostr.println("      for (int i = 0; i < jj_endpos; i++) {");
+           ostr.println("        jj_expentry[i] = jj_lasttokens[i];");
+           ostr.println("      }");
++          ostr.println("      boolean exists = false;");
+         if (!Options.getGenerateGenerics())
+-          ostr.println("      jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {");
++          ostr.println("      for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {");
+         else
+-          ostr.println("      jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {");
++          ostr.println("      for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {");
++          ostr.println("        exists = true;");
+           ostr.println("        int[] oldentry = (int[])(it.next());");
+           ostr.println("        if (oldentry.length == jj_expentry.length) {");
+           ostr.println("          for (int i = 0; i < jj_expentry.length; i++) {");
+           ostr.println("            if (oldentry[i] != jj_expentry[i]) {");
+-          ostr.println("              continue jj_entries_loop;");
++          ostr.println("              exists = false;");
++          ostr.println("              break;");
+           ostr.println("            }");
+           ostr.println("          }");
+-          ostr.println("          jj_expentries.add(jj_expentry);");
+-          ostr.println("          break jj_entries_loop;");
++          ostr.println("          if (exists) break;");
+           ostr.println("        }");
+           ostr.println("      }");
++          ostr.println("      if (!exists) jj_expentries.add(jj_expentry);");
+           ostr.println("      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;");
+           ostr.println("    }");
+           ostr.println("  }");

Modified: trunk/javacc/debian/patches/series
===================================================================
--- trunk/javacc/debian/patches/series	2013-06-06 13:29:02 UTC (rev 16832)
+++ trunk/javacc/debian/patches/series	2013-06-06 14:09:53 UTC (rev 16833)
@@ -1,2 +1,3 @@
 executables.patch
 javacctarget.patch
+ParseGen.diff




More information about the pkg-java-commits mailing list