You probably don't need recursion in the DSL for this (that would
require a way to detect cycles in the expressions). For this example, it
looks like all you need is to add something like `map` as a DSL construct.
Your example could perhaps be expressed as
forEach (1,1000) (\n - out
Hi Joerg,
You might find Abstract Syntax Graphs for Domain Specific Languages by
Bruno Oliveira and Andres Löh (
http://ropas.snu.ac.kr/~bruno/papers/ASGDSL.pdf) a helpful reference to
adding things like recursion (and other binding constructs) to your DSL.
Edsko
On Tue, Feb 19, 2013 at 9:47
I have a tiny DSL that actually works quite well. When I say
import language.CWMWL
main = runCWMWL $ do
out (matrixMult, A, 1, row, matrix-row)
then runCWMWL is a function that is exported by language.CWMWL. This parses the
experession and takes some action.
Now, A is the name of the