Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

bytebase/mariadb-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The plsql-parser is a parser for MariaDB. It is based on the ANTLR4 and use the grammar from antlr4-grammars-plsql.

Build

Before build, you need to install the ANTLR4.

requirements:

./build.sh

Update grammar

Manually change the grammar file in this project

  1. run ./build.sh to generate the parser code.

From antlr4-grammars-plsql

  1. Clone the MariaDBLexer.g4 and MariaDBParser.g4 grammar files from https://github.com/antlr/grammars-v4/tree/master/sql/mariadb.
  2. run ./build.sh to generate the parser code.

Test the parser

Run TestMariaDBSQLParser in parser_test.go to test the parser.

go test -v

References

Releases

No releases published

Packages

No packages published