-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Ruby is known as a cradle of embedded DSLs. Although the code of typical DSLs embedded in Ruby is executed by the Ruby VM, this framework helps the embedded DSL code run by its dedicated execution engine such as an interpreter or native hardware. Yadriggy provides a method for reifying a lambda expression or a method body. You can write a program that receives a lambda expression or a method, reify it to obtain its abstract syntax tree, and execute it as DSL code with semantics different from Ruby.
Yadriggy reads the source code from a file when it constructs an abstract syntax tree. It works even when the source code is written on Pry or IRuby unless a syntax error occurs.
This framework comes with example DSLs.
A C-like DSL embedded in Ruby, which is for computation offloading by translating the DSL code into C or OpenCL code.
A power-assert library built with Yadriggy.
A syntax checker for DSLs implemented with Yadriggy.
The idea of the reification provided by Yadriggy was proposed here:
- Shigeru Chiba, YungYu Zhuang, Maximilian Scherr, "Deeply Reifying Running Code for Constructing a Domain-Specific Language", PPPJ'16, Article No. 1, ACM, August 2016.