[Main website]

dok/paradigm/customizable-compiler

In Dok, the compilation workflow is a first-class citzien and it can be analyzed and customized. Dok code is composed of many nested DSL. Every DSL chunk can be analyzed from different compiler plugins. It is the host DSL and compiler plugin that decides how to manage the nested DSL. For example the host compiler can be a documentation generator, or a proper compiler. In these two cases the nested DSL chunks must be processed in completely different ways: in one case they must be formatted and converted to documentation; in the other case to lower level code.

An host H DSL can contain fragment of code written in another embedded E DSL. The embedded code can be converted to H code from compiler plugins, or to target T DSL code toghether with H code.