Hibernate uses ANTLR for sql and hql parsing.
JSqlParser is also a good option.although it has some bugs(or some features not implemented) while parsing oracle pl/sql.
see its forum for detail.
so if you're parsing oracle pl/sql, ANTLR is recommended.