jflex

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