Skip to content

feat: add MySQL parser to monorepo#30

Merged
h3n4l merged 1 commit into
mainfrom
add-mysql-parser
Nov 3, 2025
Merged

feat: add MySQL parser to monorepo#30
h3n4l merged 1 commit into
mainfrom
add-mysql-parser

Conversation

@h3n4l
Copy link
Copy Markdown
Member

@h3n4l h3n4l commented Nov 3, 2025

Summary

  • Migrates the MySQL parser from standalone mysql-parser repository
  • Adds comprehensive test coverage with 24 SQL example files
  • Updates CI workflow to include mysql in test matrix
  • All tests passing successfully

Changes

  • Added MySQL grammar files (MySQLLexer.g4, MySQLParser.g4)
  • Added helper files (builtin_functions.go, keywords.go, mysql_base_lexer.go)
  • Added predefined.tokens file required by the lexer
  • Added 24 test examples covering DDL, DML, and other MySQL statements
  • Created Makefile for building and testing the parser
  • Updated package names from parser to mysql
  • Updated import paths to github.com/bytebase/parser/mysql
  • Updated .github/workflows/tests.yml to include mysql parser
  • Generated parser files using ANTLR 4 with Go target

Test plan

  • All 24 MySQL parser tests passing
  • Parser generation successful with ANTLR 4
  • CI workflow updated to include mysql parser
  • Package names and imports updated correctly

🤖 Generated with Claude Code

This commit adds the MySQL parser from the standalone mysql-parser repository into the unified parser monorepo.

Changes:
- Added MySQL grammar files (MySQLLexer.g4, MySQLParser.g4)
- Added helper files (builtin_functions.go, keywords.go, mysql_base_lexer.go)
- Added predefined.tokens file for lexer
- Added test infrastructure with 24 example SQL files
- Created Makefile for building and testing the parser
- Updated package names from 'parser' to 'mysql'
- Updated import paths to github.com/bytebase/parser/mysql
- Updated CI workflow to include mysql in the test matrix
- Generated parser files using ANTLR 4 with Go target
- All 24 tests passing successfully

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@h3n4l h3n4l merged commit fc6ae35 into main Nov 3, 2025
5 checks passed
@h3n4l h3n4l deleted the add-mysql-parser branch November 3, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant