update to 1.8.2 [release 1.8.2-1mamba;Sat Aug 13 2022]
This commit is contained in:
parent
2079a55c45
commit
a4eec456ca
@ -2,6 +2,5 @@
|
|||||||
|
|
||||||
JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University.
|
JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University.
|
||||||
As Vern Paxson states for his C/C++ tool flex: They do not share any code though.
|
As Vern Paxson states for his C/C++ tool flex: They do not share any code though.
|
||||||
|
|
||||||
JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool.
|
JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool.
|
||||||
|
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
--- jflex-1.4.1/src/build.xml 2004-05-20 01:37:43.000000000 +0200
|
|
||||||
+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 15:24:58.000000000 +0100
|
|
||||||
@@ -59,7 +59,14 @@
|
|
||||||
description="compile all classes">
|
|
||||||
<javac srcdir="."
|
|
||||||
destdir="../lib"
|
|
||||||
- target="1.1"
|
|
||||||
+ classpath="."
|
|
||||||
+ debug="on" />
|
|
||||||
+ </target>
|
|
||||||
+
|
|
||||||
+ <target name="compile-bootstrap"
|
|
||||||
+ description="compile all classes during a bootstrap">
|
|
||||||
+ <javac srcdir="."
|
|
||||||
+ destdir="../lib"
|
|
||||||
classpath="."
|
|
||||||
debug="on" />
|
|
||||||
</target>
|
|
||||||
@@ -93,6 +100,13 @@
|
|
||||||
<delete file="../lib/JFlex.jar" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
+ <target name="jar-bootstrap" depends="compile-bootstrap,copy" description="make JFlex.jar">
|
|
||||||
+ <jar basedir="../lib"
|
|
||||||
+ includes="JFlex/**,java_cup/**,skeleton"
|
|
||||||
+ jarfile="../lib/JFlex.jar"
|
|
||||||
+ manifest="manifest"/>
|
|
||||||
+ </target>
|
|
||||||
+
|
|
||||||
<target name="genclean" description="remove genrated classes">
|
|
||||||
<delete file="JFlex/LexScan.java" />
|
|
||||||
<delete file="JFlex/LexParse.java" />
|
|
@ -1,12 +0,0 @@
|
|||||||
--- jflex-1.4.1/examples/byaccj/README 2003-01-07 16:30:17.000000000 +0100
|
|
||||||
+++ jflex-1.4.1/examples/byaccj/README-gil 2009-03-02 18:31:10.000000000 +0100
|
|
||||||
@@ -1,8 +1,7 @@
|
|
||||||
This directory contains an interoperability example for BYacc/J and JFlex
|
|
||||||
(a small calculator)
|
|
||||||
|
|
||||||
-You need the parser generator byacc/j from
|
|
||||||
-http://troi.lincom-asg.com/~rjamison/byacc/
|
|
||||||
+You need the parser generator byacc/j from http://byaccj.sourceforge.net/
|
|
||||||
for this example to work (version byacc/j 1.1 has been tested).
|
|
||||||
|
|
||||||
Use the Makefile to generate the lexer and parser.
|
|
@ -1,36 +0,0 @@
|
|||||||
--- jflex-1.4.1/src/build.xml 2009-03-02 18:43:48.000000000 +0100
|
|
||||||
+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 18:49:32.000000000 +0100
|
|
||||||
@@ -7,10 +7,10 @@
|
|
||||||
<property file="${user.home}/.jflex.properties" />
|
|
||||||
|
|
||||||
<!-- location of development tools necessary for the build -->
|
|
||||||
- <property name="tools.dir" value="/usr/share/java"/>
|
|
||||||
+ <property name="tools.dir" value="_JAVA-DIR_"/>
|
|
||||||
|
|
||||||
<!-- override these if you want to use your own versions -->
|
|
||||||
- <property name="jflex.jar" value="${tools.dir}/JFlex.jar" />
|
|
||||||
+ <property name="jflex.jar" value="${tools.dir}/jflex.jar" />
|
|
||||||
<property name="cup.jar" value="${tools.dir}/java_cup.jar" />
|
|
||||||
|
|
||||||
<!-- where to get jflex.jar and cup.jar from -->
|
|
||||||
@@ -25,7 +25,6 @@
|
|
||||||
<target name="help" description="show help message">
|
|
||||||
<echo message="Ant build file for JFlex. Useful targets:"/>
|
|
||||||
<echo message=""/>
|
|
||||||
- <echo message="gettools: download development tools for the build"/>
|
|
||||||
<echo message="realclean: remove all compiled and generated files"/>
|
|
||||||
<echo message="jar: make JFlex.jar"/>
|
|
||||||
<echo message=""/>
|
|
||||||
@@ -38,12 +37,6 @@
|
|
||||||
<taskdef classname="java_cup.anttask.CUPTask" name="cup" classpath="${cup.jar}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
- <target name="gettools" description="download development tools">
|
|
||||||
- <mkdir dir="${tools.dir}"/>
|
|
||||||
- <get src="${jflex.jar.url}" dest="${jflex.jar}"/>
|
|
||||||
- <get src="${cup.jar.url}" dest="${cup.jar}"/>
|
|
||||||
- </target>
|
|
||||||
-
|
|
||||||
<target name="dist" description="build distribution">
|
|
||||||
<antcall target="build" />
|
|
||||||
<antcall target="libclean" />
|
|
@ -1,29 +0,0 @@
|
|||||||
--- jflex-1.4.1/src/build.xml 2009-03-02 18:38:52.000000000 +0100
|
|
||||||
+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 18:42:35.000000000 +0100
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
<property file="${user.home}/.jflex.properties" />
|
|
||||||
|
|
||||||
<!-- location of development tools necessary for the build -->
|
|
||||||
- <property name="tools.dir" value="../tools"/>
|
|
||||||
+ <property name="tools.dir" value="/usr/share/java"/>
|
|
||||||
|
|
||||||
<!-- override these if you want to use your own versions -->
|
|
||||||
<property name="jflex.jar" value="${tools.dir}/JFlex.jar" />
|
|
||||||
@@ -35,7 +35,7 @@
|
|
||||||
|
|
||||||
<target name="declare" description="define tasks for jflex and cup">
|
|
||||||
<taskdef classname="JFlex.anttask.JFlexTask" name="jflex" classpath="${jflex.jar}"/>
|
|
||||||
- <taskdef classname="java_cup.AntTask" name="cup" classpath="${cup.jar}"/>
|
|
||||||
+ <taskdef classname="java_cup.anttask.CUPTask" name="cup" classpath="${cup.jar}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="gettools" description="download development tools">
|
|
||||||
@@ -76,7 +76,7 @@
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="cup" depends="declare" description="generate parser">
|
|
||||||
- <cup file="JFlex/LexParse.cup" dir="JFlex" interface="true" parser="LexParse" />
|
|
||||||
+ <cup file="JFlex/LexParse.cup" parser="LexParse" interface="true" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="copy" description="copy resources to build dir">
|
|
@ -1,47 +0,0 @@
|
|||||||
--- jflex-1.4.1/src/build.xml 2009-03-02 15:32:03.000000000 +0100
|
|
||||||
+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 15:37:29.000000000 +0100
|
|
||||||
@@ -25,7 +25,6 @@
|
|
||||||
<target name="help" description="show help message">
|
|
||||||
<echo message="Ant build file for JFlex. Useful targets:"/>
|
|
||||||
<echo message=""/>
|
|
||||||
- <echo message="gettools: download development tools for the build"/>
|
|
||||||
<echo message="realclean: remove all compiled and generated files"/>
|
|
||||||
<echo message="jar: make JFlex.jar"/>
|
|
||||||
<echo message=""/>
|
|
||||||
@@ -38,12 +37,6 @@
|
|
||||||
<taskdef classname="java_cup.AntTask" name="cup" classpath="${cup.jar}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
- <target name="gettools" description="download development tools">
|
|
||||||
- <mkdir dir="${tools.dir}"/>
|
|
||||||
- <get src="${jflex.jar.url}" dest="${jflex.jar}"/>
|
|
||||||
- <get src="${cup.jar.url}" dest="${cup.jar}"/>
|
|
||||||
- </target>
|
|
||||||
-
|
|
||||||
<target name="dist" description="build distribution">
|
|
||||||
<antcall target="build" />
|
|
||||||
<antcall target="libclean" />
|
|
||||||
@@ -55,7 +48,7 @@
|
|
||||||
<target name="cbuild" depends="libclean,compile,jar"
|
|
||||||
description="recompile and pack all classes"/>
|
|
||||||
|
|
||||||
- <target name="compile" depends="jflex,cup"
|
|
||||||
+ <target name="compile"
|
|
||||||
description="compile all classes">
|
|
||||||
<javac srcdir="."
|
|
||||||
destdir="../lib"
|
|
||||||
@@ -71,14 +64,6 @@
|
|
||||||
debug="on" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
- <target name="jflex" depends="declare" description="generate scanner">
|
|
||||||
- <jflex file="JFlex/LexScan.flex" skeleton="skeleton.nested"/>
|
|
||||||
- </target>
|
|
||||||
-
|
|
||||||
- <target name="cup" depends="declare" description="generate parser">
|
|
||||||
- <cup file="JFlex/LexParse.cup" dir="JFlex" interface="true" parser="LexParse" />
|
|
||||||
- </target>
|
|
||||||
-
|
|
||||||
<target name="copy" description="copy resources to build dir">
|
|
||||||
<copy file="skeleton.default" todir="../lib/JFlex" />
|
|
||||||
<copy file="JFlex/Messages.properties" todir="../lib/JFlex/" />
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# jflex script
|
|
||||||
# JPackage Project <http://www.jpackage.org/>
|
|
||||||
|
|
||||||
# Source functions library
|
|
||||||
if [ -f /usr/share/java-utils/java-functions ] ; then
|
|
||||||
. /usr/share/java-utils/java-functions
|
|
||||||
else
|
|
||||||
echo "Can't find functions library, aborting"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
MAIN_CLASS="JFlex.Main"
|
|
||||||
BASE_FLAGS=""
|
|
||||||
BASE_OPTIONS=""
|
|
||||||
BASE_JARS="jflex"
|
|
||||||
|
|
||||||
# Set parameters
|
|
||||||
set_jvm
|
|
||||||
set_classpath $BASE_JARS
|
|
||||||
set_flags $BASE_FLAGS
|
|
||||||
set_options $BASE_OPTIONS
|
|
||||||
|
|
||||||
# Let's start
|
|
||||||
run "$@"
|
|
112
java-jflex.spec
112
java-jflex.spec
@ -1,100 +1,36 @@
|
|||||||
%define bootstrap 0
|
|
||||||
Name: java-jflex
|
Name: java-jflex
|
||||||
Version: 1.4.1
|
Version: 1.8.2
|
||||||
Release: 4mamba
|
Release: 1mamba
|
||||||
Summary: JFlex - The Fast Scanner Generator for Java
|
Summary: JFlex - The Fast Scanner Generator for Java
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
Distribution: openmamba
|
Distribution: openmamba
|
||||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
URL: http://jflex.de/
|
URL: https://www.jflex.de/
|
||||||
Source0: http://jflex.de/jflex-%{version}.tar.gz
|
Source0: https://github.com/jflex-de/jflex/releases/download/v%{version}/jflex-%{version}.tar.gz
|
||||||
Source1: java-jflex.script
|
Source1: jflex.sh
|
||||||
Patch0: java-jflex-1.4.1-build_xml.patch
|
|
||||||
Patch1: java-jflex-1.4.1-no-cup-no-jflex.patch
|
|
||||||
Patch2: java-jflex-1.4.1-cup-anttask.patch
|
|
||||||
Patch3: java-jflex-1.4.1-classpath.patch
|
|
||||||
Patch4: java-jflex-1.4.1-byaccj.patch
|
|
||||||
License: GPL
|
License: GPL
|
||||||
BuildRequires: apache-ant
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: java_cup
|
## AUTOBUILDREQ-END
|
||||||
BuildRequires: java-junit3
|
BuildRequires: javapackages
|
||||||
BuildRequires: jpackage-utils
|
Requires: javapackages
|
||||||
BuildRequires: sinjdoc
|
|
||||||
Requires: java_cup
|
|
||||||
Requires: jpackage-utils
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University.
|
JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University.
|
||||||
As Vern Paxson states for his C/C++ tool flex: They do not share any code though.
|
As Vern Paxson states for his C/C++ tool flex: They do not share any code though.
|
||||||
|
|
||||||
JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool.
|
JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool.
|
||||||
|
|
||||||
%package javadoc
|
|
||||||
Group: Documentation
|
|
||||||
Summary: Javadoc for %{name}
|
|
||||||
|
|
||||||
%description javadoc
|
|
||||||
JFlex is a lexical analyzer generator (also known as scanner generator) for Java(tm), written in Java(tm). It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University.
|
|
||||||
As Vern Paxson states for his C/C++ tool flex: They do not share any code though.
|
|
||||||
|
|
||||||
This package contains Javadoc for %{name}.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
#rm -rf jflex*
|
|
||||||
%setup -q -n jflex-%{version}
|
%setup -q -n jflex-%{version}
|
||||||
%patch0 -p1
|
|
||||||
%if ! %bootstrap
|
|
||||||
%patch1 -p1
|
|
||||||
%else
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
sed -i "s|_JAVA-DIR_|%{_javadir}|" src/build.xml
|
|
||||||
%patch4 -p1
|
|
||||||
|
|
||||||
%endif
|
|
||||||
rm -rf src/java_cup
|
|
||||||
#find . -name "*.class" -exec rm {} \;
|
|
||||||
|
|
||||||
for j in $(find . -name "*.jar"); do
|
|
||||||
mv $j ${j}.no
|
|
||||||
done
|
|
||||||
|
|
||||||
sed -i 's/\r//' COPYRIGHT
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
pushd src
|
|
||||||
%if ! %bootstrap
|
|
||||||
# bootstrap generated JFlex.jar
|
|
||||||
CLASSPATH=$(build-classpath java-cup java-cup-runtime junit-3.8.2) \
|
|
||||||
ant jar-bootstrap
|
|
||||||
# rebuilding using the JFlex.jar
|
|
||||||
CLASSPATH=$(build-classpath java-cup java-cup-runtime junit-3.8.2):../lib/JFlex.jar \
|
|
||||||
ant \
|
|
||||||
genclean libclean \
|
|
||||||
jar
|
|
||||||
|
|
||||||
%else
|
|
||||||
CLASSPATH=$(build-classpath java-cup java_cup-runtime junit-3.8.2) \
|
|
||||||
ant jar
|
|
||||||
%endif
|
|
||||||
mkdir -p ../dist/docs/api
|
|
||||||
sinjdoc -d ../dist/docs/api \
|
|
||||||
-classpath $(build-classpath junit-3.8.2 ant-1.7.1):lib/JFlex.jar \
|
|
||||||
-encoding iso-8859-1 \
|
|
||||||
-sourcepath . JFlex \
|
|
||||||
-doctitle 'JFlex %{version} API' \
|
|
||||||
`find src -name '*.java'`
|
|
||||||
popd
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_javadir}
|
mkdir -p %{buildroot}%{_javadir}
|
||||||
|
|
||||||
install -pm 644 lib/JFlex.jar \
|
install -pm 644 lib/jflex-full-%{version}.jar \
|
||||||
%{buildroot}%{_javadir}/jflex-%{version}.jar
|
%{buildroot}%{_javadir}/jflex-%{version}.jar
|
||||||
|
|
||||||
( cd %{buildroot}%{_javadir}
|
( cd %{buildroot}%{_javadir}
|
||||||
@ -104,19 +40,9 @@ install -pm 644 lib/JFlex.jar \
|
|||||||
ln -s jflex.jar JFlex.jar
|
ln -s jflex.jar JFlex.jar
|
||||||
)
|
)
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_javadocdir}/jflex-%{version}
|
install -m644 -D lib/jflex.vim \
|
||||||
|
%{buildroot}%{_datadir}/vim/syntax/jflex.vim
|
||||||
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/jflex-%{version}
|
install -m755 -D %{SOURCE1} %{buildroot}%{_bindir}/jflex
|
||||||
ln -s jflex-%{version} %{buildroot}%{_javadocdir}/jflex
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
|
||||||
install -m 755 %{S:1} %{buildroot}%{_bindir}/jflex
|
|
||||||
|
|
||||||
rm -rf doc/COPYRIGHT
|
|
||||||
|
|
||||||
perl -pi -e 's/\r$//g' examples/standalone/sample.inp
|
|
||||||
|
|
||||||
#%{_bindir}/aot-compile-rpm
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
@ -127,15 +53,13 @@ perl -pi -e 's/\r$//g' examples/standalone/sample.inp
|
|||||||
%{_javadir}/jflex-%{version}.jar
|
%{_javadir}/jflex-%{version}.jar
|
||||||
%{_javadir}/jflex.jar
|
%{_javadir}/jflex.jar
|
||||||
%{_javadir}/JFlex.jar
|
%{_javadir}/JFlex.jar
|
||||||
%doc COPYRIGHT doc/*
|
%{_datadir}/vim/syntax/jflex.vim
|
||||||
%doc examples src/README src/changelog
|
%doc doc/COPYRIGHT
|
||||||
|
|
||||||
%files javadoc
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_javadocdir}/jflex-%{version}
|
|
||||||
%{_javadocdir}/jflex
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 13 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.2-1mamba
|
||||||
|
- update to 1.8.2
|
||||||
|
|
||||||
* Thu Nov 25 2010 gil <puntogil@libero.it> 1.4.1-4mamba
|
* Thu Nov 25 2010 gil <puntogil@libero.it> 1.4.1-4mamba
|
||||||
- rebuilt devel
|
- rebuilt devel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user