Update to upstream version 0.11b
This commit is contained in:
parent
e9637cb1f7
commit
bef0cfce41
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
java_cup_v10k.tar.gz
|
||||
java_cup-0.11a.tar.bz2
|
||||
/java_cup-0.11b.tar.bz2
|
||||
|
||||
19
LICENSE.txt
19
LICENSE.txt
@ -1,19 +0,0 @@
|
||||
CUP Parser Generator Copyright Notice, License, and Disclaimer
|
||||
Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both the copyright notice and this permission notice and warranty
|
||||
disclaimer appear in supporting documentation, and that the names of the
|
||||
authors or their employers not be used in advertising or publicity
|
||||
pertaining to distribution of the software without specific, written
|
||||
prior permission.
|
||||
|
||||
The authors and their employers disclaim all warranties with regard to
|
||||
this software, including all implied warranties of merchantability and
|
||||
fitness. In no event shall the authors or their employers be liable for
|
||||
any special, indirect or consequential damages or any damages whatsoever
|
||||
resulting from loss of use, data or profits, whether in an action of
|
||||
contract, negligence or other tortious action, arising out of or in
|
||||
connection with the use or performance of this software.
|
||||
@ -1,24 +0,0 @@
|
||||
From 447c8beb89190adc2c51c533e93ad26f8eaf34d9 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Sat, 4 Dec 2010 10:27:15 -0500
|
||||
Subject: [PATCH] Remove class path from jar manifest
|
||||
|
||||
---
|
||||
build.xml | 1 -
|
||||
1 files changed, 0 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/build.xml b/build.xml
|
||||
index 06170de..06e2a7d 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -62,7 +62,6 @@
|
||||
<jar jarfile="${dist}/java-cup-11a.jar" basedir="${classes}">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="java_cup/Main" />
|
||||
- <attribute name="Class-Path" value="java-cup-11a-runtime.jar" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar jarfile="${dist}/java-cup-11a-runtime.jar" basedir="${classes}" includes="java_cup/runtime/*">
|
||||
--
|
||||
1.7.3.1
|
||||
|
||||
@ -1,22 +1,40 @@
|
||||
--- build.xml.sav 2006-03-28 14:34:52.000000000 +0300
|
||||
+++ build.xml 2010-01-08 12:50:20.346608627 +0200
|
||||
@@ -76,4 +76,19 @@
|
||||
</java>
|
||||
|
||||
--- build.xml~ 2014-06-12 17:23:24.000000000 +0200
|
||||
+++ build.xml 2015-06-23 10:30:57.374976304 +0200
|
||||
@@ -17,18 +17,6 @@
|
||||
<mkdir dir="${java}" />
|
||||
<mkdir dir="${classes}" />
|
||||
<mkdir dir="${dist}" />
|
||||
- <loadfile property="cupversion" srcFile="version.txt"/>
|
||||
- <exec executable="svn" outputproperty="svnversion">
|
||||
- <arg value="info"/>
|
||||
- <redirector>
|
||||
- <outputfilterchain>
|
||||
- <linecontains>
|
||||
- <contains value="Revision"/>
|
||||
- </linecontains>
|
||||
- <deletecharacters chars="Revision: "/>
|
||||
- </outputfilterchain>
|
||||
- </redirector>
|
||||
- </exec>
|
||||
</target>
|
||||
+
|
||||
+ <target name="javadoc" >
|
||||
+ <mkdir dir="${dist}/javadoc"/>
|
||||
+ <javadoc
|
||||
+ destdir="${dist}/javadoc"
|
||||
+ author="true"
|
||||
+ version="true"
|
||||
+ use="true"
|
||||
+ windowtitle="java_cup API">
|
||||
+
|
||||
+ <fileset dir="src" defaultexcludes="yes">
|
||||
+ </fileset>
|
||||
+ </javadoc>
|
||||
+
|
||||
+ </target>
|
||||
|
||||
<property environment="env" />
|
||||
@@ -78,7 +66,6 @@
|
||||
<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-11b-runtime.jar" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<jar jarfile="${dist}/java-cup-11b-runtime.jar" basedir="${classes}" includes="java_cup/runtime/*">
|
||||
@@ -143,4 +130,10 @@
|
||||
<echo message=" versionbump to inc release" />
|
||||
</target>
|
||||
|
||||
+ <target name="javadoc">
|
||||
+ <mkdir dir="${dist}/javadoc"/>
|
||||
+ <javadoc destdir="${dist}/javadoc" author="true" version="true" use="true" windowtitle="java_cup API">
|
||||
+ <fileset dir="src" defaultexcludes="yes" />
|
||||
+ </javadoc>
|
||||
+ </target>
|
||||
</project>
|
||||
|
||||
@ -6,5 +6,5 @@
|
||||
<artifactId>java_cup</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Java CUP</name>
|
||||
<version>0.11a</version>
|
||||
<version>0.11b</version>
|
||||
</project>
|
||||
|
||||
@ -1,71 +1,35 @@
|
||||
# Copyright (c) 2000-2005, JPackage Project
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of the JPackage Project nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
%define pkg_version 11a
|
||||
%define section free
|
||||
%define pkg_version 11b
|
||||
%define with_bootstrap 0
|
||||
|
||||
Name: java_cup
|
||||
Version: 0.11a
|
||||
Release: 20%{?dist}
|
||||
Version: 0.11b
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Java source interpreter
|
||||
Summary: LALR parser generator for Java
|
||||
License: MIT
|
||||
URL: http://www.cs.princeton.edu/%7Eappel/modern/java/CUP/
|
||||
#svn export -r 21 https://www2.in.tum.de/repos/cup/develop/ java_cup-0.11a
|
||||
#tar cjf java_cup-0.11a.tar.bz2 java_cup-0.11a/
|
||||
Source0: java_cup-0.11a.tar.bz2
|
||||
URL: http://www2.cs.tum.edu/projects/cup/
|
||||
BuildArch: noarch
|
||||
|
||||
# svn export -r 65 https://www2.in.tum.de/repos/cup/develop/ java_cup-0.11b
|
||||
# tar cjf java_cup-0.11b.tar.bz2 java_cup-0.11b/
|
||||
Source0: java_cup-%{version}.tar.bz2
|
||||
Source1: java_cup-pom.xml
|
||||
# Add OSGi manifests
|
||||
Source2: %{name}-MANIFEST.MF
|
||||
Source4: %{name}-runtime-MANIFEST.MF
|
||||
# Taken from http://www2.cs.tum.edu/projects/cup/
|
||||
Source3: LICENSE.txt
|
||||
|
||||
Patch0: %{name}-build.patch
|
||||
Patch1: java_cup-0.11a-manifest.patch
|
||||
|
||||
# Patch from eclipe-pdt to get around generated actions methods exceeding the 65535 bytes limit:
|
||||
# http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/tree/plugins/org.eclipse.php.core.parser/javacup10k_split_do_action_method.diff
|
||||
Patch2: javacup10k_split_do_action_method.diff
|
||||
|
||||
BuildRequires: ant
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: jpackage-utils >= 0:1.5
|
||||
BuildRequires: jflex
|
||||
BuildRequires: ant
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: jpackage-utils >= 0:1.5
|
||||
BuildRequires: jflex
|
||||
%if ! %{with_bootstrap}
|
||||
BuildRequires: java_cup >= 1:0.11a
|
||||
BuildRequires: java_cup >= 1:0.11a
|
||||
%endif
|
||||
BuildRequires: zip
|
||||
BuildRequires: zip
|
||||
|
||||
Requires: java-headless
|
||||
BuildArch: noarch
|
||||
Requires: java-headless
|
||||
|
||||
|
||||
%description
|
||||
@ -86,22 +50,17 @@ Documentation for java_cup.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -b .build
|
||||
%patch1 -p1 -b .manifest
|
||||
pushd src
|
||||
%patch2 -p1 -b .orig
|
||||
popd
|
||||
cp %{SOURCE1} pom.xml
|
||||
cp %{SOURCE3} .
|
||||
|
||||
# remove all binary files
|
||||
find -name "*.class" -delete
|
||||
|
||||
%if ! %{with_bootstrap}
|
||||
# remove prebuilt JFlex
|
||||
rm -rf java_cup-0.11a/bin/JFlex.jar
|
||||
rm -rf java_cup-%{version}/bin/JFlex.jar
|
||||
|
||||
# remove prebuilt java_cup, if not bootstrapping
|
||||
rm -rf java_cup-0.11a/bin/java-cup-11.jar
|
||||
rm -rf java_cup-%{version}/bin/java-cup-11.jar
|
||||
%endif
|
||||
|
||||
%build
|
||||
@ -109,7 +68,7 @@ rm -rf java_cup-0.11a/bin/java-cup-11.jar
|
||||
export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex)
|
||||
%endif
|
||||
|
||||
ant
|
||||
ant -Dcupversion=20150326 -Dsvnversion=65
|
||||
find -name parser.cup -delete
|
||||
ant javadoc
|
||||
|
||||
@ -140,17 +99,20 @@ cp -pr dist/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%files -f .mfiles
|
||||
%doc changelog.txt
|
||||
%{_javadir}/*
|
||||
%license LICENSE.txt
|
||||
%license licence.txt
|
||||
|
||||
%files manual
|
||||
%doc manual.html
|
||||
%license LICENSE.txt
|
||||
%license licence.txt
|
||||
|
||||
%files javadoc
|
||||
%license LICENSE.txt
|
||||
%license licence.txt
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Jun 23 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:0.11b-1
|
||||
- Update to upstream version 0.11b
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.11a-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
# This patch splits the main do_action() method in order to solve the JVM memory limitation problem
|
||||
#
|
||||
--- java_cup_v10k.old/java_cup/emit.java 1999-07-24 15:51:33.000000000 +0300
|
||||
+++ java_cup_v10k/java_cup/emit.java 2009-01-21 11:12:13.000000000 +0200
|
||||
@@ -340,7 +340,7 @@
|
||||
out.println(" this.parser = parser;");
|
||||
out.println(" }");
|
||||
|
||||
- /* action method head */
|
||||
+ /* main action method head */
|
||||
out.println();
|
||||
out.println(" /** Method with the actual generated action code. */");
|
||||
out.println(" public final java_cup.runtime.Symbol " +
|
||||
@@ -352,6 +352,38 @@
|
||||
out.println(" throws java.lang.Exception");
|
||||
out.println(" {");
|
||||
|
||||
+ /* split action code into several methods because of the JVM limitation of method size to 64KB */
|
||||
+ final int splitBase = 100;
|
||||
+ for (int splitIdx = 0; splitIdx < production.number(); splitIdx += splitBase) {
|
||||
+ if (splitIdx > 0) {
|
||||
+ out.print(" else ");
|
||||
+ }
|
||||
+ if (splitIdx + splitBase < production.number()) {
|
||||
+ out.println(" if (" + pre("act_num") + " < " + (splitIdx + splitBase) + ") {");
|
||||
+ } else {
|
||||
+ out.println(" {");
|
||||
+ }
|
||||
+ out.println(" return " + pre("do_action") + ((splitIdx + splitBase) / splitBase) + "(");
|
||||
+ out.println(" " + pre("act_num, ") + pre("parser,") + pre("stack,") + pre("top") + ");");
|
||||
+ out.println(" }");
|
||||
+ }
|
||||
+ out.println(" }");
|
||||
+ out.println();
|
||||
+
|
||||
+ for (int splitIdx = 0; splitIdx < production.number(); splitIdx += splitBase) {
|
||||
+
|
||||
+ /* splitted action method head */
|
||||
+ out.println();
|
||||
+ out.println(" /** Method with the actual generated action code. */");
|
||||
+ out.println(" public final java_cup.runtime.Symbol " +
|
||||
+ pre("do_action") + ((splitIdx + splitBase)/splitBase) + "(");
|
||||
+ out.println(" int " + pre("act_num,"));
|
||||
+ out.println(" java_cup.runtime.lr_parser " + pre("parser,"));
|
||||
+ out.println(" java.util.Stack " + pre("stack,"));
|
||||
+ out.println(" int " + pre("top)"));
|
||||
+ out.println(" throws java.lang.Exception");
|
||||
+ out.println(" {");
|
||||
+
|
||||
/* declaration of result symbol */
|
||||
/* New declaration!! now return Symbol
|
||||
6/13/96 frankf */
|
||||
@@ -365,9 +397,9 @@
|
||||
out.println(" {");
|
||||
|
||||
/* emit action code for each production as a separate case */
|
||||
- for (Enumeration p = production.all(); p.hasMoreElements(); )
|
||||
- {
|
||||
- prod = (production)p.nextElement();
|
||||
+
|
||||
+ for (int prodIdx = splitIdx; prodIdx < production.number() && prodIdx < splitIdx + splitBase; ++prodIdx) {
|
||||
+ prod = (production)production.find(prodIdx);
|
||||
|
||||
/* case label */
|
||||
out.println(" /*. . . . . . . . . . . . . . . . . . . .*/");
|
||||
@@ -471,6 +503,8 @@
|
||||
/* end of method */
|
||||
out.println(" }");
|
||||
|
||||
+ }
|
||||
+
|
||||
/* end of class */
|
||||
out.println("}");
|
||||
out.println();
|
||||
Loading…
Reference in New Issue
Block a user