rsql-parser/README.md

21 lines
575 B
Markdown

# RSQL Parser (C++) with SQL WHERE Generator
This small example demonstrates:
- A lexer + parser for a subset of RSQL (supports `;` AND, `,` OR, parentheses).
- `=in=` and `=out=` list operators.
- An AST implementing `accept()` for the Visitor pattern.
- A `SQLBuilderVisitor` that generates an SQL `WHERE` clause.
Build:
```bash
mkdir build && cd build
cmake ..
cmake --build .
```
Run (example):
```bash
./rsql_parser "(status=in=(OPEN,CLOSED);priority==HIGH),category=out=(internal,test)"
```
The program prints the AST (evaluator) and the generated SQL WHERE clause.