13th International Conference on Generative Programming: Concepts and Experiences (GPCE), September 15-16, 2014, Västerås, Sweden

Desktop Layout

LibDSL: A Library for Developing Embedded Domain Specific Languages in D via Template Metaprogramming
Masato Shioda, Hideya Iwasaki, and Shigeyuki Sato
(University of Electro-Communications, Japan)
Publisher's Version
Abstract: This 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 implementer is going to develop and a D program within which an EDSL source program written by the user is embedded. It produces the front-end code of an LALR parser for the EDSL program and back-end code of the execution engine. LibDSL is able to produce two kinds of execution engines, namely compiler-based and interpreter-based engines, either of which the user can properly choose depending on whether an EDSL program is known at compile time or not. We have implemented the LibDSL system by using template metaprogramming and other advanced facilities such as compile-time function execution of D language. EDSL programs developed by means of LibDSL have a nice integrativeness with the host language.


Time stamp: 2019-07-23T16:21:43+02:00