JFlex Logo

JFlex

The current stable version is JFlex 1.6.1 released on Mar 16, 2015

The current maven jflex plugin is version 1.6.1.

See the changelog.


What is it?

JFlex is a lexical analyzer generator (also known as scanner generator) for Java, written in Java.

A lexical analyzer generator takes as input a specification with a set of regular expressions and corresponding actions. It generates a program (a lexer) that reads input, matches the input against the regular expressions in the spec file, and runs the corresponding action if a regular expression matched. Lexers usually are the first front-end step in compilers, matching keywords, comments, operators, etc, and generating an input token stream for parsers. Lexers can also be used for many other purposes.

JFlex lexers are based on deterministic finite automata (DFAs). They are fast, without expensive backtracking.

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.


News

2015-04-06: New website design. Enjoy!

2015-03-16: JFlex 1.6.1 released.

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

2014-06-20: JFlex 1.6 released.

2014-03-21: JFlex 1.5.1 released.

2014-01-21: It’s been a long time coming: JFlex 1.5 released!

2009-01-31: JFlex 1.4.3 released.

2007-10-29: A new JFlex Maven plugin allows to generate the lexer during the generate-sources phase of Maven.


Stay informed

jflex-announce is a mailing-list for notification on new JFlex releases and severe bugs. This list is read only and very low traffic. Your email address will be kept private.


JFlex is free

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


What platforms does JFlex support?

JFlex generates the scanner on platforms that supports JDK 6 or above.

The generated scanner runs with JRE 5 or above.