A simple C++ RSQL parser. It uses the visitor patter to allow using it for your custom needs.
Go to file
Sascha Kühl 617ca05b2d updated README.md 2025-10-10 12:39:03 +02:00
include/matador/rsql initial commit 2025-10-10 12:29:17 +02:00
src initial commit 2025-10-10 12:29:17 +02:00
.gitignore initial commit 2025-10-10 12:29:17 +02:00
CMakeLists.txt initial commit 2025-10-10 12:29:17 +02:00
README.md updated README.md 2025-10-10 12:39:03 +02:00

README.md

RSQL Parser (C++) with SQL WHERE Generator

A simple C++ RSQL parser. It uses the visitor patter to allow using it for your custom needs.

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:

mkdir build && cd build
cmake ..
cmake --build .

Run (example):

./rsql_parser "(status=in=(OPEN,CLOSED);priority==HIGH),category=out=(internal,test)"

The program prints the AST (evaluator) and the generated SQL WHERE clause.