antlr4 sql grammar

As of Feb/6/2017, there is ANTLR4 file for t-sql, but it is community maintained, and not complete, I found many SQL statements valid to SQLServer but not able to be parsed by this grammar.


No, at the time of this writing, there is no v4 SQL grammar.

All v4 grammar will be put into the following Github repository (as far as I can remember from the ANTLR mailing list): https://github.com/antlr/grammars-v4

The v3 grammars here now: http://antlr3.org/grammar/list.html

EDIT - April 2018

There is now a user contributed MySQL grammar here: [dead link removed]

EDIT - February 2020

MySQL, T-SQL, PL/SQL, and SQLite grammars are all available here: https://github.com/antlr/grammars-v4/tree/master/sql


Currently, there are plenty of sql grammars for v4 as well:

  1. MySQL
  2. PL/SQL
  3. T-SQL (Microsoft SQL Server) by KvanTTT

Tags:

Antlr4