About Genesis
Genesis is a C++ library created to facilitate the development and use of textual Domain Specific Languages (DSLs). Genesis has two main features: code generation and the use of semantic actions. The code generation utility can generate any kind of text (from plain text to any general purpose programming language source code), whereas semantic actions must be written in the base language (C++) in order to execute.
Genesis is built with Boost.Spirit, and also generates Boost.Spirit code for the parsers of our DSLs. The library supports many of the components provided by Boost.Spirit.Qi, but in the future it should support all of them.
With Genesis we managed to create several DSLs in various fields: generate questionnaires, manipulate 3D objects, specify security protocols, and capture packets over the network and analyze them.
Although frameworks for developing DSLs exist, most of them are based and target languages like Java or C#. Growing in level of abstraction (and adding a large number of features) usually results in slower applications. Instead, we can use Genesis to create our high level languages, and either generate or execute code out of instances of these languages, without getting any penalty. Thus, with Genesis we try to create a new perspective on developing DSLs in C++, and also take advantage of the benefits of the C++ language: create highly optimized code for high performance applications in order to tackle some of the most difficult problems, and produce cutting-edge solutions.
Genesis is available according to the Boost Software License. Any criticism and suggestions are warmly welcomed.