diff -Nru javacc4-4.0/debian/changelog javacc4-4.0/debian/changelog --- javacc4-4.0/debian/changelog 2016-11-18 15:34:41.000000000 +0000 +++ javacc4-4.0/debian/changelog 2018-04-06 10:37:48.000000000 +0000 @@ -1,3 +1,11 @@ +javacc4 (4.0-2) unstable; urgency=medium + + * Fixed the build failure with Java 9 (Closes: #893342) + * Standards-Version updated to 4.1.4 + * Switch to debhelper level 11 + + -- Emmanuel Bourg Fri, 06 Apr 2018 12:37:48 +0200 + javacc4 (4.0-1) unstable; urgency=medium * Cloned the javacc package and rolled back to the version 4 (Closes: #844744) diff -Nru javacc4-4.0/debian/compat javacc4-4.0/debian/compat --- javacc4-4.0/debian/compat 2016-11-18 15:33:42.000000000 +0000 +++ javacc4-4.0/debian/compat 2018-04-06 10:37:16.000000000 +0000 @@ -1 +1 @@ -10 +11 diff -Nru javacc4-4.0/debian/control javacc4-4.0/debian/control --- javacc4-4.0/debian/control 2016-11-18 15:34:41.000000000 +0000 +++ javacc4-4.0/debian/control 2018-04-06 10:37:16.000000000 +0000 @@ -6,14 +6,14 @@ Build-Depends: ant, ant-optional, - debhelper (>= 10), + debhelper (>= 11), default-jdk, docbook-to-man, javacc, junit, libxalan2-java, maven-repo-helper -Standards-Version: 3.9.8 +Standards-Version: 4.1.4 Vcs-Git: https://anonscm.debian.org/git/pkg-java/javacc.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/javacc.git Homepage: http://javacc.org diff -Nru javacc4-4.0/debian/patches/java5-compatibility.patch javacc4-4.0/debian/patches/java5-compatibility.patch --- javacc4-4.0/debian/patches/java5-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 +++ javacc4-4.0/debian/patches/java5-compatibility.patch 2018-03-28 00:34:42.000000000 +0000 @@ -0,0 +1,677 @@ +Description: Replaces the reserved enum keyword +Author: Emmanuel Bourg +Forwarded: not-needed +--- a/src/org/javacc/parser/ParseEngine.java ++++ b/src/org/javacc/parser/ParseEngine.java +@@ -243,8 +243,8 @@ + indentAmt++; + } + printTokenSetup((Token)(la.action_tokens.elementAt(0))); +- for (java.util.Enumeration enum = la.action_tokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = la.action_tokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -357,8 +357,8 @@ + // the semantic check with the syntactic one. + retval += " && ("; + printTokenSetup((Token)(la.action_tokens.elementAt(0))); +- for (java.util.Enumeration enum = la.action_tokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = la.action_tokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -449,16 +449,16 @@ + ostr.print(" " + p.lhs + "("); + if (p.parameter_list_tokens.size() != 0) { + printTokenSetup((Token)(p.parameter_list_tokens.elementAt(0))); +- for (java.util.Enumeration enum = p.parameter_list_tokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = p.parameter_list_tokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + printToken(t, ostr); + } + printTrailingComments(t, ostr); + } + ostr.print(") throws ParseException"); +- for (java.util.Enumeration enum = p.throws_list.elements(); enum.hasMoreElements();) { ++ for (java.util.Enumeration enumeration = p.throws_list.elements(); enumeration.hasMoreElements();) { + ostr.print(", "); +- java.util.Vector name = (java.util.Vector)enum.nextElement(); ++ java.util.Vector name = (java.util.Vector)enumeration.nextElement(); + for (java.util.Enumeration enum1 = name.elements(); enum1.hasMoreElements();) { + t = (Token)enum1.nextElement(); + ostr.print(t.image); +@@ -474,8 +474,8 @@ + } + if (p.declaration_tokens.size() != 0) { + printTokenSetup((Token)(p.declaration_tokens.elementAt(0))); cline--; +- for (java.util.Enumeration enum = p.declaration_tokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = p.declaration_tokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + printToken(t, ostr); + } + printTrailingComments(t, ostr); +@@ -512,8 +512,8 @@ + retval += "\n"; + if (e_nrw.lhsTokens.size() != 0) { + printTokenSetup((Token)(e_nrw.lhsTokens.elementAt(0))); +- for (java.util.Enumeration enum = e_nrw.lhsTokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = e_nrw.lhsTokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -535,8 +535,8 @@ + retval += "\n"; + if (e_nrw.lhsTokens.size() != 0) { + printTokenSetup((Token)(e_nrw.lhsTokens.elementAt(0))); +- for (java.util.Enumeration enum = e_nrw.lhsTokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = e_nrw.lhsTokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -545,8 +545,8 @@ + retval += e_nrw.name + "("; + if (e_nrw.argument_tokens.size() != 0) { + printTokenSetup((Token)(e_nrw.argument_tokens.elementAt(0))); +- for (java.util.Enumeration enum = e_nrw.argument_tokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = e_nrw.argument_tokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -557,8 +557,8 @@ + retval += "\u0003\n"; + if (e_nrw.action_tokens.size() != 0) { + printTokenSetup((Token)(e_nrw.action_tokens.elementAt(0))); ccol = 1; +- for (java.util.Enumeration enum = e_nrw.action_tokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = e_nrw.action_tokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -662,8 +662,8 @@ + v = (java.util.Vector)(e_nrw.types.elementAt(i)); + if (v.size() != 0) { + printTokenSetup((Token)(v.elementAt(0))); +- for (java.util.Enumeration enum = v.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = v.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -677,8 +677,8 @@ + v = (java.util.Vector)(e_nrw.catchblks.elementAt(i)); + if (v.size() != 0) { + printTokenSetup((Token)(v.elementAt(0))); ccol = 1; +- for (java.util.Enumeration enum = v.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = v.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -689,8 +689,8 @@ + retval += " finally {\u0003\n"; + if (e_nrw.finallyblk.size() != 0) { + printTokenSetup((Token)(e_nrw.finallyblk.elementAt(0))); ccol = 1; +- for (java.util.Enumeration enum = e_nrw.finallyblk.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = e_nrw.finallyblk.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + retval += printToken(t); + } + retval += printTrailingComments(t); +@@ -904,8 +904,8 @@ + ostr.println(" lookingAhead = true;"); + ostr.print(" jj_semLA = "); + printTokenSetup((Token)(la.action_tokens.elementAt(0))); +- for (java.util.Enumeration enum = la.action_tokens.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (java.util.Enumeration enumeration = la.action_tokens.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + printToken(t, ostr); + } + printTrailingComments(t, ostr); +@@ -1075,8 +1075,8 @@ + + ostr = ps; + +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- p = (NormalProduction)enum.nextElement(); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ p = (NormalProduction)enumeration.nextElement(); + if (p instanceof JavaCodeProduction) { + jp = (JavaCodeProduction)p; + t = (Token)(jp.return_type_tokens.elementAt(0)); +@@ -1147,8 +1147,8 @@ + } + } + +- for (java.util.Enumeration enum = phase3table.elements(); enum.hasMoreElements();) { +- buildPhase3Routine((Phase3Data)(enum.nextElement()), false); ++ for (java.util.Enumeration enumeration = phase3table.elements(); enumeration.hasMoreElements();) { ++ buildPhase3Routine((Phase3Data)(enumeration.nextElement()), false); + } + + } +--- a/src/org/javacc/parser/Semanticize.java ++++ b/src/org/javacc/parser/Semanticize.java +@@ -55,15 +55,15 @@ + * them to trivial choices. This way, their semantic lookahead specification + * can be evaluated during other lookahead evaluations. + */ +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- ExpansionTreeWalker.postOrderWalk(((NormalProduction)enum.nextElement()).expansion, new LookaheadFixer()); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ ExpansionTreeWalker.postOrderWalk(((NormalProduction)enumeration.nextElement()).expansion, new LookaheadFixer()); + } + + /* + * The following loop populates "production_table" + */ +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- NormalProduction p = (NormalProduction)enum.nextElement(); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ NormalProduction p = (NormalProduction)enumeration.nextElement(); + if (production_table.put(p.lhs, p) != null) { + JavaCCErrors.semantic_error(p, p.lhs + " occurs on the left hand side of more than one production."); + } +@@ -73,8 +73,8 @@ + * The following walks the entire parse tree to make sure that all + * non-terminals on RHS's are defined on the LHS. + */ +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- ExpansionTreeWalker.preOrderWalk(((NormalProduction)enum.nextElement()).expansion, new ProductionDefinedChecker()); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ ExpansionTreeWalker.preOrderWalk(((NormalProduction)enumeration.nextElement()).expansion, new ProductionDefinedChecker()); + } + + /* +@@ -87,8 +87,8 @@ + * is set to true. In this case, occurrences are OK, while + * regular expression specs generate a warning. + */ +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + for (java.util.Enumeration enum1 = respecs.elements(); enum1.hasMoreElements();) { + RegExprSpec res = (RegExprSpec)(enum1.nextElement()); +@@ -126,8 +126,8 @@ + * "named_tokens_table" and "ordered_named_tokens". + * Duplications are flagged as errors. + */ +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + for (java.util.Enumeration enum1 = respecs.elements(); enum1.hasMoreElements();) { + RegExprSpec res = (RegExprSpec)(enum1.nextElement()); +@@ -158,8 +158,8 @@ + */ + + tokenCount = 1; +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + if (tp.lexStates == null) { + tp.lexStates = new String[lexstate_I2S.size()]; +@@ -278,8 +278,8 @@ + + if (!Options.getUserTokenManager()) { + FixRJustNames frjn = new FixRJustNames(); +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + for (java.util.Enumeration enum1 = respecs.elements(); enum1.hasMoreElements();) { + RegExprSpec res = (RegExprSpec)(enum1.nextElement()); +@@ -306,8 +306,8 @@ + */ + + if (Options.getUserTokenManager()) { +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + for (java.util.Enumeration enum1 = respecs.elements(); enum1.hasMoreElements();) { + RegExprSpec res = (RegExprSpec)(enum1.nextElement()); +@@ -339,8 +339,8 @@ + * file. + */ + if (Options.getUserTokenManager()) { +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + for (java.util.Enumeration enum1 = respecs.elements(); enum1.hasMoreElements();) { + RegExprSpec res = (RegExprSpec)(enum1.nextElement()); +@@ -361,8 +361,8 @@ + boolean emptyUpdate = true; + while (emptyUpdate) { + emptyUpdate = false; +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- NormalProduction prod = (NormalProduction)enum.nextElement(); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ NormalProduction prod = (NormalProduction)enumeration.nextElement(); + if (emptyExpansionExists(prod.expansion)) { + if (!prod.emptyPossible) { + emptyUpdate = prod.emptyPossible = true; +@@ -375,15 +375,15 @@ + + // The following code checks that all ZeroOrMore, ZeroOrOne, and OneOrMore nodes + // do not contain expansions that can expand to the empty token list. +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- ExpansionTreeWalker.preOrderWalk(((NormalProduction)enum.nextElement()).expansion, new EmptyChecker()); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ ExpansionTreeWalker.preOrderWalk(((NormalProduction)enumeration.nextElement()).expansion, new EmptyChecker()); + } + + // The following code goes through the productions and adds pointers to other + // productions that it can expand to without consuming any tokens. Once this is + // done, a left-recursion check can be performed. +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- NormalProduction prod = (NormalProduction)enum.nextElement(); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ NormalProduction prod = (NormalProduction)enumeration.nextElement(); + addLeftMost(prod, prod.expansion); + } + +@@ -391,8 +391,8 @@ + // actual left recursions. The way the algorithm is coded, once a node has + // been determined to participate in a left recursive loop, it is not tried + // in any other loop. +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- NormalProduction prod = (NormalProduction)enum.nextElement(); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ NormalProduction prod = (NormalProduction)enumeration.nextElement(); + if (prod.walkStatus == 0) { + prodWalk(prod); + } +@@ -403,8 +403,8 @@ + // so we only need to do the equivalent of the above walk. + // This is not done if option USER_TOKEN_MANAGER is set to true. + if (!Options.getUserTokenManager()) { +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + for (java.util.Enumeration enum1 = respecs.elements(); enum1.hasMoreElements();) { + RegExprSpec res = (RegExprSpec)(enum1.nextElement()); +@@ -425,8 +425,8 @@ + * The following code performs the lookahead ambiguity checking. + */ + if (JavaCCErrors.get_error_count() == 0) { +- for (java.util.Enumeration enum = bnfproductions.elements(); enum.hasMoreElements();) { +- ExpansionTreeWalker.preOrderWalk(((NormalProduction)enum.nextElement()).expansion, new LookaheadChecker()); ++ for (java.util.Enumeration enumeration = bnfproductions.elements(); enumeration.hasMoreElements();) { ++ ExpansionTreeWalker.preOrderWalk(((NormalProduction)enumeration.nextElement()).expansion, new LookaheadChecker()); + } + } + +@@ -446,8 +446,8 @@ + if (rexp != null && !rexp.tpContext.ignoreCase) { + return false; + } +- for (java.util.Enumeration enum = table.elements(); enum.hasMoreElements();) { +- rexp = (RegularExpression)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = table.elements(); enumeration.hasMoreElements();) { ++ rexp = (RegularExpression)(enumeration.nextElement()); + if (rexp.tpContext.ignoreCase) { + other = rexp; + return true; +@@ -471,15 +471,15 @@ + } else if (exp instanceof Lookahead) { + return true; + } else if (exp instanceof Choice) { +- for (java.util.Enumeration enum = ((Choice)exp).choices.elements(); enum.hasMoreElements();) { +- if (emptyExpansionExists((Expansion)enum.nextElement())) { ++ for (java.util.Enumeration enumeration = ((Choice)exp).choices.elements(); enumeration.hasMoreElements();) { ++ if (emptyExpansionExists((Expansion)enumeration.nextElement())) { + return true; + } + } + return false; + } else if (exp instanceof Sequence) { +- for (java.util.Enumeration enum = ((Sequence)exp).units.elements(); enum.hasMoreElements();) { +- if (!emptyExpansionExists((Expansion)enum.nextElement())) { ++ for (java.util.Enumeration enumeration = ((Sequence)exp).units.elements(); enumeration.hasMoreElements();) { ++ if (!emptyExpansionExists((Expansion)enumeration.nextElement())) { + return false; + } + } +@@ -512,12 +512,12 @@ + } else if (exp instanceof ZeroOrOne) { + addLeftMost(prod, ((ZeroOrOne)exp).expansion); + } else if (exp instanceof Choice) { +- for (java.util.Enumeration enum = ((Choice)exp).choices.elements(); enum.hasMoreElements();) { +- addLeftMost(prod, (Expansion)enum.nextElement()); ++ for (java.util.Enumeration enumeration = ((Choice)exp).choices.elements(); enumeration.hasMoreElements();) { ++ addLeftMost(prod, (Expansion)enumeration.nextElement()); + } + } else if (exp instanceof Sequence) { +- for (java.util.Enumeration enum = ((Sequence)exp).units.elements(); enum.hasMoreElements();) { +- Expansion e = (Expansion)enum.nextElement(); ++ for (java.util.Enumeration enumeration = ((Sequence)exp).units.elements(); enumeration.hasMoreElements();) { ++ Expansion e = (Expansion)enumeration.nextElement(); + addLeftMost(prod, e); + if (!emptyExpansionExists(e)) { + break; +@@ -595,15 +595,15 @@ + } + } + } else if (rexp instanceof RChoice) { +- for (java.util.Enumeration enum = ((RChoice)rexp).choices.elements(); enum.hasMoreElements();) { +- if (rexpWalk((RegularExpression)enum.nextElement())) { ++ for (java.util.Enumeration enumeration = ((RChoice)rexp).choices.elements(); enumeration.hasMoreElements();) { ++ if (rexpWalk((RegularExpression)enumeration.nextElement())) { + return true; + } + } + return false; + } else if (rexp instanceof RSequence) { +- for (java.util.Enumeration enum = ((RSequence)rexp).units.elements(); enum.hasMoreElements();) { +- if (rexpWalk((RegularExpression)enum.nextElement())) { ++ for (java.util.Enumeration enumeration = ((RSequence)rexp).units.elements(); enumeration.hasMoreElements();) { ++ if (rexpWalk((RegularExpression)enumeration.nextElement())) { + return true; + } + } +--- a/src/org/javacc/parser/ParseGen.java ++++ b/src/org/javacc/parser/ParseGen.java +@@ -57,8 +57,8 @@ + + if (cu_to_insertion_point_1.size() != 0) { + printTokenSetup((Token)(cu_to_insertion_point_1.elementAt(0))); ccol = 1; +- for (Enumeration enum = cu_to_insertion_point_1.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (Enumeration enumeration = cu_to_insertion_point_1.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + if (t.kind == IMPLEMENTS) { + implementsExists = true; + } else if (t.kind == CLASS) { +@@ -75,8 +75,8 @@ + ostr.print(cu_name + "Constants "); + if (cu_to_insertion_point_2.size() != 0) { + printTokenSetup((Token)(cu_to_insertion_point_2.elementAt(0))); +- for (Enumeration enum = cu_to_insertion_point_2.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (Enumeration enumeration = cu_to_insertion_point_2.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + printToken(t, ostr); + } + } +@@ -124,8 +124,8 @@ + for (int i = 0; i < tokenMaskSize; i++) { + ostr.println(" private static void jj_la1_" + i + "() {"); + ostr.print(" jj_la1_" + i + " = new int[] {"); +- for (Enumeration enum = maskVals.elements(); enum.hasMoreElements();) { +- int[] tokenMask = (int[])(enum.nextElement()); ++ for (Enumeration enumeration = maskVals.elements(); enumeration.hasMoreElements();) { ++ int[] tokenMask = (int[])(enumeration.nextElement()); + ostr.print("0x" + Integer.toHexString(tokenMask[i]) + ","); + } + ostr.println("};"); +@@ -685,8 +685,8 @@ + + if (cu_from_insertion_point_2.size() != 0) { + printTokenSetup((Token)(cu_from_insertion_point_2.elementAt(0))); ccol = 1; +- for (Enumeration enum = cu_from_insertion_point_2.elements(); enum.hasMoreElements();) { +- t = (Token)enum.nextElement(); ++ for (Enumeration enumeration = cu_from_insertion_point_2.elements(); enumeration.hasMoreElements();) { ++ t = (Token)enumeration.nextElement(); + printToken(t, ostr); + } + printTrailingComments(t, ostr); +--- a/src/org/javacc/parser/ExpansionTreeWalker.java ++++ b/src/org/javacc/parser/ExpansionTreeWalker.java +@@ -37,12 +37,12 @@ + opObj.action(node); + if (opObj.goDeeper(node)) { + if (node instanceof Choice) { +- for (java.util.Enumeration enum = ((Choice)node).choices.elements(); enum.hasMoreElements();) { +- preOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((Choice)node).choices.elements(); enumeration.hasMoreElements();) { ++ preOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof Sequence) { +- for (java.util.Enumeration enum = ((Sequence)node).units.elements(); enum.hasMoreElements();) { +- preOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((Sequence)node).units.elements(); enumeration.hasMoreElements();) { ++ preOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof OneOrMore) { + preOrderWalk(((OneOrMore)node).expansion, opObj); +@@ -58,12 +58,12 @@ + } else if (node instanceof TryBlock) { + preOrderWalk(((TryBlock)node).exp, opObj); + } else if (node instanceof RChoice) { +- for (java.util.Enumeration enum = ((RChoice)node).choices.elements(); enum.hasMoreElements();) { +- preOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((RChoice)node).choices.elements(); enumeration.hasMoreElements();) { ++ preOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof RSequence) { +- for (java.util.Enumeration enum = ((RSequence)node).units.elements(); enum.hasMoreElements();) { +- preOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((RSequence)node).units.elements(); enumeration.hasMoreElements();) { ++ preOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof ROneOrMore) { + preOrderWalk(((ROneOrMore)node).regexpr, opObj); +@@ -85,12 +85,12 @@ + static void postOrderWalk(Expansion node, TreeWalkerOp opObj) { + if (opObj.goDeeper(node)) { + if (node instanceof Choice) { +- for (java.util.Enumeration enum = ((Choice)node).choices.elements(); enum.hasMoreElements();) { +- postOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((Choice)node).choices.elements(); enumeration.hasMoreElements();) { ++ postOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof Sequence) { +- for (java.util.Enumeration enum = ((Sequence)node).units.elements(); enum.hasMoreElements();) { +- postOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((Sequence)node).units.elements(); enumeration.hasMoreElements();) { ++ postOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof OneOrMore) { + postOrderWalk(((OneOrMore)node).expansion, opObj); +@@ -106,12 +106,12 @@ + } else if (node instanceof TryBlock) { + postOrderWalk(((TryBlock)node).exp, opObj); + } else if (node instanceof RChoice) { +- for (java.util.Enumeration enum = ((RChoice)node).choices.elements(); enum.hasMoreElements();) { +- postOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((RChoice)node).choices.elements(); enumeration.hasMoreElements();) { ++ postOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof RSequence) { +- for (java.util.Enumeration enum = ((RSequence)node).units.elements(); enum.hasMoreElements();) { +- postOrderWalk((Expansion)enum.nextElement(), opObj); ++ for (java.util.Enumeration enumeration = ((RSequence)node).units.elements(); enumeration.hasMoreElements();) { ++ postOrderWalk((Expansion)enumeration.nextElement(), opObj); + } + } else if (node instanceof ROneOrMore) { + postOrderWalk(((ROneOrMore)node).regexpr, opObj); +--- a/src/org/javacc/jjdoc/JJDoc.java ++++ b/src/org/javacc/jjdoc/JJDoc.java +@@ -94,8 +94,8 @@ + + private static void emitTokenProductions(Generator gen, Vector prods) { + // gen.tokensStart(); +- for (Enumeration enum = prods.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)enum.nextElement(); ++ for (Enumeration enumeration = prods.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)enumeration.nextElement(); + // emitTopLevelSpecialTokens(ostr, tp.firstToken); + + // if (tp.isExplicit) { +@@ -139,8 +139,8 @@ + + private static void emitNormalProductions(Generator gen, Vector prods) { + gen.nonterminalsStart(); +- for (Enumeration enum = prods.elements(); enum.hasMoreElements();) { +- NormalProduction np = (NormalProduction)enum.nextElement(); ++ for (Enumeration enumeration = prods.elements(); enumeration.hasMoreElements();) { ++ NormalProduction np = (NormalProduction)enumeration.nextElement(); + + emitTopLevelSpecialTokens(np.firstToken, gen); + +@@ -204,11 +204,11 @@ + } + + private static void emitExpansionChoice(Choice c, Generator gen) { +- for (java.util.Enumeration enum = c.choices.elements(); +- enum.hasMoreElements();) { +- Expansion e = (Expansion)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = c.choices.elements(); ++ enumeration.hasMoreElements();) { ++ Expansion e = (Expansion)(enumeration.nextElement()); + emitExpansionTree(e, gen); +- if (enum.hasMoreElements()) { ++ if (enumeration.hasMoreElements()) { + gen.text(" | "); + } + } +@@ -238,9 +238,9 @@ + + private static void emitExpansionSequence(Sequence s, Generator gen) { + boolean firstUnit = true; +- for (java.util.Enumeration enum = s.units.elements(); +- enum.hasMoreElements();) { +- Expansion e = (Expansion)enum.nextElement(); ++ for (java.util.Enumeration enumeration = s.units.elements(); ++ enumeration.hasMoreElements();) { ++ Expansion e = (Expansion)enumeration.nextElement(); + + if (e instanceof Lookahead || e instanceof Action) { + continue; +@@ -316,9 +316,9 @@ + gen.text("~"); + } + gen.text("["); +- for (java.util.Enumeration enum = cl.descriptors.elements(); +- enum.hasMoreElements();) { +- Object o = enum.nextElement(); ++ for (java.util.Enumeration enumeration = cl.descriptors.elements(); ++ enumeration.hasMoreElements();) { ++ Object o = enumeration.nextElement(); + if (o instanceof SingleCharacter) { + gen.text("\""); + char s[] = { ((SingleCharacter)o).ch }; +@@ -335,7 +335,7 @@ + } else { + System.out.println("Oops: unknown character list element type."); + } +- if (enum.hasMoreElements()) { ++ if (enumeration.hasMoreElements()) { + gen.text(","); + } + } +@@ -343,11 +343,11 @@ + + } else if (re instanceof RChoice) { + RChoice c = (RChoice)re; +- for (java.util.Enumeration enum = c.choices.elements(); +- enum.hasMoreElements();) { +- RegularExpression sub = (RegularExpression)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = c.choices.elements(); ++ enumeration.hasMoreElements();) { ++ RegularExpression sub = (RegularExpression)(enumeration.nextElement()); + emitRE(sub, gen); +- if (enum.hasMoreElements()) { ++ if (enumeration.hasMoreElements()) { + gen.text(" | "); + } + } +@@ -367,9 +367,9 @@ + + } else if (re instanceof RSequence) { + RSequence s = (RSequence)re; +- for (java.util.Enumeration enum = s.units.elements(); +- enum.hasMoreElements();) { +- RegularExpression sub = (RegularExpression)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = s.units.elements(); ++ enumeration.hasMoreElements();) { ++ RegularExpression sub = (RegularExpression)(enumeration.nextElement()); + boolean needParens = false; + if (sub instanceof RChoice) { + needParens = true; +@@ -381,7 +381,7 @@ + if (needParens) { + gen.text(")"); + } +- if (enum.hasMoreElements()) { ++ if (enumeration.hasMoreElements()) { + gen.text(" "); + } + } +@@ -415,8 +415,8 @@ + private static String v2s(Vector v, boolean newLine) { + String s = ""; + boolean firstToken = true; +- for (Enumeration enum = v.elements(); enum.hasMoreElements();) { +- Token tok = (Token)enum.nextElement(); ++ for (Enumeration enumeration = v.elements(); enumeration.hasMoreElements();) { ++ Token tok = (Token)enumeration.nextElement(); + Token stok = getPrecedingSpecialToken(tok); + + if (firstToken) { +--- a/src/org/javacc/parser/OtherFilesGen.java ++++ b/src/org/javacc/parser/OtherFilesGen.java +@@ -86,8 +86,8 @@ + ostr.println(""); + RegularExpression re; + ostr.println(" int EOF = 0;"); +- for (java.util.Enumeration enum = ordered_named_tokens.elements(); enum.hasMoreElements();) { +- re = (RegularExpression)enum.nextElement(); ++ for (java.util.Enumeration enumeration = ordered_named_tokens.elements(); enumeration.hasMoreElements();) { ++ re = (RegularExpression)enumeration.nextElement(); + ostr.println(" int " + re.label + " = " + re.ordinal + ";"); + } + ostr.println(""); +@@ -100,8 +100,8 @@ + ostr.println(" String[] tokenImage = {"); + ostr.println(" \"\","); + +- for (java.util.Enumeration enum = rexprlist.elements(); enum.hasMoreElements();) { +- TokenProduction tp = (TokenProduction)(enum.nextElement()); ++ for (java.util.Enumeration enumeration = rexprlist.elements(); enumeration.hasMoreElements();) { ++ TokenProduction tp = (TokenProduction)(enumeration.nextElement()); + java.util.Vector respecs = tp.respecs; + for (java.util.Enumeration enum1 = respecs.elements(); enum1.hasMoreElements();) { + RegExprSpec res = (RegExprSpec)(enum1.nextElement()); +--- a/examples/Obfuscator/Main.java ++++ b/examples/Obfuscator/Main.java +@@ -97,8 +97,8 @@ + System.out.println("Could not create file map.log"); + throw new Error(); + } +- for (Enumeration enum = mappings.keys(); enum.hasMoreElements();) { +- String from = (String)enum.nextElement(); ++ for (Enumeration enumeration = mappings.keys(); enumeration.hasMoreElements();) { ++ String from = (String)enumeration.nextElement(); + String to = (String)mappings.get(from); + mstr.println(from + " -> " + to + ";"); + } diff -Nru javacc4-4.0/debian/patches/series javacc4-4.0/debian/patches/series --- javacc4-4.0/debian/patches/series 2016-11-18 15:34:08.000000000 +0000 +++ javacc4-4.0/debian/patches/series 2018-04-06 10:37:36.000000000 +0000 @@ -1,2 +1,4 @@ executables.patch javacctarget.patch +java5-compatibility.patch +source-encoding.patch diff -Nru javacc4-4.0/debian/patches/source-encoding.patch javacc4-4.0/debian/patches/source-encoding.patch --- javacc4-4.0/debian/patches/source-encoding.patch 1970-01-01 00:00:00.000000000 +0000 +++ javacc4-4.0/debian/patches/source-encoding.patch 2018-04-06 10:37:36.000000000 +0000 @@ -0,0 +1,130 @@ +Description: Set the source encoding to fix the build failure with recent JDKs +Author: Emmanuel Bourg +Forwarded: no +--- a/src/org/javacc/parser/build.xml ++++ b/src/org/javacc/parser/build.xml +@@ -47,6 +47,7 @@ + debug="${build.compiler.debug}" + source="1.4" + target="1.4" ++ encoding="ISO-8859-1" + classpath="${javacc.root}/classes:${junit.jar}"> + + +--- a/build.xml ++++ b/build.xml +@@ -183,7 +183,7 @@ + + + +- ++ + + + +@@ -194,7 +194,7 @@ + + + +- ++ + + + +@@ -205,7 +205,7 @@ + + + +- ++ + + + +@@ -219,7 +219,7 @@ + + + +- ++ + + + +@@ -235,7 +235,7 @@ + + + +- ++ + + + +@@ -251,7 +251,7 @@ + + + +- ++ + + + +@@ -267,7 +267,7 @@ + + + +- ++ + + + +@@ -281,13 +281,13 @@ + + + +- ++ + + + + + +- ++ + + + +@@ -300,7 +300,7 @@ + + + +- ++ + + + +@@ -317,7 +317,7 @@ + + + +- ++ + + + +@@ -333,7 +333,7 @@ + + + +- ++ + + + +@@ -347,7 +347,7 @@ + + + +- ++ + + + diff -Nru javacc4-4.0/debian/rules javacc4-4.0/debian/rules --- javacc4-4.0/debian/rules 2016-11-18 15:34:41.000000000 +0000 +++ javacc4-4.0/debian/rules 2018-04-06 10:36:19.000000000 +0000 @@ -28,6 +28,3 @@ override_dh_auto_clean: dh_auto_build -- realclean - -get-orig-source: - uscan --download-current-version --force-download --rename --repack --compression xz diff -Nru javacc4-4.0/debian/watch javacc4-4.0/debian/watch --- javacc4-4.0/debian/watch 2016-11-18 15:34:08.000000000 +0000 +++ javacc4-4.0/debian/watch 2018-04-06 10:36:33.000000000 +0000 @@ -1,3 +1,3 @@ version=4 -opts="mode=git, uversionmangle=s/(\d)(\d)/$1.$2/g" \ +opts="mode=git, repack, compression=xz, uversionmangle=s/(\d)(\d)/$1.$2/g" \ https://github.com/javacc/javacc .*/release_(40)