Custom Model-to-Text Translation Follow
Is it or will it be possible to create custom Model-to-Text translations much the way that baseLanguage can be generated into text? I have a need (or really a deisre) to generate output in other languages besides Java.
Please sign in to leave a comment.
There are two ways to do so. First, create text gen aspect for your language: right click on a language icon and select create text gen model from there. The other is to generate to the gtext language which is our plain text language. In this case, just add jetbrains.mps.gtext language to the used language section of your generator and create rules for your constructs.
You can take a look at samples for textGen in the base language. For gtext in the jetbrains.mps.xml.
Excellent! The MPS User Guide mentioned that this feature was not yet available, hence my question. I'll give gtext a look which I'm sure will prompt more questions from me :-)
We haven't updated our user's guide yet so this isn't described in the user's guide. But you can use this feature despite this fact.