Java implementation of the Earley recognizer