Tools for rapid prototyping of DSL compilers
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples fmt: more tests Nov 2, 2018
raddsl cons, uzh info Oct 21, 2018
.gitignore dsl-tools -> raddsl Oct 6, 2018
LICENSE dsl-tools -> raddsl Oct 6, 2018
README.md regexp Dec 13, 2018
setup.py dsl-tools -> raddsl Oct 6, 2018

README.md

raddsl

raddsl is a toolset for rapid prototyping of DSL compilers.

It consists of two combinator-based libraries (embedded DSLs) written in Python:

  1. parse.py for lexical and syntax analysis (PEG, Pratt parser).
  2. 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).

See also:

  • 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)

Documentation:

Moscow Python Conf++ slides (in Russian)