JFlex is a lexical analyzer generator (also known as scanner
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 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.