https://github.com/bytebase/doris-parser
Doris parser based on ANTLR4
https://github.com/bytebase/doris-parser
Last synced: 7 months ago
JSON representation
Doris parser based on ANTLR4
- Host: GitHub
- URL: https://github.com/bytebase/doris-parser
- Owner: bytebase
- Created: 2025-05-12T02:10:27.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-05-12T08:07:08.000Z (8 months ago)
- Last Synced: 2025-06-13T21:48:36.299Z (7 months ago)
- Language: ANTLR
- Size: 1.5 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The doris-parser is a parser for DORIS SQL. It is based on the [ANTLR4](https://github.com/antlr/antlr4).
## Build
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
```bash
./build.sh
```
## Update grammar
### Manually change the grammar file in this project
1. run `./build.sh` to generate the parser code.
## Test the parser
Run `TestDorisSQLDBSQLParser` in `parser_test.go` to test the parser.
```bash
go test -v
```
## References
- 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