baishaojie dcf2cbd820 first commit 11 сар өмнө
..
ast dcf2cbd820 first commit 11 сар өмнө
auth dcf2cbd820 first commit 11 сар өмнө
charset dcf2cbd820 first commit 11 сар өмнө
format dcf2cbd820 first commit 11 сар өмнө
model dcf2cbd820 first commit 11 сар өмнө
mysql dcf2cbd820 first commit 11 сар өмнө
opcode dcf2cbd820 first commit 11 сар өмнө
terror dcf2cbd820 first commit 11 сар өмнө
types dcf2cbd820 first commit 11 сар өмнө
.editorconfig dcf2cbd820 first commit 11 сар өмнө
.gitignore dcf2cbd820 first commit 11 сар өмнө
LICENSE dcf2cbd820 first commit 11 сар өмнө
Makefile dcf2cbd820 first commit 11 сар өмнө
README.md dcf2cbd820 first commit 11 сар өмнө
checkout-pr-branch.sh dcf2cbd820 first commit 11 сар өмнө
circle.yml dcf2cbd820 first commit 11 сар өмнө
codecov.yml dcf2cbd820 first commit 11 сар өмнө
digester.go dcf2cbd820 first commit 11 сар өмнө
go.mod dcf2cbd820 first commit 11 сар өмнө
go.sum dcf2cbd820 first commit 11 сар өмнө
hintparser.go dcf2cbd820 first commit 11 сар өмнө
hintparser.y dcf2cbd820 first commit 11 сар өмнө
hintparserimpl.go dcf2cbd820 first commit 11 сар өмнө
lexer.go dcf2cbd820 first commit 11 сар өмнө
misc.go dcf2cbd820 first commit 11 сар өмнө
parser.go dcf2cbd820 first commit 11 сар өмнө
parser.y dcf2cbd820 first commit 11 сар өмнө
test.sh dcf2cbd820 first commit 11 сар өмнө
yy_parser.go dcf2cbd820 first commit 11 сар өмнө

README.md

Parser - A MySQL Compatible SQL Parser

Go Report Card CircleCI Status GoDoc codecov

The goal of this project is to build a Golang parser that is fully compatible with MySQL syntax, easy to extend, and high performance. Currently, features supported by parser are as follows:

  • Highly compatible with MySQL: it supports almost all features of MySQL. For the complete details, see parser.y and hintparser.y.
  • Extensible: adding a new syntax requires only a few lines of Yacc and Golang code changes. As an example, see PR-680.
  • Good performance: the parser is generated by goyacc in a bottom-up approach. It is efficient to build an AST tree with a state machine.

How to use it

Please read the quickstart.

Future

  • Support more MySQL syntax
  • Optimize the code structure, make it easier to extend
  • Improve performance and benchmark
  • Improve the quality of code and comments

Getting Help

If you have any questions, feel free to discuss in sig-ddl. Here are the steps to join:

  1. Join TiDB Slack community, and then
  2. Join sig-ddl Slack channel.

If you want to join as a special interest group member, see DDL Special Interest Group.

Users

These projects use this parser. Please feel free to extend this list if you found you are one of the users but not listed here:

Contributing

Contributions are welcomed and greatly appreciated. See Contribution Guide for details on submitting patches and the contribution workflow.

Here is how to update parser for TiDB.

Acknowledgments

Thanks cznic for providing some great open-source tools.

License

Parser is under the Apache 2.0 license. See the LICENSE file for details.

More resources