Tehničko veleučilište u Zagrebu · Zagreb

A domain-specific language implementation framework for C++ based on S-expressions

izvorni znanstveni rad

izvorni znanstveni rad

A domain-specific language implementation framework for C++ based on S-expressions

Vrsta prilog sa skupa (u zborniku)
Tip izvorni znanstveni rad
Godina 2024
Nadređena publikacija 2024 47th MIPRO ICT and electronics convention (MIPRO): Proceedings
Stranice str. 253-258
DOI 10.1109/mipro60963.2024.10569883
EISSN 2623-8764
Status objavljeno

Sažetak

Domain-specific languages (DSLs) are languages designed and implemented for a specific application domain.
Designing and implementing such languages is hard because they require both domain-specific and language implementation knowledge. However, they offer its users substantial gains in productivity because they consist of constructs that directly represent domain-specific concepts.
The absence of extensible and easy-to-use domain-specific language frameworks for C++ has made it difficult for developers to build such languages. Designing syntax, implementing parser, the interpreter and its runtime environment is time consuming, error prone and generally requires lots of work. In this paper we present a C++ framework for building domain-specific languages with fixed syntax based on S-expressions, but avoiding the strict parenthesization required by them. The framework offers two advantages over implementing a domain-specific language “by hand”: 1) the syntax is already built into the framework’s scripting language so users do not need to design and implement their own, and 2) the framework provides the execution environment where users just need to implement domain-specific commands by extending the command set of the interpreter.
This approach not only streamlines DSL development but also demonstrates versatility across various domains, as shown by our examples.

Ključne riječi

domain-specific language; framework; scripting; S-expressions; C++