The plsql-parser is a parser for MariaDB. It is based on the ANTLR4 and use the grammar from antlr4-grammars-plsql.
Before build, you need to install the ANTLR4.
requirements:
- https://github.com/antlr/antlr4/blob/master/doc/getting-started.md
- https://github.com/antlr/antlr4/blob/master/doc/go-target.md
./build.sh- run
./build.shto generate the parser code.
- Clone the
MariaDBLexer.g4andMariaDBParser.g4grammar files from https://github.com/antlr/grammars-v4/tree/master/sql/mariadb. - run
./build.shto generate the parser code.
Run TestMariaDBSQLParser in parser_test.go to test the parser.
go test -v- ANTLR4 Getting Started https://github.com/antlr/antlr4/blob/master/doc/getting-started.md
- ANTLR4 Go Garget https://github.com/antlr/antlr4/blob/master/doc/go-target.md