First thank you very much for this fabulous tool that is MPS. I am very eager to develop on this.
So I am making a proof of concept. I need to generate xml file.
So I am using mps.xml language as target for the generator.
I created a language which contains conditions represented as Expression (from baseLanguage).
Now in my template for xml document, I want to transform the Expression (baseLanguage) to an xml attribute value.
So I created an element like this :
copy_src : node.condition; (which is of type Expression)
I have a reduction rule in the main description of generator:
(concept Expression) –> <T $(expression) T> // content of template is XmlValuePart or XmlTextValue
But I don't know what to put as a property macro for $(expression)
I want to do something like node.toString(); but it is not possible
Is it possible to call textgen component ?
I created a textgen component for some Expression (like Reference which extends Expression), and I don't know how to call it.
I also tried to something like :
(concept PlusExpression) –> <T left + right T> // content of template is XmlValuePart or XmlTextValue
And I want to have two macros, one on left and one right, but when I want to add a macro I can have only this :
(concept PlusExpression) –> <T $(left + right) T>
and not this :
(concept PlusExpression) –> <T $(left) + $(right) T>
I tried to do something like GText screencast but it is not working. The reduction rule :
(concept Expression) –> <T wrapper $COPY_SRC$("expression") T>
is not called.
So I need advice ! How to generate text from model for say xml attributes ?