Here's my case: DSL1 => base language => execute the built java class =java -jar...=> binary blob => DSL2 => textgen for DSL2
What I'm actually doing is I'm building a firmware for an embedded CPU.
DSL1 is a user-facing language. Then I transform it via series of mapping scripts (that perform inlining, convert the thing to assembler DSL, do register allocation, etc). The thing is "assembler to binary" is coded in java, so in order to convert my DSL into binary blob I need to call java somehow. I wonder how could (should) I do that in the middle of the generation.
The idea is I would need to wrap that blob with some more DSL (that is DSL2) after DSL1 gets compiled, so I would like to have more generation mappings after that "java call".
Just some pictures:
"converted to assembly" DSL)
"base language" for that assembly, so it is ready for java compiler)
So far so good, however I would like to compile and run the above "base language", and transform its output.