Why does my language have to extend the language I want to output in my generator?
I have a completely self-contained language that doesn't extend any existing language that I want to generate c++ (well, gtext). This worked w/o complaint in 1.5, but I'm trying it in the recent 2.0 rc5 and though things continue to work I get a red underline error on the generator saying that my language should extend gtext. I think this isn't really what I want as gtext is not supposed to be part of my language. Do I misunderstand what it means to extend a language, or ?
Please sign in to leave a comment.
I don't need to add the target-language to the extending languages.
My generator module has it as used language as well as my generator model.
So I can't help you here.
The language contains one Concept called 'Thing'. Thing generates as "This is a thing." in GText. I don't want the language to extend GText, just generate it, but MPS is telling me that it should.
ExtendGText.zip (51KB)
you seem to be right with this example.
I tried adding another language to the project to see if the problem is still there, when generating to a language that is created in the same project.
There was no problem with that. So your problem seems to be quite special to generating to a packed language perhaps.
I would suggest that you file an issue report on the youtrack issue tracker.
http://youtrack.jetbrains.net/issues/MPS
ExtendGText2.zip (101KB)
Your case:
Your language is reduced into gtext, while gtext is reduced into baseLanguage. gText has a runtime (see j.m.gtext.runtime), containing classes like TBaseBuilderContext, TBuffer etc.
To be honest, we are mixing two relations here. 'Generates into a language' is not the same as 'Extends concepts', and in the future we are going to split them.