Skip to content

Commit

Permalink
Here's the full Oracle MySQL grammar (#4103)
Browse files Browse the repository at this point in the history
* Replace the simple readme for Oracle's MySQL grammars with the full grammar

This patch comes not only with the grammars, but also with a TypeScript implementation of 2 support classes and a demo.

* Also added the new grammar to the top level json.

* Simplified copyrights

* Generated files are now kept in the main folder

This avoids imports with paths.

* Trying to fix the tests by using a different folder name

* Fixed wrong folder name

* Going back to the original structure

Setting up testing for the grammars requires too much effort. That's why I removed the TypeScript (antlr4ng) target from desc.xml in the hope this would prevent a test run.

* Removed a class member not related to this grammar
  • Loading branch information
mike-lischke authored May 21, 2024
1 parent 1632e26 commit 438da1e
Show file tree
Hide file tree
Showing 14 changed files with 9,888 additions and 38 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ out
# Ignore downloaded temporaries create by _scripts/get-antlr.ps1
antlr4-*-complete.jar

node_modules
package-lock.json
11 changes: 11 additions & 0 deletions grammars.json
Original file line number Diff line number Diff line change
Expand Up @@ -5366,6 +5366,17 @@
"/smoke_tests.sql"
]
},
{
"name": "MySQL",
"lexer": "https://raw.githubusercontent.com/antlr/grammars-v4/master/sql\\mysql\\Oracle/MySQLLexer.g4",
"parser": "https://raw.githubusercontent.com/antlr/grammars-v4/master/sql\\mysql\\Oracle/MySQLParser.g4",
"start": "root",
"example": [
"/bitrix_queries_cut.sql",
"/sakila-data.sql",
"/statements.sql",
]
},
{
"name": "Phoenix",
"lexer": "https://raw.githubusercontent.com/antlr/grammars-v4/master/sql\\phoenix/PhoenixLexer.g4",
Expand Down
Loading

0 comments on commit 438da1e

Please sign in to comment.