Skip to content
Commits on Source (20)
......@@ -7,7 +7,7 @@ There is absolutely NO WARRANTY for JFlex, its code and its documentation.
Copyright (c) Gerwin Klein, Steve Rowe, Regis Decamp.
Copyright (c) Gerwin Klein, Steve Rowe, Régis Décamps.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
......
# JFlex 1.6.1
# JFlex 1.7.0
This directory contains JFlex, a fast scanner generator for Java.
To run JFlex, run `bin/jflex` from the command line or double click on
`lib/JFlex.jar`. You need JDK 1.5 installed and set up.
To run JFlex, run `bin/jflex` from the command line or double click on the
JFLex jar file in the `lib/` directory. You need JDK 1.7 installed and set up.
See the manual in `doc/` or the website at <http://jflex.de> for more
information and for how to get started.
......@@ -14,14 +14,8 @@ information and for how to get started.
bin/ command line start scripts
doc/ manual
examples/ some example scanners
lib/ JFlex.jar, syntax highlighting, skeleton files
src/
src/main/java/ JFLex sources
src/main/jflex/ scanner spec
src/main/cup/ parser spec
src/main/resources/ strings and default skeleton file
src/test/ unit tests
lib/ JFlex jar file, syntax highlighting files
src/ JFLex sources
pom.xml Maven project object model, useful commands:
mvn compile build and compile JFlex
......@@ -37,8 +31,8 @@ information and for how to get started.
## Dependencies ##
* To run JFlex, you need at least JDK 1.5.
* To build JFlex, you need JDK 1.5+ and Maven 2.2.1+.
* To run JFlex, you need at least JDK 1.7.
* To build JFlex, you need JDK 1.7+ and Maven 3.
Maven will take care of the remaining dependencies, such as JFlex,
CUP, JUnit, etc.
* You can also build JFlex with Ant 1.8+. To run unit tests you need
......
#! /bin/bash
#
# JFlex start script $Revision$
# JFlex start script
#
# if Java is not in your binary path, you need to supply its
# location in this script. The script automatically finds
......@@ -15,8 +15,12 @@
# configurables:
# path to the java interpreter
# TODO: Use JAVA_HOME
JAVA=java
# Version of JFlex to execute
JFLEX_VERSION=1.7.0
# end configurables
#
#===================================================================
......@@ -24,8 +28,7 @@ JAVA=java
# calculate true location
PRG=`type $0`
PRG=${PRG##* }
PRG="$0"
# If PRG is a symlink, trace it to the real home directory
......@@ -42,4 +45,4 @@ JFLEX_HOME=${PRG}/..
# --------------------------------------------------------------------
$JAVA -Xmx128m -jar $JFLEX_HOME/lib/jflex-1.6.1.jar $@
$JAVA -Xmx128m -jar "$JFLEX_HOME"/lib/jflex-full-${JFLEX_VERSION}.jar $@
......@@ -3,5 +3,6 @@ REM Please adjust JFLEX_HOME to suit your needs
REM (please do not add a trailing backslash)
set JFLEX_HOME=C:\JFLEX
set JFLEX_VERSION=1.7.0
java -Xmx128m -jar %JFLEX_HOME%\lib\jflex-1.6.1.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
java -Xmx128m -jar "%JFLEX_HOME%"\lib\jflex-full-%JFLEX_VERSION%.jar %*
<?xml version="1.0"?>
<project name="JFlex" default="help">
<property name="version" value="1.6.1" />
<property name="bootstrap.version" value="1.6.0" />
<property environment="env" />
<property name="version" value="1.7.0" />
<property name="bootstrap.version" value="1.6.1" />
<property name="junit.version" value="4.11" />
<property name="cup.version" value="11a" />
<property name="cup.version" value="11b" />
<property name="jflex.jdk.version" value="1.7"/>
<property name="ant.build.javac.source" value="${jflex.jdk.version}"/>
<property name="ant.build.javac.target" value="${jflex.jdk.version}"/>
<!-- use any of these files to override properties -->
<property file="build.properties" />
......@@ -12,6 +18,7 @@
<!-- location of development tools necessary for the build -->
<property name="lib.dir" value="lib"/>
<property name="m2repo" value="${env.HOME}/.m2/repository" />
<!-- override these if you want to use your own versions -->
<property name="bootstrap.jflex.jar" value="${lib.dir}/jflex-${bootstrap.version}.jar" />
......@@ -19,11 +26,9 @@
<property name="junit.jar" value="${lib.dir}/junit-${junit.version}.jar" />
<!-- where to get tool jars from -->
<property name="maven.central.url" value="http://central.maven.org/maven2" />
<property name="bootstrap.jflex.jar.url"
value="${maven.central.url}/de/jflex/jflex/${bootstrap.version}/jflex-${bootstrap.version}.jar" />
<property name="junit.jar.url"
value="${maven.central.url}/junit/junit/${junit.version}/junit-${junit.version}.jar" />
<property name="maven.central.url" value="https://repo.maven.apache.org/maven2" />
<property name="bootstrap.jflex.jar.path" value="de/jflex/jflex/${bootstrap.version}/jflex-${bootstrap.version}.jar" />
<property name="junit.jar.path" value="junit/junit/${junit.version}/junit-${junit.version}.jar" />
<!-- where build output goes, including the jflex jar -->
<property name="build.dir" value="build"/>
......@@ -35,6 +40,12 @@
<!-- where the output jar goes -->
<property name="output.jar.name" value="${build.dir}/jflex-${version}.jar" />
<fail message="Minimum supported Java version is ${jflex.jdk.version}. Your Java version is ${ant.java.version}.">
<condition>
<not><hasmethod classname="java.lang.Throwable" method="getSuppressed"/></not>
</condition>
</fail>
<target name="help" description="show help message">
<echo message="Ant build file for JFlex. Useful targets:"/>
<echo message=""/>
......@@ -50,8 +61,10 @@
</target>
<target name="gettools" description="download development tools">
<get src="${bootstrap.jflex.jar.url}" dest="${bootstrap.jflex.jar}"/>
<get src="${junit.jar.url}" dest="${junit.jar}"/>
<!-- Download libs from central Maven repo otherwise. -->
<get src="${maven.central.url}/${bootstrap.jflex.jar.path}" dest="${bootstrap.jflex.jar}" skipexisting="true"/>
<get src="${maven.central.url}/${junit.jar.path}" dest="${junit.jar}" skipexisting="true"/>
<get src="https://raw.githubusercontent.com/jflex-de/jflex/05632859c94c348dee7d243e4a36bd656c132e96/cup/cup/java-cup-11b.jar" dest="lib/" skipexisting="true"/>
</target>
<target name="build" depends="clean,jar"
......@@ -79,7 +92,8 @@
<mkdir dir="${compile.output.dir}" />
<javac destdir="${compile.output.dir}"
debug="on"
includeantruntime="true">
includeantruntime="true"
classpath="${cup.jar}">
<src path="src/main/java"/>
<src path="${generated.sources.dir}"/>
</javac>
......@@ -89,6 +103,7 @@
<mkdir dir="${tests.dir}"/>
<junit dir="." printsummary="true" errorproperty="junit.failed">
<classpath>
<file file="${cup.jar}"/>
<file file="${junit.jar}"/>
<pathelement location="${compile.output.dir}"/>
<pathelement location="${test.compile.output.dir}"/>
......@@ -97,6 +112,7 @@
<enable/>
</assertions>
<batchtest fork="yes" todir="${tests.dir}">
<formatter type="plain" usefile="false" /> <!-- to screen -->
<formatter type="plain"/>
<fileset dir="src/test/java">
<include name="**/*Test*.java"/>
......@@ -118,7 +134,7 @@
<mkdir dir="${generated.sources.dir}"/>
<jflex file="src/main/jflex/LexScan.flex"
destdir="${generated.sources.dir}"
skeleton="src/main/jflex/skeleton.nested-1.6.0"
skeleton="src/main/jflex/skeleton.nested"
nobak="on"/>
</target>
......@@ -129,6 +145,7 @@
<cup srcfile="src/main/cup/LexParse.cup"
destdir="${generated.sources.dir}"
interface="true"
locations="false"
parser="LexParse"/>
</target>
......
## JFlex 1.6.1 (March 21, 2015)
## [JFlex 1.7.0](https://github.com/jflex-de/jflex/milestone/10) (September 21, 2018)
- Unicode 8.0 and 9.0 are supported (#209)
- updated to most recent version of CUP 11b (#175)
- JFlex build and runtime now depend on JDK 1.7+
- Maven build now depends on >= 3.2.2
- Ant build now depends on >= 1.9.7 (#294)
- Option `--noinputstreamctor` removed (#195)
- documentation improvements (#152, #187, #215, #290)
- add an `--encoding` option to specify input/output encoding (#164)
- make jflex start script robust for other locales (#251)
- report character position when %debug and %char are present (#207)
## [JFlex 1.6.1](https://github.com/jflex-de/jflex/milestone/9) (March 16, 2015)
- JFlex development, wiki, and issue tracker moved to https://github.com/jflex-de/
- Fixed issue #130, "in caseless mode, chars in regexps not accepted caselessly":
Caseless option works again as intended.
- Fixed issue #131, "re-enable scanning interactively or from a network byte stream":
JFlex now throws an IOException when a Reader returns 0 characters.
- New example, shows how to deal with Readers that return 0 characters.
- in caseless mode, chars in regexps not accepted caselessly:
Caseless option works again as intended. (#130)
- re-enable scanning interactively or from a network byte stream:
JFlex now throws an `IOException` when a `Reader` returns 0 characters. (#131)
- New example, shows how to deal with `Reader`s that return 0 characters.
- Command line scripts work again in repository version (contributed by Emma Strubell)
- New options `--warn-unused` and `--no-warn-unused` that control warnings about unused macros.
- Fixed issue #125: `%apiprivate` and `%cup2` switches now no longer incompatible
- Fix issue #133, "Error in skeleton.nested":
- %apiprivate` and `%cup2` switches now no longer incompatible (#125)
- "Error in skeleton.nested":
Empty-string matches were taking precedence over `EOF` and caused non-termination.
Now `EOF` is counted as the highest-priority empty match.
Now `EOF` is counted as the highest-priority empty match. (#133)
- New warning when an expression matches the empty string (can lead to non-termination).
## JFlex 1.6.0 (Jun 21, 2014)
## [JFlex 1.6.0](https://github.com/jflex-de/jflex/milestone/16) (Jun 21, 2014)
- Unicode 7.0 is supported.
- In %unicode mode, supplementary code points are now handled properly.
. Regular expressions are now code-point based, rather than code-unit/
- In `%unicode` mode, supplementary code points are now handled properly.
- Regular expressions are now code-point based, rather than code-unit/
char based.
. Input streams are read as code point sequences - properly paired
- Input streams are read as code point sequences - properly paired
surrogate code units are read as a single character.
. All supported Unicode properties now match supplementary characters
- All supported Unicode properties now match supplementary characters
when Unicode 3.0 or above is specified, or when no version is
specified, causing the default Unicode version, Unicode 7.0 in this
release, to be used.
- New \u{...} escape sequence allows code points (and whitespace-separated
- New `\u{...}` escape sequence allows code points (and whitespace-separated
sequences of code points) to be specified as 1-6 hexadecimal digit values.
- Characters in matches printed in %debug mode are now Unicode escaped
(\uXXXX) when they are outside the range 32..127.
- fixed bug #127, detect javadoc class comment when followed by annotation(s)
(`\uXXXX`) when they are outside the range 32..127.
- detect javadoc class comment when followed by annotation(s) (#128)
- removed the "switch" and "table" code generation options
- By default no InputStream constructor is included in the generated
- Option `--noinputstreamctor` deprecated.
By default no InputStream constructor is included in the generated
scanner. The capability to include one is deprecated and will be
removed in JFlex 1.7.
## JFlex 1.5.1 (Mar 21, 2014)
- fixed bug #126, problem calling ./jflex start scripts
- fixed bug #125, minor documentation flaws
## [JFlex 1.5.1](https://github.com/jflex-de/jflex/milestone/13) (Mar 21, 2014)
- fixed problem calling `./jflex` start scripts (#127)
- corrected documentation flaws (#126)
- further documentation and website updates
- JFlex now reports the correct version string
- added support for CUP2 with %cup2 switch, based on patch by Andreas Wenger
## JFlex 1.5.0 (Jan 21, 2014)
## [JFlex 1.5.0](https://github.com/jflex-de/jflex/milestone/12) (Jan 21, 2014)
- the "switch" and "table" code generation options are deprecated
and will be removed in JFlex 1.6
- the JFlex license has been changed from GPL to BSD.
- updated JFlex to CUP version 0.11a.
- changed the build from Ant to Maven.
- changed the build from Ant to Maven. [523d7a9](https://github.com/jflex-de/jflex/commit/523d7a940cc179494f80af1eb71c721778c3417c)
- JFlex now mostly conforms with Unicode Regular Expressions UTS#18
Basic Unicode Support - Level 1. Supplementary code points (above
the Basic Multilingual Plane) are not yet supported.
- new meta characters supported: `\s, \S, \d, \D, \w, \W`.
- nested character sets now supported, e.g. [[[ABC]D]E[FG]]
- new character set operations supported: union (e.g. [A||B]), intersection (e.g.
[A&&B]), set-difference (e.g. [A--B]), and symmetric difference (e.g. [A~~B]).
- nested character sets now supported, e.g. `[[[ABC]D]E[FG]]`
- new character set operations supported: union (e.g. `[A||B]`), intersection (e.g.
`[A&&B]`), set-difference (e.g. `[A--B]`), and symmetric difference (e.g. `[A~~B]`).
- the meaning of the dot (".") meta character has been changed from `[^\n]` to
`[^\n\r\u000B\u000C\u0085\u2028\u2029]`. Use the new `--legacydot` option to
cause "." to be interpreted as `[^\n]`.
......@@ -61,43 +74,43 @@
`"\r\n" | [\n\r\u000B\u000C\u0085\u2028\u2029]`.
- new option --noinputstreamctor to not include an InputStream
constructor in the generated scanner.
- %include <file> can now be used in the rules section (bug #116)
- fixed bug #105 & #106 (yychar and zzAtBOL should be reset for nested input streams)
- fixed bug #107 (could not match input for empty string matches.)
- fixed bug #110 & #118 (properly update zzFin when reallocating zzBuffer)
- fixed bug #114 (noncompileable scanner generation when default locale is Turkish)
- fixed bug #113 (zzEOFDone not included with pushed nested stream state)
- fixed bug #103 (can't build examples/java/)
- fixed bug #104 (impossible char class range should trigger syntax error)
## JFlex 1.4.3 (Jan 31, 2009)
- fixed bug #2018299 (lookahead syntax error)
- fixed bug #2010261 (min_int in Java example scanner)
- fixed bug #2007221 (zzEOFDone not reset in yyreset(Reader))
- fixed bug #1999301 (%type and %int at the same time should produce error msg)
- `%include <file>` can now be used in the rules section (#117)
- yychar and zzAtBOL should be reset for nested input streams (#107 & #108 )
- fixed bug #109 (could not match input for empty string matches.)
- fixed bug #112 & #119 (properly update zzFin when reallocating zzBuffer)
- fixed bug #115 (noncompileable scanner generation when default locale is Turkish)
- fixed bug #114 (zzEOFDone not included with pushed nested stream state)
- fixed bug #105 (can't build examples/java/)
- fixed bug #106 (impossible char class range should trigger syntax error)
## [JFlex 1.4.3](https://github.com/jflex-de/jflex/milestone/15) (Jan 31, 2009)
- fixed bug #100 (lookahead syntax error)
- fixed bug #97 (min_int in Java example scanner)
- fixed bug #96 (zzEOFDone not reset in yyreset(Reader))
- fixed bug #95 (%type and %int at the same time should produce error msg)
## JFlex 1.4.2 (May 27, 2008)
- implemented feature request #1212181:
- implemented feature request #75:
Now supports generics syntax for %type, %extends, etc
- implemented feature request #1762500:
- implemented feature request #156:
Provided %ctorarg option to add arguments to constructor
- fixed bug #1464525 (Reader.read might return 0)
- fixed bug #1968897 (Ambiguous error message in macro expansion)
- fixed bug #1832973 (Syntax error in input may cause NullPointerException)
- fixed bug #1629920 (Need to defend against path blanks in jflex bash script)
- fixed bug #1540228 (EOF actions may be ignored for same lex state)
- fixed bug #1498726 (syntax error in generated ZZ_CMAP)
- fixed bug #1282840 (lookahead and "|" actions)
- fixed bug #1164852 (yytext() longer than expected with lookahead)
- fixed bug #1065521 (OS/2 Java 1.1.8 Issues)
- fixed bug #421495 (dangerous lookahead check may fail)
- fixed bug #80 (Reader.read might return 0)
- fixed bug #57 (Ambiguous error message in macro expansion)
- fixed bug #89 (Syntax error in input may cause NullPointerException)
- fixed bug #85 (Need to defend against path blanks in jflex bash script)
- fixed bug #82 (EOF actions may be ignored for same lex state)
- fixed bug #81 (syntax error in generated ZZ_CMAP)
- fixed bug #77 (lookahead and "|" actions)
- fixed bug #74 (yytext() longer than expected with lookahead)
- fixed bug #73 (OS/2 Java 1.1.8 Issues)
- fixed bug #40 (dangerous lookahead check may fail)
## JFlex 1.4.1 (November 7, 2004)
- merged in patch by Don Brown (fixes #1049791 Uses Old JUnit method assertFalse)
- merged in patch by Don Brown (fixes #887821 buffer expansion bug in yy_refill())
- merged in patch by Don Brown (fixes #70 Uses Old JUnit method assertFalse)
- merged in patch by Don Brown (fixes #62 buffer expansion bug in yy_refill())
Thanks to Binesh Bannerjee for providing a simpler test case for this problem.
- fixed bug #1035407 (ArrayIndexOutOfBounds in IntCharSet)
- fixed bug #1003569 (Cannot use lookahead with ignorecase)
- fixed bug #69 (ArrayIndexOutOfBounds in IntCharSet)
- fixed bug #68 (Cannot use lookahead with ignorecase)
- converted dangerous lookahead error to warning
- print info for EOF actions as well in %debug mode
- fixed line number count for EOF actions
......@@ -108,45 +121,45 @@
- new --jlex option for strict compatibility to JLex. Currently it
changes %ignorecase to JLex semantics, that is, character classes
are interpreted in a caseless way, too.
(fixes bus #751757, %ignorecase ignored by char classes).
(fixes bus #59, %ignorecase ignored by char classes).
Thanks to Edward D. Willink for spotting the incompatibility.
- support for even larger scanners (up to 64K DFA states).
Thanks to Karin Vespoor.
- removed eclipse compiler warnings for generated classes
(feature request #778747)
- implemented faster character classes (feature request #604589).
Expressions like [a-z] | [A-Z] are interpreted as one atomic class
[a-zA-Z], reducing NFA states and generation time significantly
(feature request #144)
- implemented faster character classes (feature request #143).
Expressions like `[a-z] | [A-Z]` are interpreted as one atomic class
`[a-zA-Z]`, reducing NFA states and generation time significantly
for some specifications. This affects the generation process only,
generated scanners remain the same.
- new %apiprivate switch (feature request #513500/1) that causes all
- new %apiprivate switch (feature request #141/1) that causes all
generated and skeleton methods to be made private. Exceptions to this
are user defined functions and the constructor. Thanks to Stephen
Ostermiller for the suggestion.
- allow user defined javadoc class comments (feature request #513500/2)
- allow user defined javadoc class comments (feature request #141/2)
If the user code section ends with a javadoc comment, JFlex takes this
instead of the generated comment. Thanks to Stephen Ostermiller for
the suggestion.
- fixed bug #491095 (undefined macros in complement expressions do
- fixed bug #50 (undefined macros in complement expressions do
not throw exception in generator). Thanks to Stephen Ostermiller
for the bug report.
- fixed bug #495422 (yypushStream/yypopStream in skeleton.nested
- fixed bug #51 (yypushStream/yypopStream in skeleton.nested
work as advertised)
- fixed bug #611118 (no wrong macro warnings on regexp negation)
- fixed bug #655528 (%cupsym now also affects %cupdebug)
- fixed bug #57 (no wrong macro warnings on regexp negation)
- fixed bug #58 (%cupsym now also affects %cupdebug)
Thanks to Eric Schweitz for the fix.
- fixed bug #510010 (single-line %initthrow works now
- fixed bug #52 (single-line %initthrow works now
in case of extra whitespace before newline)
- yyreset() does no longer close the associated reader (use yyclose()
explicitly for that). Makes some reader objects reusable (feature
request #513492). Thanks to Stephen Ostermiller for the suggestion.
request #140). Thanks to Stephen Ostermiller for the suggestion.
- fixed modifier order in generated code, removes jikes compiler warnings
Thanks to Michael Wildpaner for the fix.
- ant task now also works with ant >= 1.4 (fixes bug #526905)
- yyreset() does not declare an execption any more (fixes bug #913132)
- %cup does not include %eofclose in JLex mode (--jlex). (Fixes bug #910562)
- ant task now also works with ant >= 1.4 (fixes bug #54)
- yyreset() does not declare an execption any more (fixes bug #65)
- %cup does not include %eofclose in JLex mode (--jlex). (Fixes bug #63)
- optional parameter to %eofclose: "%eofclose false" turns off %eofclose if
it was turned on previously (e.g. by %cup). (Fixes bug #910562)
it was turned on previously (e.g. by %cup). (Fixes bug #63)
- jflex build script switched to ant
- internal: central Options class for better integration with
build tools and IDEs
......@@ -158,7 +171,7 @@
## JFlex 1.3.5 (October 8, 2001)
- fixed all bugs reported for version 1.3.4. Thanks to
Amin Ahmad and Fred Wehrhahn for their excellent bug reports.
- implemented feature request #459014: vim syntax file.
- implemented feature request #137: vim syntax file.
Thanks to Michael Brailsford for his help and suggestions.
- JFlex should run with JDK 1.1 out-of-the-box again.
......@@ -166,13 +179,13 @@
## JFlex 1.3.4 (October 1, 2001)
- fixed all bugs reported for version 1.3.3. Thanks to Mike Akerman
for his excellent bug reports and his help.
- implemented feature request #459355: exclusive start states.
- implemented feature request #138: exclusive start states.
Thanks to Ed Beroset for the suggestion.
- introduced %s and %x shorthands for state declarations
## JFlex 1.3.3 (September 21, 2001)
- fixed all reported bugs except #39 (lookahead check at generation
- fixed all reported bugs except #40 (lookahead check at generation
time may fail). Thanks to Axel Schwolow, Karl Meissner, Angelo
Borsotti, and Paolo Di Francesco for their excellent bug reports.
- enhanced %debug output. JFlex scanners in debug mode now print line,
......@@ -213,7 +226,7 @@
## JFlex 1.3.2 (February 24, 2001)
- fixed bug #32 (this time for real). Thanks to Thilo Goetz for
- fixed bug #31 (this time for real). Thanks to Thilo Goetz for
his quick report.
- updated the binary scanning example with the more comprehensive and
usable class StraightStreamReader by Stephen Ostermiller. Thanks go to
......@@ -233,7 +246,7 @@
## JFlex 1.3.1 (February 20, 2001)
- fixed all JFlex bugs reported for 1.3 (bugs #32-#36)
- fixed all JFlex bugs reported for 1.3 (bugs #31-#35)
Thanks to Hans Kratz, Vasily Karyaev, Alexey Yakovets, and Tom Moog for
their excellent reports.
- added two new example scanners:
......@@ -261,7 +274,7 @@
## JFlex 1.3 (October 21, 2000)
- Fixed all bugs reported for 1.2.2 (bugs #23-#27).
- Fixed all bugs reported for 1.2.2 (bugs #20-#28).
- Better start script for Linux.
- Customize for internal error handling in yy_ScanError.
- Empty charclass [], and any (=negated empty) charclass [^].
......@@ -289,7 +302,7 @@ _ BYacc/J support (%byaccj) + BYacc/J example.
## JFlex 1.2.1 (June 25, 1999)
- Fixed all bugs reported for version 1.2 (#19-#22).
- Fixed all bugs reported for version 1.2 (#17-#19).
- Webpage redesigned and moved to http://www.jflex.de.
- Example java lexer/parser switched to Java 1.2.
......
jflex (1.7.0-1) unstable; urgency=medium
* New upstream version 1.7.0.
* Rebase patches for new release.
* Tighten B-D on cup.
* Declare compliance with Debian Policy 4.2.1.
* Add encoding.patch and fix the FTBFS.
* Update debian/docs for new release.
-- Markus Koschany <apo@debian.org> Mon, 01 Oct 2018 13:37:22 +0200
jflex (1.6.1-3) unstable; urgency=medium
* Use compat level 11.
......
......@@ -6,13 +6,14 @@ Uploaders:
Markus Koschany <apo@debian.org>
Build-Depends:
ant,
cup,
cup (>= 0.11b-20160615-2),
debhelper (>= 11),
default-jdk,
javahelper,
jflex (>= 1.6.1),
junit,
maven-repo-helper
Standards-Version: 4.1.3
Standards-Version: 4.2.1
Vcs-Git: https://anonscm.debian.org/git/pkg-java/jflex.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/jflex.git
Homepage: http://www.jflex.de/
......@@ -21,6 +22,7 @@ Package: jflex
Architecture: all
Depends:
default-jre-headless | java7-runtime-headless,
${java:Depends},
${misc:Depends}
Enhances:
ant-optional
......
doc/*.png
doc/jflex_anttask.html
doc/fig
doc/manual*
examples
From: Markus Koschany <apo@debian.org>
Date: Wed, 27 Jul 2016 06:17:03 +0200
Date: Sun, 30 Sep 2018 21:17:43 +0200
Subject: build
Adjust the build system for Debian.
......@@ -10,11 +10,11 @@ Forwarded: not-needed
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml
index 777fd81..00a940e 100644
index 5c53039..b25e954 100644
--- a/build.xml
+++ b/build.xml
@@ -14,8 +14,8 @@
<property name="lib.dir" value="lib"/>
@@ -21,8 +21,8 @@
<property name="m2repo" value="${env.HOME}/.m2/repository" />
<!-- override these if you want to use your own versions -->
- <property name="bootstrap.jflex.jar" value="${lib.dir}/jflex-${bootstrap.version}.jar" />
......@@ -24,12 +24,12 @@ index 777fd81..00a940e 100644
<property name="junit.jar" value="${lib.dir}/junit-${junit.version}.jar" />
<!-- where to get tool jars from -->
@@ -78,6 +78,8 @@
@@ -91,6 +91,8 @@
description="generate sources and compile all non-test classes">
<mkdir dir="${compile.output.dir}" />
<javac destdir="${compile.output.dir}"
+ source="1.7"
+ target="1.7"
debug="on"
includeantruntime="true">
<src path="src/main/java"/>
includeantruntime="true"
classpath="${cup.jar}">
From: Markus Koschany <apo@debian.org>
Date: Mon, 1 Oct 2018 13:32:25 +0200
Subject: encoding
debian/ant.properties does not work. FIXME!
---
build.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/build.xml b/build.xml
index b25e954..1a9776f 100644
--- a/build.xml
+++ b/build.xml
@@ -94,6 +94,7 @@
source="1.7"
target="1.7"
debug="on"
+ encoding="ISO-8859-1"
includeantruntime="true"
classpath="${cup.jar}">
<src path="src/main/java"/>
From: Markus Koschany <apo@debian.org>
Date: Mon, 1 Oct 2018 18:09:55 +0200
Subject: inputstreamctor
Upstream uses the older 1.6.1 version to bootstrap jflex. Since inputstreamctor
was removed in version 1.7.0 we have to make this adjustment.
Forwarded: not-needed
---
src/main/jflex/LexScan.flex | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/main/jflex/LexScan.flex b/src/main/jflex/LexScan.flex
index 72ec62d..434b2d2 100644
--- a/src/main/jflex/LexScan.flex
+++ b/src/main/jflex/LexScan.flex
@@ -42,8 +42,6 @@ import jflex.unicode.UnicodeProperties;
%state CTOR_ARG, REGEXP_CODEPOINT_SEQUENCE
%state STRING_CODEPOINT_SEQUENCE, CHARCLASS_CODEPOINT
-%inputstreamctor false
-
%cupdebug
%{
From: Markus Koschany <apo@debian.org>
Date: Wed, 27 Jul 2016 06:59:36 +0200
Date: Sun, 30 Sep 2018 21:18:55 +0200
Subject: jflex executable
Fix path to jflex.jar.
......@@ -10,12 +10,12 @@ Forwarded: not-needed
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/jflex b/bin/jflex
index 8ad97f1..2879f43 100755
index a3426b3..cf4c116 100755
--- a/bin/jflex
+++ b/bin/jflex
@@ -42,4 +42,4 @@ JFLEX_HOME=${PRG}/..
@@ -45,4 +45,4 @@ JFLEX_HOME=${PRG}/..
# --------------------------------------------------------------------
-$JAVA -Xmx128m -jar $JFLEX_HOME/lib/jflex-1.6.1.jar $@
-$JAVA -Xmx128m -jar "$JFLEX_HOME"/lib/jflex-full-${JFLEX_VERSION}.jar $@
+$JAVA -Xmx128m -jar /usr/share/java/jflex.jar $@
build.patch
jflex-executable.patch
encoding.patch
inputstreamctor.patch
#!/usr/bin/make -f
export JAVA_HOME := /usr/lib/jvm/default-java
export CLASSPATH := /usr/share/java/cup.jar:/usr/share/java/cup_runtime.jar
%:
dh $@ --with maven_repo_helper
dh $@ --with javahelper,maven_repo_helper
override_dh_auto_build:
mkdir -p build/generated-sources/jflex
......@@ -23,6 +24,10 @@ override_dh_auto_clean:
override_dh_installchangelogs:
dh_installchangelogs changelog.md
override_dh_installdocs:
$(RM) $(CURDIR)/examples/.gitignore
dh_installdocs
get-orig-source:
uscan --download-current-version --force-download --repack --compression xz
No preview for this file type
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>JFlex Ant Task</title>
</head>
<body>
<h2><a name="JFlex">JFlex Ant Task</a></h2>
<p>
JFlex can easily be integrated with the <a HREF="http://ant.apache.org/"
target="_top">Ant</a> build tool.
To use JFlex with Ant, simply copy the lib/jflex-version.jar file to the <i>$ANT_HOME/lib/</i> directory
or explicitly set the path to it in the ant task definition (see example below).
</p>
<h3>Description</h3>
<p>
The JFlex Ant Task invokes the <a HREF="http://jflex.de/" target="_top">JFlex</a> lexical
analyzer generator on a grammar file.
</p>
<p>
To use the JFlex task, the following line must be placed in the Ant build file:
</p>
<pre>&lt;taskdef classname=&quot;jflex.anttask.JFlexTask&quot; name=&quot;jflex&quot; /&gt;</pre>
<p>
Or, setting the path to the JFlex jar explicitly:
</p>
<pre>&lt;taskdef classname=&quot;jflex.anttask.JFlexTask&quot; name=&quot;jflex&quot; classpath=&quot;path-to-jflex.jar&quot; /&gt;</pre>
<p>
The JFlex task requires the <i>file</i> attribute to be set to the source grammar file (*.flex).
Unless the target directory is specified with the <i>destdir</i> option,
the generated class will be saved to the same directory where the grammar file resides.
Like javac, the JFlex task creates subdirectories in <i>destdir</i> according to the
generated class package.
</p>
<p>
This task only invokes JFlex if the grammar file is newer than the generated
files.
</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0" width="80%">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
<td align="center" valign="top"><b>Default</b></td>
</tr>
<tr>
<td valign="top">file="file"</td>
<td valign="top">The grammar file to process.</td>
<td valign="top" align="center">Yes</td>
<td></td>
</tr>
<tr>
<td valign="top">destdir="dir"</td>
<td valign="top">
The directory to write the generated files to. If not set, the files
are written to the directory containing the grammar file. Note that unlike
JFlex's "-d" command line option, <i>destdir</i> causes the generated file to be written to
{destdir}/<b>{package name}</b>. This behaviour is similar to <i>javac -d dir</i>.
</td>
<td valign="top" align="center">No</td>
<td></td>
</tr>
<tr>
<td valign="top">outdir="dir"</td>
<td valign="top">
The directory to write the generated files to. If not set, the files
are written to the directory containing the grammar file. This options works
exactly like JFlex's "-d" command line option, it causes the output file to
be written to <i>dir</i> regardless of the package name.
</td>
<td valign="top" align="center">No</td>
<td></td>
</tr>
<tr>
<td valign="top">verbose</td>
<td valign="top">Display generation process messages.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">dump</td>
<td valign="top">Dump character classes, NFA and DFA tables.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">time or<p>timeStatistics</td>
<td valign="top">Display generation time statistics.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">nomin or<p>skipMinimization</td>
<td valign="top">Skip minimization step.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">skel="file" or<p>skeleton="file"</td>
<td valign="top">Use external skeleton file.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">dot or<p>generateDot</td>
<td valign="top">Write graphviz .dot files for the generated automata (alpha).</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">nobak</td>
<td valign="top">Do not make a backup if the generated file exists.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">legacydot</td>
<td valign="top">Dot (.) metacharacter matches <tt>[^\n]</tt>
instead of <tt>[^\n\r\u000B\u000C\u0085\u2028\u2029]</tt></td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;off&quot;</td>
</tr>
<tr>
<td valign="top">noinputstreamctor</td>
<td valign="top">Don't include an InputStream constructor in the generated scanner</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;true&quot;</td>
</tr>
<tr>
<td valign="top">unusedwarning</td>
<td valign="top">Warn about unused macro definitions in the lexer specification.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">&quot;true&quot;</td>
</tr>
</table>
<h3>Example</h3>
<blockquote><pre>
&lt;jflex
file=&quot;src/parser/Parser.flex&quot;
destdir=&quot;build/generated/&quot;
/&gt;
</pre></blockquote>
<p>
JFlex generates the lexical analyzer for <tt>src/parser/Parser.flex</tt> and saves the result
to <tt>build/generated/parser/</tt>, providing <tt>Parser.flex</tt> is declared to be in package <tt>parser</tt>.
</p>
<blockquote><pre>
&lt;jflex
file=&quot;src/parser/Parser.flex&quot;
destdir=&quot;build/generated/&quot;
/&gt;
&lt;javac
srcdir=&quot;build/generated/&quot;
destdir=&quot;build/classes/&quot;
/&gt;
</pre></blockquote>
<p>
The same as above plus compile generated classes to <i>build/classes</i>
</p>
<hr>
</body>
</html>