This commit is contained in:
commit
3864cb634a
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
95
jlex-1.2.6.build.xml
Normal file
95
jlex-1.2.6.build.xml
Normal file
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
-->
|
||||
|
||||
<project name="JLex" default="all" basedir=".">
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Initialization target -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="init">
|
||||
<tstamp/>
|
||||
<property name="Name" value="JLex"/>
|
||||
<property name="name" value="jlex"/>
|
||||
<property name="version" value="1.2.5"/>
|
||||
<property name="year" value="2001-2002"/>
|
||||
|
||||
<echo message=" ------------------- ${Name} ${version} [${year}] ---------"/>
|
||||
|
||||
<property name="compile.debug" value="on"/>
|
||||
<property name="compile.optimize" value="true"/>
|
||||
<property name="compile.deprecation" value="off"/>
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="dist.dir" value="dist"/>
|
||||
<property name="bin.dir" value="lib"/>
|
||||
<property name="lib.dir" value="lib"/>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ===================== Prepare Directories ========================= -->
|
||||
<target name="prepare" depends="init">
|
||||
<!-- "Build" Hierarchy -->
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${build.dir}/src"/>
|
||||
<mkdir dir="${build.dir}/classes"/>
|
||||
<mkdir dir="${build.dir}/docs"/>
|
||||
<mkdir dir="${build.dir}/docs/api"/>
|
||||
<!-- "Dist" Hierarchy -->
|
||||
<mkdir dir="${dist.dir}"/>
|
||||
<mkdir dir="${dist.dir}/docs"/>
|
||||
<mkdir dir="${dist.dir}/docs/api"/>
|
||||
<mkdir dir="${dist.dir}/lib"/>
|
||||
</target>
|
||||
|
||||
<!-- ======================== Compile Classes ========================== -->
|
||||
<target name="package" depends="prepare">
|
||||
|
||||
<copy todir="${build.dir}/src/JLex" file="Main.java"/>
|
||||
|
||||
<javac srcdir="${build.dir}/src"
|
||||
includes="JLex/**"
|
||||
destdir="${build.dir}/classes"
|
||||
debug="${compile.debug}"
|
||||
deprecation="${compile.deprecation}"
|
||||
optimize="${compile.optimize}"
|
||||
source="1.4"
|
||||
target="1.4" />
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ======================== Build JavaDoc =========================== -->
|
||||
<target name="javadoc" depends="prepare">
|
||||
<javadoc packagenames="JLex.*" sourcepath="${build.dir}/src"
|
||||
destdir="${build.dir}/docs/api"
|
||||
use="true"
|
||||
windowtitle="JLex v${version} API Documentation"
|
||||
doctitle="JLex v${version} API Documentation"
|
||||
bottom="Written by Elliot Berk ejberk@cs.princeton.edu. Copyright 1996." />
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ===================== Distribution Files ========================= -->
|
||||
<target name="dist" depends="package,javadoc">
|
||||
<copy todir="${dist.dir}/docs/api">
|
||||
<fileset dir="${build.dir}/docs/api"/>
|
||||
</copy>
|
||||
|
||||
<jar jarfile="${dist.dir}/lib/${name}.jar">
|
||||
<fileset dir="${build.dir}/classes">
|
||||
</fileset>
|
||||
</jar>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ====================== Clean Generated Files ===================== -->
|
||||
<target name="clean" depends="init">
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete dir="${dist.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- ========================= All In One Build ======================= -->
|
||||
<target name="all" depends="clean,dist"/>
|
||||
|
||||
|
||||
</project>
|
107
jlex-1.2.6.static.patch
Normal file
107
jlex-1.2.6.static.patch
Normal file
@ -0,0 +1,107 @@
|
||||
--- Main.java.orig 2003-03-26 11:47:18.000000000 +0100
|
||||
+++ Main.java 2003-03-26 11:47:21.000000000 +0100
|
||||
@@ -1072,8 +1072,15 @@
|
||||
// Added 6/24/98 Raimondas Lencevicius
|
||||
// May be made more efficient by replacing String operations
|
||||
// Assumes correctly formed input String. Performs no error checking
|
||||
+
|
||||
+ if (Main.staticFlag) { // S.M.Pericas
|
||||
+ m_outstream.println("\tstatic private int[][] unpackFromString"+
|
||||
+ "(int size1, int size2, String st) {");
|
||||
+ }
|
||||
+ else {
|
||||
m_outstream.println("\tprivate int[][] unpackFromString"+
|
||||
"(int size1, int size2, String st) {");
|
||||
+ }
|
||||
m_outstream.println("\t\tint colonIndex = -1;");
|
||||
m_outstream.println("\t\tString lengthString;");
|
||||
m_outstream.println("\t\tint sequenceLength = 0;");
|
||||
@@ -1216,13 +1223,23 @@
|
||||
int[] yy_cmap = new int[m_spec.m_ccls_map.length];
|
||||
for (i = 0; i < m_spec.m_ccls_map.length; ++i)
|
||||
yy_cmap[i] = m_spec.m_col_map[m_spec.m_ccls_map[i]];
|
||||
+ if (Main.staticFlag) {
|
||||
+ m_outstream.print("\tstatic private int yy_cmap[] = unpackFromString(");
|
||||
+ }
|
||||
+ else {
|
||||
m_outstream.print("\tprivate int yy_cmap[] = unpackFromString(");
|
||||
+ }
|
||||
emit_table_as_string(new int[][] { yy_cmap });
|
||||
m_outstream.println(")[0];");
|
||||
m_outstream.println();
|
||||
|
||||
// CSA: modified yy_rmap to use string packing 9-Aug-1999
|
||||
+ if (Main.staticFlag) {
|
||||
+ m_outstream.print("\tstatic private int yy_rmap[] = unpackFromString(");
|
||||
+ }
|
||||
+ else {
|
||||
m_outstream.print("\tprivate int yy_rmap[] = unpackFromString(");
|
||||
+ }
|
||||
emit_table_as_string(new int[][] { m_spec.m_row_map });
|
||||
m_outstream.println(")[0];");
|
||||
m_outstream.println();
|
||||
@@ -1237,8 +1254,14 @@
|
||||
CUtility.ASSERT(dtrans.m_dtrans.length==m_spec.m_dtrans_ncols);
|
||||
yy_nxt[elem] = dtrans.m_dtrans;
|
||||
}
|
||||
+ if (Main.staticFlag) {
|
||||
+ m_outstream.print
|
||||
+ ("\tstatic private int yy_nxt[][] = unpackFromString(");
|
||||
+ }
|
||||
+ else {
|
||||
m_outstream.print
|
||||
("\tprivate int yy_nxt[][] = unpackFromString(");
|
||||
+ }
|
||||
emit_table_as_string(yy_nxt);
|
||||
m_outstream.println(");");
|
||||
m_outstream.println();
|
||||
@@ -3825,26 +3848,43 @@
|
||||
/***************************************************************
|
||||
Function: main
|
||||
**************************************************************/
|
||||
+ public static boolean staticFlag = false;
|
||||
+
|
||||
+ public static void printUsage() {
|
||||
+ System.out.println("Usage: JLex.Main [-static] <filename>");
|
||||
+ System.exit(1);
|
||||
+ }
|
||||
+
|
||||
public static void main
|
||||
(
|
||||
String arg[]
|
||||
)
|
||||
throws java.io.IOException
|
||||
{
|
||||
+ int i;
|
||||
CLexGen lg;
|
||||
|
||||
- if (arg.length < 1)
|
||||
- {
|
||||
- System.out.println("Usage: JLex.Main <filename>");
|
||||
- return;
|
||||
- }
|
||||
+ // Parse options starting with '-'
|
||||
+ for (i = 0; i < arg.length && arg[i].charAt(0) == '-'; i++) {
|
||||
+ if (arg[i].equals("-static")) {
|
||||
+ staticFlag = true;
|
||||
+ }
|
||||
+ else {
|
||||
+ printUsage();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Enough arguments left ?
|
||||
+ if (arg.length - i < 1) {
|
||||
+ printUsage();
|
||||
+ }
|
||||
|
||||
/* Note: For debuging, it may be helpful to remove the try/catch
|
||||
block and permit the Exception to propagate to the top level.
|
||||
This gives more information. */
|
||||
try
|
||||
{
|
||||
- lg = new CLexGen(arg[0]);
|
||||
+ lg = new CLexGen(arg[i]);
|
||||
lg.generate();
|
||||
}
|
||||
catch (Error e)
|
26
jlex.changes
Normal file
26
jlex.changes
Normal file
@ -0,0 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 25 17:13:38 CEST 2006 - skh@suse.de
|
||||
|
||||
- don't use icecream
|
||||
- use source="1.4" and target="1.4" for build with java 1.5
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:46:46 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 28 15:30:50 CEST 2005 - jsmeix@suse.de
|
||||
|
||||
- Adjustments in the spec file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 18 16:43:15 CEST 2005 - jsmeix@suse.de
|
||||
|
||||
- Current version 1.2.6 from JPackage.org
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 2 16:49:03 CEST 2004 - skh@suse.de
|
||||
|
||||
- Initial package created with version 1.2.6 (JPackage 1.5)
|
||||
|
89
jlex.spec
Normal file
89
jlex.spec
Normal file
@ -0,0 +1,89 @@
|
||||
#
|
||||
# spec file for package jlex (Version 1.2.6)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
# icecream 0
|
||||
|
||||
Name: jlex
|
||||
BuildRequires: ant java2-devel-packages xml-commons-apis
|
||||
%define name jlex
|
||||
%define version 1.2.6
|
||||
%define release 2jpp
|
||||
%define section free
|
||||
Version: 1.2.6
|
||||
Release: 24
|
||||
Summary: A Lexical Analyzer Generator for Java
|
||||
License: BSD
|
||||
Group: Development/Libraries/Java
|
||||
Source0: http://www.cs.princeton.edu/~appel/modern/java/JLex/Archive/1.2.5/Main.java
|
||||
Source1: %{name}-%{version}.build.xml
|
||||
Patch0: %{name}-%{version}.static.patch
|
||||
URL: http://www.cs.princeton.edu/~appel/modern/java/JLex/
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
JLex is a lexical analyzer generator for Java.
|
||||
|
||||
|
||||
|
||||
%package javadoc
|
||||
PreReq: coreutils
|
||||
Group: Development/Libraries/Java
|
||||
Summary: Javadoc for jlex
|
||||
|
||||
%description javadoc
|
||||
JLex is a Lexical Analyzer Generator for Java. This package contains
|
||||
the javadoc documentation for JLex.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -c -T
|
||||
cp %{SOURCE0} .
|
||||
%patch0 -p0
|
||||
cp %{SOURCE1} build.xml
|
||||
|
||||
%build
|
||||
unset CLASSPATH
|
||||
ant
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -m 644 dist/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
cp -r dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadir}/*
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
|
||||
%changelog -n jlex
|
||||
* Mon Sep 25 2006 - skh@suse.de
|
||||
- don't use icecream
|
||||
- use source="1.4" and target="1.4" for build with java 1.5
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Thu Jul 28 2005 - jsmeix@suse.de
|
||||
- Adjustments in the spec file.
|
||||
* Mon Jul 18 2005 - jsmeix@suse.de
|
||||
- Current version 1.2.6 from JPackage.org
|
||||
* Thu Sep 02 2004 - skh@suse.de
|
||||
- Initial package created with version 1.2.6 (JPackage 1.5)
|
Loading…
Reference in New Issue
Block a user