Generating generators

Hello!

 

I realize that this a somewhat esoteric question, but I've been thinking about using MPS generators to generate Editors and such (so, a new language) from a model (some XML files, for example). This would allow the generation of editors for custom generated languages, using the full editing support in MPS. Is such a thing possible?

 

Regards,

Jan

3 comments

Hello Jan!

I'm no expert in MPS, but I don't think it's possible to generate a MPS language with concepts or even editors for it out of a xml file.

Maybe the great ANTLR to MPS project from Fabien Campagne is worth to take a look at, if you have your language also defined in ANTLR.

 

 

0

Well, I think you can do that: in MPS you can run any Java code so it means you can easily parse an XML file. When you have parsed it you can create new MPS models and nodes programmatically.

0

Hi,

take a look at this thread
    https://mps-support.jetbrains.com/hc/en-us/community/posts/206615585-How-to-move-root-nodes-from-transient-to-non-transient-models-

PE4MPS actually generate concepts and editor using quotation however reading the thread you can learn this is not the suggested strategy. I've also tested the suggested strategy, that is using generator than move transient models programmatically, and it's working. But I still have to modify PE4MPS accordingly.

 

0

Please sign in to leave a comment.