JFlex - The Fast Scanner Generator for Java


Current stable version is JFlex 1.6.1 released on Mar 16, 2015


[2015-03-16]     JFlex 1.6.1 released! See below for release notes.

[2015-02-28]     JFlex code repository and issue tracker have moved to github!

[2014-06-20]     JFlex 1.6 released! See below for release notes.

[2014-03-21]     JFlex 1.5.1 released.

[2014-01-21]     It's been a long time coming: JFlex 1.5 is out!

[2009-01-31]     JFlex 1.4.3 released.

[2007-10-29]     There now exists a JFlex Maven plugin, contributed by Régis Décamps. It integrates JFlex into the Maven software project management tool.

What is it?

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.

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.

Features of JFlex.

Is it free?

Yes. It is released under a permissive open-source BSD-style license and available for free download. See also Copyright, License & Warranty.

What's new in version 1.6.1?

Version 1.6.1 is a maintenance release. It fixes all known defects of version 1.6.0.

  • 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.
  • 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": Empty-string matches were taking precedence over EOF and caused non-termination. Now EOF is counted as the highest-priority empty match.
  • New warning when an expression matches the empty string (can lead to non-termination).

What's new in version 1.6?

Version 1.6 further improves Unicode support, including Unicode version 7.0. Further high-level changes are:
  • In %unicode mode, supplementary code points are now handled as single characters, rather than two code-units/chars.
  • New \u{…} escape sequence allows code points (and whitespace-separated sequences of code points) to be specified as 1–6 hexadecimal digit values.
  • 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.

See also the change log file for the complete list of changes.


What's new on these pages?

There is a list of files on this website ordered by modification date.

What platforms does JFlex support?

JFlex should run on any platform that supports a JRE/JDK 1.5 or above.

Java is a trademark of Sun Microsystems. JFlex is not sponsored by or affiliated with Sun Microsystems

most recently modified at 2015-03-16 14:28 UTC by Gerwin Klein