<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1561.6">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #000000}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #000000; min-height: 20.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 24.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #008e00}
p.p4 {margin: 0.0px 0.0px 0.0px 12.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #011892; min-height: 20.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 12.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #011892}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #000000; min-height: 20.0px}
p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #000000}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px 'Inconsolata-dz for Powerline'; min-height: 20.0px}
p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px 'Inconsolata-dz for Powerline'}
p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #011892; min-height: 20.0px}
p.p11 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #000000; min-height: 20.0px}
p.p12 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Inconsolata-dz for Powerline'; color: #929292}
</style>
</head>
<body>
<p class="p1">On 2018-07-28 15:43:12 +0000, rikki cattermole said:</p>
<p class="p2"><br></p>
<p class="p3">    * Could I somehow call an external program during compilation which gets the DSL block as input and returns D code?</p>
<p class="p4"><br></p>
<p class="p5">No. But you can pre-process.</p>
<p class="p6"><br></p>
<p class="p7">Yes, sure, but this complicates the build-system. I preferr to use as few parts as possible.</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p3">    * Is it possible to populate such a dictonary via CTFE?</p>
<p class="p4"><br></p>
<p class="p5">Sort of, it can be registered, but the actual execution of the registration occurs at runtime.</p>
<p class="p6"><br></p>
<p class="p7">Yes, no problem. How is this done?</p>
<p class="p6"><br></p>
<p class="p5">But you're slightly over thinking this. Write an interpreter and a parser. The fact that the parser can work at CTFE is irrelevant and almost a footnote on the page of details ;).</p>
<p class="p8"><br></p>
<p class="p9">Not really if you think about deployment. I want to create a single executable, no external files. So I somehow have to get the scripts included or use the compiler as generator. The main use-case is, that I want to use a very declarative approach for some UI parts.</p>
<p class="p10"><br></p>
<p class="p5">If you want to be clever you could generate D code and mix it in based upon what was parsed. But you'd still want that dictionary.</p>
<p class="p8"><br></p>
<p class="p9">Yes, mixing in generate D code was the idea. However, I think a good included infrastructure that support creating DSLs might help a lot to simplify this.</p>
<p class="p11"><br></p>
<p class="p11"><br></p>
<p class="p12">--<span class="Apple-converted-space"> </span></p>
<p class="p12">Robert M. Münch</p>
<p class="p12">http://www.saphirion.com</p>
<p class="p12">smarter | better | faster</p>
</body>
</html>