CTFE & code generators based on PEG grammars?

Robert M. Münch robert.muench at saphirion.com
Sat Apr 6 12:06:22 UTC 2019


I like the idea of DSL which are transpiled into the target language 
that gets compiled or are interpreted at run-time. Since D is compiled, 
I would like to transpile the DSL to D at compile-time.

The idea is, that I can write a string (or maybe even a scope block?) 
in my DSL and use a CTFE grammer to transpile the code.

Does anybody has any experience with such an approach? Are the CTFE 
facilities overall sufficient to implement something like this? Or is 
there a much better approach?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list