diff options
| author | Greg Lewis <glewis@FreeBSD.org> | 2004-02-18 19:50:33 +0000 |
|---|---|---|
| committer | Greg Lewis <glewis@FreeBSD.org> | 2004-02-18 19:50:33 +0000 |
| commit | a69622a594795a23ac050162811b398dbc705ce0 (patch) | |
| tree | ab99cf690f034de0db8c105616e437d8cb19b54e /java/jflex/files | |
| parent | Bump PORTREVISION and otherwise adjust things depending on WordNet, which was (diff) | |
Add a port of jflex:
JFlex is a lexical analyzer generator for Java written in Java.
It is also a rewrite of the very useful tool JLex which was developed
by Elliot Berk at Princeton University. As Vern Paxon states for his C/C++
tool flex: They do not share any code though.
WWW: http://www.jflex.de/
I've done some clean up to the submitted version of the port.
PR: 62043
Submitted by: Conor McDermottroe <ports@mcdermottroe.com>
Diffstat (limited to 'java/jflex/files')
| -rw-r--r-- | java/jflex/files/patch-Makefile | 29 | ||||
| -rw-r--r-- | java/jflex/files/patch-jflex | 71 |
2 files changed, 100 insertions, 0 deletions
diff --git a/java/jflex/files/patch-Makefile b/java/jflex/files/patch-Makefile new file mode 100644 index 000000000000..54c816b15472 --- /dev/null +++ b/java/jflex/files/patch-Makefile @@ -0,0 +1,29 @@ +--- src/Makefile.orig Mon Oct 8 03:57:06 2001 ++++ src/Makefile Wed Feb 18 12:30:44 2004 +@@ -1,23 +1,21 @@ + # you need JFlex 1.2.2 and CUP 0.10j or later for this Makefile to work + + JFLEX = jflex -skel skeleton.nested +-CUP = java java_cup.Main ++CUP = java -classpath ${JAVAJARDIR}/java_cup.jar java_cup.Main + +-JAVAC = javac -target 1.1 -bootclasspath /usr/lib/jdk1.1/lib/classes.zip + #JAVAC = jikes +-JAR = jar + + DEST = ../lib + + # jdk 1.2 +-CLPATH = -classpath /usr/lib/java/jre/lib/rt.jar:. ++CLPATH = -classpath ${JAVA_CLASSES}:. + + # jdk 1.1 + #CLPATH = -classpath /usr/lib/java/lib/classes.zip:. + + # ------------------------------------------------------------ + +-JAVAC_FLAGS = ++JAVAC_FLAGS = -target 1.1 + JARFILE = JFlex.jar + + diff --git a/java/jflex/files/patch-jflex b/java/jflex/files/patch-jflex new file mode 100644 index 000000000000..c651365534ac --- /dev/null +++ b/java/jflex/files/patch-jflex @@ -0,0 +1,71 @@ +--- bin/jflex.orig Mon Oct 1 04:18:48 2001 ++++ bin/jflex Wed Feb 18 12:19:00 2004 +@@ -1,51 +1,19 @@ +-#! /bin/bash ++#!/bin/sh + # +-# JFlex start script $Revision: 1.16 $ +-# +-# if Java is not in your binary path, you need to supply its +-# location in this script. The script automatically finds +-# JFLEX_HOME when called directly, via binary path, or symbolic +-# link. +-# +-# Site wide installation: simply make a symlink from e.g. +-# /usr/bin/jflex to this script at its original position +-# +-#=================================================================== +-# +-# configurables: +- +-# path to the java interpreter +-JAVA=java +- +-# end configurables +-# +-#=================================================================== +-# +- +-# calculate true location +- +-PRG=`type $0` +-PRG=${PRG##* } +- +-# If PRG is a symlink, trace it to the real home directory +- +-while [ -L "$PRG" ] +-do +- newprg=$(ls -l ${PRG}) +- newprg=${newprg##*-> } +- [ ${newprg} = ${newprg#/} ] && newprg=${PRG%/*}/${newprg} +- PRG="$newprg" +-done +- +-PRG=${PRG%/*} +-JFLEX_HOME=${PRG}/.. +- +-# -------------------------------------------------------------------- +- +-export CLASSPATH +-CLASSPATH=$JFLEX_HOME/lib/JFlex.jar +- +-$JAVA JFlex.Main $@ ++# Replacement for the script that came with JFlex ++# because bash is not necessarily on a FreeBSD ++# machine. Also, we know where the jar is. ++# ++# Conor McDermottroe <ports@mcdermottroe.com> ++ ++# Allow the user to override where JFlex.jar lives ++if [ -z "$JAVAJARDIR" ]; then ++ JAVAJARDIR=%%JAVAJARDIR%% ++fi ++ ++# Allow the user to specify which java interpreter to use ++if [ -z "$JAVA" ]; then ++ JAVA="`which javavm`" ++fi + +-#for more memory: +-#$JAVA -Xmx128m JFlex.Main $@ ++$JAVA -jar $JAVAJARDIR/JFlex.jar $@ |
