Grammars

The grammars have been pulled from the following sources:

Grammar Last Retrieved URL
MySQL 2020/08/01 https://github.com/mysql/mysql-workbench/tree/8.0/library/parsers/grammars
T-SQL 2021/03/03 https://github.com/antlr/grammars-v4/tree/master/sql
PL/SQL 2021/03/03 https://github.com/antlr/grammars-v4/tree/master/sql
PL/pgSQL 2021/03/03 https://github.com/pgcodekeeper/pgcodekeeper/tree/master/apgdiff/antlr-src

We generate directly from the grammars supplied by those sources and make no modifications to them (this makes it easier to stay up to date). Some grammars use in-line code or base classes that must be added in after generating the parsers and lexers. Instructions for individual grammars are described in the Building section.

Are our grammars out of date?

If you notice that the above grammars have been updated since we last retrieved them, please open an issue to let us know or open a pull request with the change. We’ll update the repository as soon as possible!