raddsl is a toolset for rapid prototyping of DSL compilers.
It consists of two combinator-based libraries (embedded DSLs) written in Python:
- parse.py for lexical and syntax analysis (PEG, Pratt parser).
- rewrite.py for AST transformations and code generation (strategic term rewriting).
raddsl is inspired by:
See examples folder for some examples of use of raddsl (code formatter, PL0 to Python translator, JSON parser etc).
- PigletC (a toy C-like language compiler for PigletVM)
- Uzh (a tiny compiler for FPGA soft processor, Uzh language is a statically compiled subset of Python)
- Regexp (a regular expressions compiler by @vkazanov)