Is there an open-source Java library for parsing SQL statements?
If possible, it should be customizable or flexible enough to also be able to parse (or at least ignore) vendor-specific syntax (such as Oracle tablespace definitions or MySQL's LIMIT clause).
If not, strict adherence to the SQL standard is also fine.
Update: I need this for two things:
ANTLR3 has an ANSI SQL grammar available. You can use that to create your own parser.
ANTLR4 has a SQL grammar.