How to implement a MPS DSL for a C++ codebase

Hi,

I'm trying to implement a DSL for a C++ codebase and was wondering if anyone has got it working and could give me some info.
I was not able to find much information on the internet so i am a bit sceptical if this is the right tool for a C++ DSL.
I have also read about plain text generation and was wondering if that is the only current solution for this problem and couldnt find any example projects/implementations online, so if anyone could guide me in the right direction that would be great!

Thanks in advance and greetings,

Cas

5 comments
Comment actions Permalink

What is the actual problem you're looking to solve? What do you hope to achieve with the DSL? Who will be the DSL users? Who will be developing the DSL?

0
Comment actions Permalink

There are some mathematical model implementations which rely heavily on the Eigen framework. The idea is that nonprogrammers with domain knowledge must be able to implement those models themselves. I am just looking for some example implementations/projects of a C++ DSL in MPS.

So the DSL must be able to generate c++ classes which define the mathematical model.

0
Comment actions Permalink

Based on your description it sounds like MPS could fit your project well. I don't think there exists any implementation of C++ for MPS so plain text generation would be the approach to take initially. A partial implementation of C++ could be built incrementally by abstracting out the plain text generation if/when it would make sense.

0
Comment actions Permalink

Okay, thanks! I'll look into the plain text gen plugin. I've searched for some documentation on this plugin, but wasn't able to find much, do you know where i can find information about implementing this plugin?

0
Comment actions Permalink

Here are some YouTube videos about generating text with MPS' built-in TextGen:

https://www.youtube.com/watch?v=aMRD9_9qWys

https://www.youtube.com/watch?v=yNkJSBNrBlU

The only documentation that I know of about plaintextgen is its README but it seems quite simple to me. In any case, I invite you to join the MPS Slack (http://slack-mps.jetbrains.com/) where you can ask small questions and usually get a quick reply.

0

Please sign in to leave a comment.