Skip to content

feat: add TiDB parser to monorepo#32

Merged
h3n4l merged 1 commit intomainfrom
add-tidb-parser
Nov 3, 2025
Merged

feat: add TiDB parser to monorepo#32
h3n4l merged 1 commit intomainfrom
add-tidb-parser

Conversation

@h3n4l
Copy link
Member

@h3n4l h3n4l commented Nov 3, 2025

Summary

  • Migrates the TiDB parser from standalone tidb-parser repository
  • Adds test coverage with 2 SQL example files
  • Updates CI workflow to include tidb in test matrix
  • All tests passing successfully

Changes

  • Added TiDB grammar files (TiDBLexer.g4, TiDBParser.g4)
  • Added helper file (tidb_base_lexer.go)
  • Added predefined.tokens file required by the lexer
  • Added 2 test examples (ddl_table.sql, ddl_view.sql)
  • Created Makefile for building and testing the parser
  • Updated package names from parser to tidb
  • Updated import paths to github.com/bytebase/parser/tidb
  • Updated .github/workflows/tests.yml to include tidb parser
  • Generated parser files using ANTLR 4 with Go target

Test plan

  • All 2 TiDB parser tests passing
  • Parser generation successful with ANTLR 4
  • CI workflow updated to include tidb parser
  • Package names and imports updated correctly

🤖 Generated with Claude Code

This commit adds the TiDB parser from the standalone tidb-parser repository into the unified parser monorepo.

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

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

Co-Authored-By: Claude <noreply@anthropic.com>
@h3n4l h3n4l merged commit 62f17e5 into main Nov 3, 2025
5 checks passed
@h3n4l h3n4l deleted the add-tidb-parser branch November 3, 2025 10:06
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