possible error in generator priorities

Hi,
I am learning to use MPS and am currently following the Generator Demo part 6 (https://confluence.jetbrains.com/display/MPSD32/Generator+User+Guide+Demo6). I have run into problems with the step "Dividing Generation Process into Steps", therefore I have created a new test environment with two languages based on SampleXML. The first defines the Concepts Button and Label, as done in the Generator Demo. The only generation defined in this language is defined by these reduction rules:
reduction-button-label.PNG

The second language defines a new Concept Note, like this:
Note.PNG

, with the following reduction rule in the second language's generator:
reduction-rule.PNG

My sandbox model is the following:
xml-model.PNG


The problem is that no matter how I define the generator priorities, the label and button in my sandbox model are transformed in the first generation step, and the note is transformed in the second generation step. I can not change the order in which these two transformation are done. Here is the current definition of my priorities:
prios.PNG


My question is (of course) can anybody tell me what I am doing wrong? I have consulted someone with experience with MPS, but unfortunately he was not able to help me, which might suggest there is something other amiss than my inexperience with MPS.

Thanks for any assistance, Anneke Kleppe
2 comments
Hi Anneke,

the left-hand side of the priority rule looks suspicious to me, since it is framed in red indicating an error. If you double-click on the red-marked generator, you should get a pop-up, in which the requested mapping configuration must be selected with a check-box. Do you have the check-box checked?

Vaclav
0
Hi Vaclav,

Yes! That is it. Having tried checking and unchecking the right-hand-side, it never occured to me to check the left-hand side of the mapping configuration. Thanks a lot! Monday I will be back on track learning more about MPS.
Anneke
0

Please sign in to leave a comment.