Generating a non-base langauge. Follow
I want to define a meta language that helps me define my DSL.
Car Definition Langauge
However, I'm rather new to MPS so no doubt making some stupid assumptions.
What I am trying to do is generate a 'jetbrains.mps.bootstrap.structureLangauge'. The idea being I can generate all the Concept definitions for the 'Car Langauge' from the 'Car Definition Langauge'.
However while I can define macro's (Ctrl-Shift-M) in the Base Langauge Editor, I can't do it on the Structured Langauge Editor.
So could you please tell me where I am making my dumb mistake
Please sign in to leave a comment.
very cool :-)
To edit a templates model (one with stereotype "templates") MPS loads specific editor.
That templates editor is generated using original editor as input and adds some layout features and cell actions (like ctrl-shift-M).
You can find templates editor in baseLanguage, but there is no such in structure language.
Its not difficult to create one for structure language. I can explain "how to..." in more details after new EAP build is out next week.
OK Igor the new EAP build is out, time to spill the beans!
Unfortunately I wasn't able to do that in mps234 :-(
But even if it was possible... After more study of your idea I think that generating of dsl definition form some meta-dsl is not very practical (in mps).
First, mps currently doesn't explicitly support generation of models.
Second, if you (with certain tricks) have structure model generated, it wont be useful without editors. The moment you have developed editors, you can't just re-generate structure because generator doesn't preserve unique id of nodes and all references on concepts, property declarations etc. will be broken.
It seems that my first response was misleading, sorry.