Skip to content

Commit da5da3c

Browse files
h3n4lclaude
andcommitted
feat: add MariaDB parser to monorepo
This commit adds the MariaDB parser from the standalone mariadb-parser repository into the unified parser monorepo. Changes: - Added MariaDB grammar files (MariaDBLexer.g4, MariaDBParser.g4) - Added test infrastructure with 22 example SQL files - Created Makefile for building and testing the parser - Updated package names from 'parser' to 'mariadb' - Updated import paths to github.com/bytebase/parser/mariadb - Updated CI workflow to include mariadb in the test matrix - Generated parser files using ANTLR 4 with Go target - All 22 tests passing successfully 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent bc210c6 commit da5da3c

34 files changed

+167328
-1
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
id: set-matrix
3535
run: |
3636
# List of all available parsers
37-
ALL_PARSERS="redshift postgresql cql snowflake tsql doris trino plsql googlesql mysql partiql tidb bq"
37+
ALL_PARSERS="redshift postgresql cql snowflake tsql doris trino plsql googlesql mysql partiql tidb bq mariadb"
3838
# Add more parsers here as they are added to the repository
3939
# ALL_PARSERS="redshift mysql postgresql"
4040

mariadb/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
all: build test
2+
3+
build:
4+
antlr -Dlanguage=Go -package mariadb -visitor -o . MariaDBLexer.g4 MariaDBParser.g4
5+
6+
test:
7+
go test -v -run TestMariaDBSQLParser

mariadb/MariaDBLexer.g4

Lines changed: 1391 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)