Generating Several Source Files

I want to generate objc source code. For that I need to generate .m and .h files from a single model.
I'll also need that for more general use-case of generating two files form a single model in case of creating a call implementation and a factory to instantiate that class.

How can I do that in MPS?

Thank you,
Unfortunately, you have to design a Objective-C language in MPS first. Then you could use that as a target for the generator. Maybe you could solve the problem in textgen, but there you have to build your source code via strings (for easy things this approach might be okay).
Thank you, I understand you answer.
Let me fix my question please:
I'm creating a high-level language that I want to translate to BaseLang.
From one high-level concept I want to generate two (or more) models from it.

I think I actually manage to do that by adding two generators but I'll like to know if I'm on the right way?
If I understand correctly, you just need to define another (root) mapping rule to generate another target node from a single node.

Thank you, adding another root mapping rule did the trick.

Please sign in to leave a comment.