Generation and TextGeneration

Hello!

Is it possible to get both Generation and TextGeneration for a Language? I want to generate a text for my DSL (some plain text) and also I want to generate Java (BaseLanguage) or some other DSL from the same origin DSL.

2
2 comments

Hi Kuruhuru,

I found myself in the same situation and I solved this by using the awesome plaintextgen plugin [1]. If you create separated languages for generation (which depend on your DSL), you can generate plain text in one of them and Java in another. In your solution you can then select the language engaged in generation (in the model properties).

Have a look at this json plugin [2]. Here I did this separation (though I only generate text, additional generation if Java would require to add an additional language similar to the .gen.plaintext language).

Cheers

 

[1] https://github.com/DSLFoundry/mps-plaintextgen

[2] https://github.com/nkoester/mps-json

2

Thank you, Norm!

0

Please sign in to leave a comment.