Embedding DSLs in Statically Typed Languages
I recently stumbled over two articles about embedding DSLs into compiled, statically typed languages (such as Java). While I am not a big fan of the approach (aka fluent APIs in Java)
this article by Miguel Garcia shows the only sane way of doing it: generating the necessary interfaces, classes and builders from grammars and meta models.
The other paper is one by Gilles Dubochet, and is called
On Embedding Domain-specific Languages with User-friendly Syntax. He talks about the features a programming language should provide to make embedding DSLs with (almost) arbitrary textual syntax feasible, going beyond fluent APIs. He illustrates the idea using Scala, which provides all these concepts.