diff --git a/jflex-1.6.1.tar.gz b/jflex-1.6.1.tar.gz new file mode 100644 index 0000000..9c1602e Binary files /dev/null and b/jflex-1.6.1.tar.gz differ diff --git a/jflex.1 b/jflex.1 new file mode 100644 index 0000000..be025d3 --- /dev/null +++ b/jflex.1 @@ -0,0 +1,57 @@ +.TH JFLEX "1" "October 2005" +.SH NAME +jflex \- a lexical analyzer generator (also known as scanner generator) for Java +.SH SYNOPSIS +.B jflex +\fI \fR +.SH 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. JFlex is designed to work together with the LALR parser generator CUP, and the Java modification of Berkeley Yacc BYacc/J. It can also be used together with other parser generators like ANTLR or as a standalone tool. + +.SH OPTIONS +.TP +\fB\-d\fR +write generated file to +.TP +\fB\-\-skel\fR +use external skeleton +.TP +\fB\-\-switch\fR, \fB\-\-table\fR, \fB\-\-pack\fR +set default code generation method +.TP +\fB\-\-jlex\fR +strict JLex compatibility +.TP +\fB\-\-nomin\fR +skip minimization step +.TP +\fB\-\-nobak\fR +don't create backup files +.TP +\fB\-\-dump\fR +display transition tables +.TP +\fB\-\-dot\fR +write graphviz .dot files for the generated automata (alpha) +.TP +\fB\-\-verbose\fR, \fB\-v\fR +display generation progress messages (default) +.TP +\fB\-\-quiet\fR, \fB\-q\fR +display errors only +.TP +\fB\-\-time\fR +display generation time statistics +.TP +\fB\-\-version\fR +print the version number of this copy of jflex +.TP +\fB\-\-info\fR +print system + JDK information +.TP +\fB\-\-help\fR, \fB\-h\fR +print this message +.PP + +.SH AUTHOR +This manual page was written by Wolfgang Baer , +for the Debian project (but may be used by others). diff --git a/jflex.desktop b/jflex.desktop new file mode 100644 index 0000000..cec6e07 --- /dev/null +++ b/jflex.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=JFlex +GenericName=JFlex +Comment=Fast Scanner Generator for Java +Exec=jflex +Icon=jflex +Terminal=false +Type=Application +Categories=Development; diff --git a/jflex.spec b/jflex.spec new file mode 100644 index 0000000..71ba69c --- /dev/null +++ b/jflex.spec @@ -0,0 +1,77 @@ +Name: jflex +Version: 1.6.1 +Release: 13 +Summary: Scanner Generator for Java +License: BSD +URL: http://jflex.de/ +BuildArch: noarch + +Source0: https://sourceforge.net/projects/jflex/files/jflex/1.6.1/%{name}-%{version}.tar.gz +Source1: %{name}.desktop +Source2: %{name}.1 + +BuildRequires: maven-local ant jflex junit sonatype-oss-parent +BuildRequires: java-devel java_cup desktop-file-utils emacs +Requires: emacs-filesystem >= %{_emacs_version} +Requires: javapackages-tools + +%description +JFlex is a lexical analyzer generator for Java, written in Java. +It can also be used together with other parser generators like ANTLR +or as a standalone tool. + +%package help +Summary: Documentation for jflex +Provides: %{name}-javadoc = %{version}-%{release} +Obsoletes: %{name}-javadoc < %{version}-%{release} + +%description help +This package provides documentation for jflex. + +%prep +%autosetup -n jflex-1.6.1 -p1 +find . -name "*.jar" -delete +rm -Rf src/main/java/java_cup/ examples/ +%mvn_file : jflex +%pom_add_dep java_cup:java_cup + +%pom_remove_plugin :maven-antrun-plugin +%pom_remove_plugin :jflex-maven-plugin +%pom_xpath_inject "pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" "-Xss16384k" + +%build +java -jar $(find-jar java_cup) -parser LexParse -interface -destdir src/main/java src/main/cup/LexParse.cup +jflex -d src/main/java/jflex --skel src/main/jflex/skeleton.nested src/main/jflex/LexScan.flex +%mvn_build + +%{_emacs_bytecompile} lib/jflex-mode.el + +%install +%mvn_install +%jpackage_script jflex.Main "" "" jflex:java_cup jflex true + +install -d -m 755 %{buildroot}%{_mandir}/man1 +install -p -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1 + +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} +install -d -m 755 %{buildroot}%{_datadir}/pixmaps + +install -d -m 755 %{buildroot}%{_emacs_sitelispdir}/%{name} +install -p -m 644 lib/jflex-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name} +install -p -m 644 lib/jflex-mode.elc %{buildroot}%{_emacs_sitelispdir}/%{name} + +%files -f .mfiles + +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.1.gz +%{_datadir}/applications/%{name}.desktop +%{_emacs_sitelispdir}/%{name} + +%files help +%doc doc +%doc COPYRIGHT +%doc %{_javadocdir}/%{name} + +%changelog +* Wed Feb 19 2020 fengbing - 1.6.1-13 +- Package init