Generating generators



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?





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.




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.



take a look at this thread

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.



Please sign in to leave a comment.