ABSTRACT
This demonstration shows a lightweight and fast method for creating a tested and working domain specific language. The method is demonstrated using the ngrease metalanguage.
The creation of a new language is started by writing a representative example of the final product with a test that tests the transformation from a stub source to the result.
The test is made to pass by writing a constant transformer that unconditionally outputs the result.
At each step the language is extended by refactoring: Some part of the transformer template is converted from a constant subtree to a reference to data read from the source tree, thus driving additions to the new language.
Optionally, each refactoring step can be driven by a new test that demonstrates the lack of parameterization of some part of the final product.
- http://ngrease.sourceforge.net/introduction.htmlGoogle Scholar
- http://www.refactoring.com/catalog/parameterizeMethod.html; accessed 25.7.2007Google Scholar
Index Terms
- Extracting a domain specific language from an example: a bottom-up method using the ngrease metalanguage
Recommendations
Everything old is new again: quoted domain-specific languages
PEPM '16: Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program ManipulationWe describe a new approach to implementing Domain-Specific Languages(DSLs), called Quoted DSLs (QDSLs), that is inspired by two old ideas:quasi-quotation, from McCarthy's Lisp of 1960, and the subformula principle of normal proofs, from Gentzen's ...
LibDSL: a library for developing embedded domain specific languages in d via template metaprogramming
GPCE '14This paper presents a library called LibDSL that helps the implementer of an embedded domain specific language (EDSL) effectively develop it in D language. The LibDSL library accepts as input some kinds of ``specifications'' of the EDSL that the ...
Sectional domain specific languages
DSAL '09: Proceedings of the 4th workshop on Domain-specific aspect languagesNowadays, many problems are solved by using a domain specific language (DSL), i.e., a programming language tailored to work on a particular application domain. Normally, a new DSL is designed and implemented from scratch requiring a long time-to-market ...
Comments