Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package java-cup for openSUSE:Factory 
checked in at 2022-01-15 21:45:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/java-cup (Old)
 and      /work/SRC/openSUSE:Factory/.java-cup.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "java-cup"

Sat Jan 15 21:45:07 2022 rev:20 rq:946328 version:0.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/java-cup/java-cup-bootstrap.changes      
2019-02-06 15:46:45.419283221 +0100
+++ /work/SRC/openSUSE:Factory/.java-cup.new.1892/java-cup-bootstrap.changes    
2022-01-15 21:45:11.081613609 +0100
@@ -1,0 +2,19 @@
+Fri Jan 14 06:59:22 UTC 2022 - Fridrich Strba <[email protected]>
+
+- Upgrade to recent git checkout providing 0.11 beta
+- Modified patches:
+  * java-cup-classpath.patch
+  * java-cup-no-classpath-in-manifest.patch
+  * java-cup-no-cup-no-jflex.patch
+    + rediff to the changed context
+- Removed patch:
+  * java-cup-lr_parser-constructor.patch
+    + integrated upstream
+- Added patch:
+  * java-cup-java8.patch
+    + replace java 10+ constructs in order to be able to build
+      with java 8
+- Fetch sources using source service
+- Do not run git during the build
+
+-------------------------------------------------------------------
java-cup.changes: same change

Old:
----
  develop.tar.bz2
  java-cup-generated-files.tar.bz2
  java-cup-lr_parser-constructor.patch
  java-cup.license
  java-cup.script

New:
----
  _service
  java-cup-d69c832.tar.xz
  java-cup-generated-files.tar.xz
  java-cup-java8.patch
  java-cup-nogit.patch.in

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ java-cup-bootstrap.spec ++++++
--- /var/tmp/diff_new_pack.DRujva/_old  2022-01-15 21:45:11.849614015 +0100
+++ /var/tmp/diff_new_pack.DRujva/_new  2022-01-15 21:45:11.853614018 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package java-cup-bootstrap
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,8 +18,10 @@
 
 ##### WARNING: please do not edit this auto generated spec file. Use the 
java-cup.spec! #####
 %global with_bootstrap 1
-%define cvs_version        11a
+%define cvs_version        11b
 %define real_name   java-cup
+%define git_hash d69c832
+%define git_date 20210814
 %bcond_with                bootstrap
 Name:           java-cup-bootstrap
 Version:        0.11
@@ -27,32 +29,30 @@
 Summary:        LALR Parser Generator in Java
 License:        HPND
 Group:          Development/Libraries/Java
-Url:            http://www2.cs.tum.edu/projects/cup/
-# https://www2.in.tum.de/WebSVN/dl.php?repname=CUP&path=/develop/&rev=0&isdir=1
-Source0:        develop.tar.bz2
-Source1:        java-cup.script
-Source2:        java-cup-generated-files.tar.bz2
-# From          http://www2.cs.tum.edu/projects/cup/
-Source3:        java-cup.license
-Patch1:         java-cup-no-classpath-in-manifest.patch
+URL:            http://www2.cs.tum.edu/projects/cup/
+Source0:        %{real_name}-%{git_hash}.tar.xz
+Source1:        %{real_name}-generated-files.tar.xz
+Source100:      java-cup-nogit.patch.in
+Patch0:         java-cup-no-classpath-in-manifest.patch
+Patch1:         java-cup-java8.patch
 Patch2:         java-cup-no-cup-no-jflex.patch
 Patch3:         java-cup-classpath.patch
-# Missing symbolFactory initialization in lr_parser, causes sinjdoc to crash
-Patch4:         java-cup-lr_parser-constructor.patch
 BuildRequires:  ant
 BuildRequires:  java-devel
+BuildRequires:  javapackages-tools
 BuildRequires:  xml-commons-apis-bootstrap
 BuildRequires:  xml-commons-resolver-bootstrap
-#!BuildIgnore:  xml-commons-apis xml-commons-resolver xalan-j2 xerces-j2
+#!BuildIgnore:  xalan-j2
+#!BuildIgnore:  xerces-j2
+#!BuildIgnore:  xml-commons-apis
+#!BuildIgnore:  xml-commons-resolver
 Obsoletes:      java_cup < %{version}-%{release}
 Provides:       java_cup = %{version}-%{release}
 BuildArch:      noarch
-%if %without bootstrap
+%if %{without bootstrap}
 BuildRequires:  java-cup-bootstrap
-BuildRequires:  jflex
-%endif
-# bootstrap variant is just stripped down java-cup, so it conflicts
-%if %without bootstrap
+BuildRequires:  javapackages-local
+BuildRequires:  jflex-bootstrap
 Conflicts:      java-cup-bootstrap
 %else
 Conflicts:      java-cup
@@ -70,7 +70,7 @@
 
 * have Your own symbol classes
 
-%if %without bootstrap
+%if %{without bootstrap}
 %package manual
 Summary:        LALR Parser Generator in Java
 Group:          Development/Libraries/Java
@@ -92,22 +92,21 @@
 %endif
 
 %prep
-%setup -q -n develop
+%setup -q -n %{real_name}-%{git_hash}
+cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 
's#@GIT_DATE@#%{git_date}#g' | patch -p1 -u -l
+%patch0 -p1
 %patch1 -p1
-%if %with bootstrap
-%setup -q -T -D -a 2 -n develop
+%if %{with bootstrap}
+%setup -q -T -D -a 1 -n %{real_name}-%{git_hash}
 %patch2 -p1
 %else
-%{_bindir}/find . -name '*.jar' | %{_bindir}/xargs rm
 %patch3 -p1
 %endif
-%patch4 -p1
-perl -pi -e 's/1\.2/1.6/g' build.xml
-mkdir -p classes dist
-cp %{SOURCE3} license.txt
+find . -name '*.jar' -print -delete
+mkdir -p target/classes
 
 %build
-%if %with bootstrap
+%if %{with bootstrap}
 export CLASSPATH=
 %else
 export CLASSPATH=$(build-classpath java-cup jflex)
@@ -118,19 +117,34 @@
 %install
 # jar
 mkdir -p %{buildroot}%{_javadir}
-cp -a dist/%{real_name}-%{cvs_version}.jar 
%{buildroot}%{_javadir}/%{real_name}-%{version}.jar
-cp -a dist/%{real_name}-%{cvs_version}-runtime.jar 
%{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
-(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -s ${jar} 
${jar/-%{version}/}; done)
+cp -a target/dist/%{real_name}-%{cvs_version}.jar 
%{buildroot}%{_javadir}/%{real_name}.jar
+cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar 
%{buildroot}%{_javadir}/%{real_name}-runtime.jar
+
+%if %{without bootstrap}
+# maven data
+%add_maven_depmap com.github.vbmacher:%{real_name}:%{cvs_version}-%{git_date} 
%{real_name}.jar
+%add_maven_depmap 
com.github.vbmacher:%{real_name}-runtime:%{cvs_version}-%{git_date} 
%{real_name}-runtime.jar
+%endif
+
 # compatibility symlinks
 (cd %{buildroot}%{_javadir} && ln -s %{real_name}.jar java_cup.jar && ln -s 
%{real_name}-runtime.jar java_cup-runtime.jar)
 mkdir -p %{buildroot}%{_bindir}
-install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
 
+%jpackage_script java_cup.Main "" "" %{real_name}:%{real_name}-runtime 
%{real_name} true
+
+%if %{with bootstrap}
 %files
-%doc changelog.txt license.txt
+%{_javadir}/%{real_name}*.jar
+%else
+
+%files -f .mfiles
+%endif
+%license licence.txt
+%doc changelog.txt
 %attr(0755,root,root) %{_bindir}/%{real_name}
-%{_javadir}/*
-%if %without bootstrap
+%{_javadir}/java_cup*.jar
+
+%if %{without bootstrap}
 %files manual
 %doc manual.html
 

++++++ java-cup.spec ++++++
--- /var/tmp/diff_new_pack.DRujva/_old  2022-01-15 21:45:11.885614034 +0100
+++ /var/tmp/diff_new_pack.DRujva/_new  2022-01-15 21:45:11.893614039 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package java-cup
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,8 +17,10 @@
 
 
 %global _without_bootstrap 1
-%define cvs_version        11a
+%define cvs_version        11b
 %define real_name   java-cup
+%define git_hash d69c832
+%define git_date 20210814
 %bcond_with                bootstrap
 Name:           java-cup
 Version:        0.11
@@ -26,32 +28,30 @@
 Summary:        LALR Parser Generator in Java
 License:        HPND
 Group:          Development/Libraries/Java
-Url:            http://www2.cs.tum.edu/projects/cup/
-# https://www2.in.tum.de/WebSVN/dl.php?repname=CUP&path=/develop/&rev=0&isdir=1
-Source0:        develop.tar.bz2
-Source1:        java-cup.script
-Source2:        java-cup-generated-files.tar.bz2
-# From          http://www2.cs.tum.edu/projects/cup/
-Source3:        java-cup.license
-Patch1:         java-cup-no-classpath-in-manifest.patch
+URL:            http://www2.cs.tum.edu/projects/cup/
+Source0:        %{real_name}-%{git_hash}.tar.xz
+Source1:        %{real_name}-generated-files.tar.xz
+Source100:      java-cup-nogit.patch.in
+Patch0:         java-cup-no-classpath-in-manifest.patch
+Patch1:         java-cup-java8.patch
 Patch2:         java-cup-no-cup-no-jflex.patch
 Patch3:         java-cup-classpath.patch
-# Missing symbolFactory initialization in lr_parser, causes sinjdoc to crash
-Patch4:         java-cup-lr_parser-constructor.patch
 BuildRequires:  ant
 BuildRequires:  java-devel
+BuildRequires:  javapackages-tools
 BuildRequires:  xml-commons-apis-bootstrap
 BuildRequires:  xml-commons-resolver-bootstrap
-#!BuildIgnore:  xml-commons-apis xml-commons-resolver xalan-j2 xerces-j2
+#!BuildIgnore:  xalan-j2
+#!BuildIgnore:  xerces-j2
+#!BuildIgnore:  xml-commons-apis
+#!BuildIgnore:  xml-commons-resolver
 Obsoletes:      java_cup < %{version}-%{release}
 Provides:       java_cup = %{version}-%{release}
 BuildArch:      noarch
-%if %without bootstrap
+%if %{without bootstrap}
 BuildRequires:  java-cup-bootstrap
-BuildRequires:  jflex
-%endif
-# bootstrap variant is just stripped down java-cup, so it conflicts
-%if %without bootstrap
+BuildRequires:  javapackages-local
+BuildRequires:  jflex-bootstrap
 Conflicts:      java-cup-bootstrap
 %else
 Conflicts:      java-cup
@@ -69,7 +69,7 @@
 
 * have Your own symbol classes
 
-%if %without bootstrap
+%if %{without bootstrap}
 %package manual
 Summary:        LALR Parser Generator in Java
 Group:          Development/Libraries/Java
@@ -91,22 +91,21 @@
 %endif
 
 %prep
-%setup -q -n develop
+%setup -q -n %{real_name}-%{git_hash}
+cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 
's#@GIT_DATE@#%{git_date}#g' | patch -p1 -u -l
+%patch0 -p1
 %patch1 -p1
-%if %with bootstrap
-%setup -q -T -D -a 2 -n develop
+%if %{with bootstrap}
+%setup -q -T -D -a 1 -n %{real_name}-%{git_hash}
 %patch2 -p1
 %else
-%{_bindir}/find . -name '*.jar' | %{_bindir}/xargs rm
 %patch3 -p1
 %endif
-%patch4 -p1
-perl -pi -e 's/1\.2/1.6/g' build.xml
-mkdir -p classes dist
-cp %{SOURCE3} license.txt
+find . -name '*.jar' -print -delete
+mkdir -p target/classes
 
 %build
-%if %with bootstrap
+%if %{with bootstrap}
 export CLASSPATH=
 %else
 export CLASSPATH=$(build-classpath java-cup jflex)
@@ -117,19 +116,34 @@
 %install
 # jar
 mkdir -p %{buildroot}%{_javadir}
-cp -a dist/%{real_name}-%{cvs_version}.jar 
%{buildroot}%{_javadir}/%{real_name}-%{version}.jar
-cp -a dist/%{real_name}-%{cvs_version}-runtime.jar 
%{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
-(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -s ${jar} 
${jar/-%{version}/}; done)
+cp -a target/dist/%{real_name}-%{cvs_version}.jar 
%{buildroot}%{_javadir}/%{real_name}.jar
+cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar 
%{buildroot}%{_javadir}/%{real_name}-runtime.jar
+
+%if %{without bootstrap}
+# maven data
+%add_maven_depmap com.github.vbmacher:%{real_name}:%{cvs_version}-%{git_date} 
%{real_name}.jar
+%add_maven_depmap 
com.github.vbmacher:%{real_name}-runtime:%{cvs_version}-%{git_date} 
%{real_name}-runtime.jar
+%endif
+
 # compatibility symlinks
 (cd %{buildroot}%{_javadir} && ln -s %{real_name}.jar java_cup.jar && ln -s 
%{real_name}-runtime.jar java_cup-runtime.jar)
 mkdir -p %{buildroot}%{_bindir}
-install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
 
+%jpackage_script java_cup.Main "" "" %{real_name}:%{real_name}-runtime 
%{real_name} true
+
+%if %{with bootstrap}
 %files
-%doc changelog.txt license.txt
+%{_javadir}/%{real_name}*.jar
+%else
+
+%files -f .mfiles
+%endif
+%license licence.txt
+%doc changelog.txt
 %attr(0755,root,root) %{_bindir}/%{real_name}
-%{_javadir}/*
-%if %without bootstrap
+%{_javadir}/java_cup*.jar
+
+%if %{without bootstrap}
 %files manual
 %doc manual.html
 

++++++ _service ++++++
<services>
        <service name="tar_scm" mode="disabled">
                <param name="scm">git</param>
                <param 
name="url">https://versioncontrolseidl.in.tum.de/parsergenerators/cup.git</param>
                <param 
name="revision">d69c8321fab81759df10e2d74087a9514b5b56da</param>
                <param name="versionformat">%h</param>
                <param name="filename">java-cup</param>
        </service>
        <service name="recompress" mode="disabled">
                <param name="file">*.tar</param>
                <param name="compression">xz</param>
        </service>
</services>

++++++ java-cup-classpath.patch ++++++
--- /var/tmp/diff_new_pack.DRujva/_old  2022-01-15 21:45:11.933614060 +0100
+++ /var/tmp/diff_new_pack.DRujva/_new  2022-01-15 21:45:11.937614062 +0100
@@ -7,7 +7,7 @@
 -  <taskdef name="cup" classname="java_cup.anttask.CUPTask" 
classpath="${bin}/java-cup-11.jar" />
 -  <taskdef name="jflex" classname="JFlex.anttask.JFlexTask" 
classpath="${bin}/JFlex.jar" />
 +  <taskdef name="cup" classname="java_cup.anttask.CUPTask" 
classpath="/usr/share/java/java_cup.jar" />
-+  <taskdef name="jflex" classname="JFlex.anttask.JFlexTask" 
classpath="/usr/share/java/jflex.jar" />
++  <taskdef name="jflex" classname="jflex.anttask.JFlexTask" 
classpath="/usr/share/java/jflex.jar" />
  
    <target name="cup" depends="init">
      <cup srcfile="${cup}/parser.cup" interface="on" destdir="${java}" 
parser="parser" symbols="sym" quiet="false" nonterms="true"/>

++++++ java-cup-java8.patch ++++++
--- a/build.xml
+++ b/build.xml
@@ -56,7 +56,7 @@
   </target>
 
   <target name="compile" depends="jflex">
-    <javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" 
debug="on" source="10" target="10">
+    <javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" 
debug="on" source="1.8" target="1.8">
       <classpath refid="libraries"/>
       <compilerarg value="-Xlint:unchecked" />
       <compilerarg value="-Xdiags:verbose" />
--- a/src/java/java_cup/Main.java
+++ b/src/java/java_cup/Main.java
@@ -527,7 +527,7 @@ public class Main {
   protected static void check_unused() {
 
     /* check for unused terminals */
-    for (var term : terminal.all()) {
+    for (terminal term : terminal.all()) {
       /* don't issue a message for EOF */
       if (term == terminal.EOF)
         continue;
@@ -547,7 +547,7 @@ public class Main {
     }
 
     /* check for unused non terminals */
-    for (var nt:non_terminal.all()){
+    for (non_terminal nt:non_terminal.all()){
       /* is this one unused */
       if (nt.use_count() == 0) {
         /* count and warn if we are doing warnings */
@@ -613,7 +613,7 @@ public class Main {
       System.err.println("  Filling in tables...");
     action_table = new parse_action_table();
     reduce_table = new parse_reduce_table();
-    for (var lst:lalr_state.all_states()){
+    for (lalr_state lst:lalr_state.all_states()){
       lst.build_table_entries(action_table, reduce_table);
     }
 
@@ -846,7 +846,7 @@ public class Main {
     lalr_state ordered[] = new lalr_state[lalr_state.number()];
 
     /* put the states in sorted order for a nicer display */
-    for (var st : lalr_state.all_states()){
+    for (lalr_state st : lalr_state.all_states()){
       ordered[st.index()] = st;
     }
 
--- a/src/java/java_cup/emit.java
+++ b/src/java/java_cup/emit.java
@@ -624,14 +624,14 @@ public class emit {
 
     /* collect up the productions in order */
     all_prods = new production[production.number()];
-    for (var prod:production.all()){
+    for (production prod:production.all()){
       all_prods[prod.index()] = prod;
     }
 
     // make short[][]
     short[][] prod_table = new short[production.number()][2];
     for (int i = 0; i < production.number(); i++) {
-      var prod = all_prods[i];
+      production prod = all_prods[i];
       // { lhs symbol , rhs size }
       prod_table[i][0] = (short) prod.lhs().the_symbol().index();
       prod_table[i][1] = (short) prod.rhs_length();
@@ -818,12 +818,12 @@ public class emit {
     nchar = do_newline(out, nchar, nbytes);
     nbytes += do_escaped(out, (char) (sa.length & 0xFFFF));
     nchar = do_newline(out, nchar, nbytes);
-    for (var element:sa) {
+    for (short[] element:sa) {
       nbytes += do_escaped(out, (char) (element.length >> 16));
       nchar = do_newline(out, nchar, nbytes);
       nbytes += do_escaped(out, (char) (element.length & 0xFFFF));
       nchar = do_newline(out, nchar, nbytes);
-      for (var element2 : element) {
+      for (short element2 : element) {
         // contents of string are (value+2) to allow for common -1, 0 cases
         // (UTF-8 encoding is most efficient for 0<c<0x80)
         nbytes += do_escaped(out, (char) (2 + element2));
--- a/src/java/java_cup/lalr_item_set.java
+++ b/src/java/java_cup/lalr_item_set.java
@@ -206,7 +206,7 @@ public class lalr_item_set implements Iterable<lalr_item> {
   public lalr_item get_one() throws internal_error {
     if (_all.values().size() == 0)
       return null;
-    var result = iterator().next();
+    lalr_item result = iterator().next();
     remove(result);
     return result;
   }
@@ -255,30 +255,30 @@ public class lalr_item_set implements Iterable<lalr_item> 
{
     hashcode_cache = null;
 
     /* each current element needs to be considered */
-    var consider = new lalr_item_set(this);
+    lalr_item_set consider = new lalr_item_set(this);
 
     /* repeat this until there is nothing else to consider */
     while (consider.size() > 0) {
       /* get one item to consider */
-      var itm = consider.get_one();
+      lalr_item itm = consider.get_one();
 
       /* do we have a dot before a non terminal */
-      var nt = itm.dot_before_nt();
+      non_terminal nt = itm.dot_before_nt();
       if (nt != null) {
         /* create the lookahead set based on first after dot */
-        var new_lookaheads = itm.calc_lookahead(itm.lookahead());
+        terminal_set new_lookaheads = itm.calc_lookahead(itm.lookahead());
 
         /* are we going to need to propagate our lookahead to new item */
-        var need_prop = itm.lookahead_visible();
+        boolean need_prop = itm.lookahead_visible();
 
         /* create items for each production of that non term */
-        for (var prod : nt.productions()) {
+        for (production prod : nt.productions()) {
 
           /* create new item with dot at start and that lookahead */
-          var new_itm = new lalr_item(prod, new terminal_set(new_lookaheads));
+          lalr_item new_itm = new lalr_item(prod, new 
terminal_set(new_lookaheads));
 
           /* add/merge item into the set */
-          var add_itm = add(new_itm);
+          lalr_item add_itm = add(new_itm);
           /* if propagation is needed link to that item */
           if (need_prop)
             itm.add_propagate(add_itm);
@@ -335,7 +335,7 @@ public class lalr_item_set implements Iterable<lalr_item> {
       // CSA fix! we'd *like* to hash just a few elements, but
       // that means equal sets will have inequal hashcodes, which
       // we're not allowed (by contract) to do. So hash them all.
-      for (var e : this)
+      for (lalr_item e : this)
         result ^= e.hashCode();
 
       hashcode_cache = Integer.valueOf(result);
@@ -352,7 +352,7 @@ public class lalr_item_set implements Iterable<lalr_item> {
     StringBuilder result = new StringBuilder();
 
     result.append("{\n");
-    for (var e : this)
+    for (lalr_item e : this)
       result.append("  " + e + "\n");
 
     result.append("}");
--- a/src/java/java_cup/lalr_state.java
+++ b/src/java/java_cup/lalr_state.java
@@ -187,14 +187,14 @@ public class lalr_state {
     }
 
     System.out.println("lalr_state [" + st.index() + "] {");
-    for (var itm : st.items()) {
+    for (lalr_item itm : st.items()) {
       System.out.print("  [");
       System.out.print(itm.the_production().lhs().the_symbol().name());
       System.out.print(" ::= ");
       for (int i = 0; i < itm.the_production().rhs_length(); i++) {
         if (i == itm.dot_pos())
           System.out.print("\u00B7 ");
-        var part = itm.the_production().rhs(i);
+        production_part part = itm.the_production().rhs(i);
         if (part.is_action())
           System.out.print("{action} ");
         else
@@ -219,7 +219,7 @@ public class lalr_state {
    */
   protected static void propagate_all_lookaheads() throws internal_error {
     /* iterate across all states */
-    for (var st : all_states())
+    for (lalr_state st : all_states())
       st.propagate_lookaheads();
   }
 
@@ -298,7 +298,7 @@ public class lalr_state {
     /* build item with dot at front of start production and EOF lookahead */
     start_items = new lalr_item_set();
 
-    var start_itm = new lalr_item(start_prod);
+    lalr_item start_itm = new lalr_item(start_prod);
     start_itm.lookahead().add(terminal.EOF);
 
     start_items.add(start_itm);
@@ -319,29 +319,29 @@ public class lalr_state {
     /* continue looking at new states until we have no more work to do */
     while (!work_stack.empty()) {
       /* remove a state from the work set */
-      var st = work_stack.pop();
+      lalr_state st = work_stack.pop();
 
       /* gather up all the symbols that appear before dots */
-      var outgoing = new symbol_set();
-      for (var itm : st.items()) {
+      symbol_set outgoing = new symbol_set();
+      for (lalr_item itm : st.items()) {
         /* add the symbol before the dot (if any) to our collection */
-        var sym = itm.symbol_after_dot();
+        symbol sym = itm.symbol_after_dot();
         if (sym != null)
           outgoing.add(sym);
       }
 
       /* now create a transition out for each individual symbol */
-      for (var sym : outgoing) {
+      for (symbol sym : outgoing) {
 
         /* will be keeping the set of items with propagate links */
-        var linked_items = new lalr_item_set();
+        lalr_item_set linked_items = new lalr_item_set();
 
         // gather up shifted versions of all the items that have this symbol 
before the
         // dot
-        var new_items = new lalr_item_set();
-        for (var itm : st.items()) {
+        lalr_item_set new_items = new lalr_item_set();
+        for (lalr_item itm : st.items()) {
           /* if this is the symbol we are working on now, add to set */
-          var sym2 = itm.symbol_after_dot();
+          symbol sym2 = itm.symbol_after_dot();
           if (sym.equals(sym2)) {
             /* add to the kernel of the new state */
             new_items.add(itm.shift());
@@ -353,7 +353,7 @@ public class lalr_state {
         /* use new items as state kernel */
         kernel = new lalr_item_set(new_items);
         /* have we seen this one already? */
-        var new_st = _all_kernels.get(kernel);
+        lalr_state new_st = _all_kernels.get(kernel);
 
         /* if we haven't, build a new state out of the item set */
         if (new_st == null) {
@@ -372,7 +372,7 @@ public class lalr_state {
         /* otherwise relink propagation to items in existing state */
         else {
           /* walk through the items that have links to the new state */
-          for (var fix_itm : linked_items) {
+          for (lalr_item fix_itm : linked_items) {
 
             /* look at each propagate link out of that item */
             for (int l = 0; l < fix_itm.propagate_items().size(); l++) {
@@ -410,7 +410,7 @@ public class lalr_state {
    */
   protected void propagate_lookaheads() throws internal_error {
     /* recursively propagate out from each item in the state */
-    for (var itm : items())
+    for (lalr_item itm : items())
       itm.propagate_lookaheads(null);
   }
 
@@ -439,17 +439,17 @@ public class lalr_state {
    * @param reduce_table the reduce-goto table to put entries in.
    */
   public void build_table_entries(parse_action_table act_table, 
parse_reduce_table reduce_table) throws internal_error {
-    var conflict_set = new terminal_set();
+    terminal_set conflict_set = new terminal_set();
 
     /* pull out our rows from the tables */
-    var our_act_row = act_table.under_state[index()];
-    var our_red_row = reduce_table.under_state[index()];
+    parse_action_row our_act_row = act_table.under_state[index()];
+    parse_reduce_row our_red_row = reduce_table.under_state[index()];
 
     /* consider each item in our state */
-    for (var itm : items()) {
+    for (lalr_item itm : items()) {
       /* if its completed (dot at end) then reduce under the lookahead */
       if (itm.dot_at_end()) {
-        var act = new reduce_action(itm.the_production());
+        reduce_action act = new reduce_action(itm.the_production());
 
         /* consider each lookahead symbol */
         for (int t = 0; t < terminal.number(); t++) {
@@ -463,7 +463,7 @@ public class lalr_state {
           } else {
             /* we now have at least one conflict */
             terminal term = terminal.find(t);
-            var other_act = our_act_row.under_term[t];
+            parse_action other_act = our_act_row.under_term[t];
 
             /* if the other act was not a shift */
             if ((other_act.kind() != parse_action.SHIFT) && (other_act.kind() 
!= parse_action.NONASSOC)) {
@@ -490,9 +490,9 @@ public class lalr_state {
     /* consider each outgoing transition */
     for (lalr_transition trans = transitions(); trans != null; trans = 
trans.next()) {
       /* if its on an terminal add a shift entry */
-      var sym = trans.on_symbol();
+      symbol sym = trans.on_symbol();
       if (!sym.is_non_term()) {
-        var act = new shift_action(trans.to_state());
+        shift_action act = new shift_action(trans.to_state());
 
         /* if we don't already have an action put this one in */
         if (our_act_row.under_term[sym.index()].kind() == parse_action.ERROR) {
@@ -641,7 +641,7 @@ public class lalr_state {
     boolean after_itm;
 
     /* consider each element */
-    for (var itm : items()) {
+    for (lalr_item itm : items()) {
       /* clear the S/R conflict set for this item */
 
       /* if it results in a reduce, it could be a conflict */
@@ -650,7 +650,7 @@ public class lalr_state {
         after_itm = false;
 
         /* compare this item against all others looking for conflicts */
-        for (var compare : items()) {
+        for (lalr_item compare : items()) {
           /* if this is the item, next one is after it */
           if (itm == compare)
             after_itm = true;
@@ -727,7 +727,7 @@ public class lalr_state {
 
     int relevancecounter = 0;
     /* find and report on all items that shift under our conflict symbol */
-    for (var itm : items()) {
+    for (lalr_item itm : items()) {
 
       /* only look if its not the same item and not a reduce */
       if (itm != red_itm && !itm.dot_at_end()) {
--- a/src/java/java_cup/parse_action_table.java
+++ b/src/java/java_cup/parse_action_table.java
@@ -73,7 +73,7 @@ public class parse_action_table {
     }
 
     /* now go across every production and make sure we hit it */
-    for (var prod : production.all()){
+    for (production prod : production.all()){
       /* if we didn't hit it give a warning */
       if (prod.num_reductions() == 0) {
         /*
--- a/src/java/java_cup/symbol_set.java
+++ b/src/java/java_cup/symbol_set.java
@@ -90,8 +90,8 @@ public class symbol_set implements Iterable<symbol> {
     not_null(other);
 
     /* walk down our set and make sure every element is in the other */
-    for (var e : this)
-      if (!other.contains(e))
+    for (Iterator<symbol> e = iterator(); e.hasNext();)
+      if (!other.contains(e.next()))
         return false;
     /* they were all there */
     return true;
@@ -155,8 +155,8 @@ public class symbol_set implements Iterable<symbol> {
     not_null(other);
 
     /* walk down the other set and do the adds individually */
-    for (var e : other)
-      result = add(e) || result;
+    for (Iterator<symbol> e = other.iterator(); e.hasNext();)
+      result = add(e.next()) || result;
 
     return result;
   }
@@ -172,8 +172,8 @@ public class symbol_set implements Iterable<symbol> {
     not_null(other);
 
     /* walk down the other set and do the removes individually */
-    for (var s : other)
-      remove(s);
+    for (Iterator<symbol> s = other.iterator(); s.hasNext();)
+      remove(s.next());
   }
 
   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
@@ -212,8 +212,8 @@ public class symbol_set implements Iterable<symbol> {
     int result = 0;
 
     /* hash together codes from at most first 5 elements */
-    for (var s : this)
-      result ^= s.hashCode();
+    for (Iterator<symbol> s = iterator(); s.hasNext(); )
+      result ^= s.next().hashCode();
 
     return result;
   }
@@ -228,12 +228,12 @@ public class symbol_set implements Iterable<symbol> {
 
     result = "{";
     comma_flag = false;
-    for (var s : this) {
+    for (Iterator<symbol> s = iterator(); s.hasNext();) {
       if (comma_flag)
         result += ", ";
       else
         comma_flag = true;
-      result += s.name();
+      result += s.next().name();
     }
     result += "}";
 

++++++ java-cup-no-classpath-in-manifest.patch ++++++
--- /var/tmp/diff_new_pack.DRujva/_old  2022-01-15 21:45:11.957614073 +0100
+++ /var/tmp/diff_new_pack.DRujva/_new  2022-01-15 21:45:11.961614075 +0100
@@ -1,11 +1,16 @@
---- develop/build.xml.orig     2006-09-09 06:43:37.000000000 +0200
-+++ develop/build.xml  2006-09-09 06:45:08.000000000 +0200
-@@ -62,7 +62,6 @@
-    <jar jarfile="${dist}/java-cup-11a.jar" basedir="${classes}">
+--- a/build.xml
++++ b/build.xml
+@@ -67,12 +67,10 @@
+    <jar jarfile="${dist}/java-cup-11b.jar" basedir="${classes}">
        <manifest>
          <attribute name="Main-Class" value="java_cup/Main" />
--      <attribute name="Class-Path" value="java-cup-11a-runtime.jar" />
+-      <attribute name="Class-Path" value="java-cup-11b-runtime.jar" />
        </manifest>
      </jar>
-     <jar jarfile="${dist}/java-cup-11a-runtime.jar" basedir="${classes}" 
includes="java_cup/runtime/*">
+     <jar jarfile="${dist}/java-cup-11b-runtime.jar" basedir="${classes}" 
includes="java_cup/runtime/**">
+       <manifest>
+-      <attribute name="Class-Path" value="commons-jxpath-1.3.jar" />
+       </manifest>
+     </jar>
+    <tar longfile="gnu"  
destfile="${dist}/java-cup-bin-11b-${cupversion}.tar.gz" compression="gzip">
 

++++++ java-cup-no-cup-no-jflex.patch ++++++
--- /var/tmp/diff_new_pack.DRujva/_old  2022-01-15 21:45:11.973614081 +0100
+++ /var/tmp/diff_new_pack.DRujva/_new  2022-01-15 21:45:11.977614083 +0100
@@ -1,6 +1,6 @@
---- develop/build.xml.orig     2006-09-09 06:43:37.000000000 +0200
-+++ develop/build.xml  2006-09-09 06:44:10.000000000 +0200
-@@ -40,18 +40,7 @@
+--- a/build.xml
++++ b/build.xml
+@@ -44,18 +44,7 @@
      <delete dir="${dist}" />
    </target>
  
@@ -17,7 +17,7 @@
 -
 -  <target name="compile" depends="jflex">
 +  <target name="compile">
-     <copy todir="${java}"><fileset dir="${src}"></fileset></copy>
-     <javac srcdir="${java}" destdir="${classes}" verbose="off" 
listfiles="off" debug="on" source="1.2" target="1.2">
+     <javac srcdir="${java}" destdir="${classes}" verbose="off" 
listfiles="off" debug="on" source="1.8" target="1.8">
        <classpath refid="libraries"/>
+       <compilerarg value="-Xlint:unchecked" />
 

++++++ java-cup-nogit.patch.in ++++++
--- a/build.xml
+++ b/build.xml
@@ -20,26 +20,6 @@
     <mkdir dir="${dist}" />
     <loadfile property="cupversion" srcFile="version.txt" failonerror="false" 
/>
     <property name="cupversion" value="custombuild" unless:set="cupversion"/>
-    <exec executable="git" outputproperty="gitversion">
-      <arg value="log"/>
-      <arg value="-1"/>
-      <arg value="--format=%h"/>
-    </exec>
-    <exec executable="git" outputproperty="changed">
-      <arg value="status"/>
-      <arg value="--porcelain"/>
-      <redirector>
-       <outputfilterchain>
-       <linecontainsregexp>
-         <regexp pattern='^M.*'/>
-       </linecontainsregexp>
-       <tokenfilter>
-         <replaceregex pattern=".*" replace="modifications based on "/>
-       </tokenfilter>
-       </outputfilterchain>
-       </redirector>
-    </exec>
-    <property name="svnversion">${changed}${gitversion}</property>
   </target>
 
   <property environment="env" />
@@ -76,10 +56,6 @@
   </target>
 
   <target name="compile" depends="jflex">
-    <replace file="${java}/java_cup/version.java"
-       token="+ version_str"
-       value='+ "v0.11b ${cupversion} (GIT ${svnversion})"'>
-    </replace>
     <javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" 
debug="on" source="10" target="10">
       <classpath refid="libraries"/>
       <compilerarg value="-Xlint:unchecked" />
--- a/src/java/java_cup/version.java
+++ b/src/java/java_cup/version.java
@@ -30,7 +30,7 @@ public class version {
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 
   /** The update letter. */
-  public static final String update = "b beta 20140226";
+  public static final String update = "b beta @GIT_DATE@";
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 
@@ -40,7 +40,7 @@ public class version {
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 
   /** Full title of the system */
-  public static final String title_str = "CUP " + "v0.11b 20160615 (GIT 
3d0ae71)";
+  public static final String title_str = "CUP " + "v0.11b @GIT_DATE@ (GIT 
@GIT_HASH@)";
 
   /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
 

Reply via email to