Skip to content

Commit 0ac4a79

Browse files
authored
chore: claude.md (#11)
1 parent 6e84a1e commit 0ac4a79

File tree

2 files changed

+48
-132
lines changed

2 files changed

+48
-132
lines changed

CLAUDE.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Parser Development Guide
2+
3+
This project contains multiple SQL parsers built with ANTLR 4 for different database dialects.
4+
5+
## Parser Structure
6+
7+
Each parser is organized in its own directory containing:
8+
- ANTLR grammar files (`.g4`)
9+
- Generated Go parser/lexer files
10+
- Test files and examples
11+
- Individual `Makefile` for build/test commands
12+
13+
## Generating Parsers
14+
15+
**IMPORTANT**: Always generate the parser after completing any grammar changes.
16+
17+
```bash
18+
cd <parser-directory>/
19+
make build
20+
```
21+
22+
The `make build` command:
23+
1. Runs ANTLR to generate Go code from `.g4` grammar files
24+
2. Creates lexer, parser, listener, and visitor files
25+
3. Must be run before testing after any grammar modifications
26+
27+
## Running Tests
28+
29+
**IMPORTANT**: Always run golang tests after generating the parser.
30+
31+
```bash
32+
cd <parser-directory>/
33+
make test
34+
```
35+
36+
## Development Workflow
37+
38+
1. **Make grammar changes** to `.g4` files
39+
2. **Generate parser** using `make build` in the specific parser directory
40+
3. **Run tests** using `make test` to verify changes
41+
4. **Add test cases** in the `examples/` directory for new features
42+
43+
## Notes
44+
45+
- Each parser directory has its own `Makefile` with `build` and `test` targets
46+
- The `make all` target in each directory runs both build and test
47+
- Always regenerate parsers after modifying grammar files
48+
- Test files are located in each parser's `examples/` directory

redshift/CLAUDE.md

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)