Generator distribution
Hi community,
I'm thinking about language modularity and a good DSL architecture. Thereby the question came up whether it is possible to distribute the generator over the different language modules.
For example if I have two languages L1 and L2 (and L1 imports L2), is it possible to define the generator rules for L2 directly in L2 (and, of course, those for L1 directly in L1)? Or do I have to specify my generation plan in a central way, i.e. in L1?
Or, as a third solution suggestion, is it better to create a third language L3 just for the generator aspect?
Thank you very much in advance,
LaAck
I'm thinking about language modularity and a good DSL architecture. Thereby the question came up whether it is possible to distribute the generator over the different language modules.
For example if I have two languages L1 and L2 (and L1 imports L2), is it possible to define the generator rules for L2 directly in L2 (and, of course, those for L1 directly in L1)? Or do I have to specify my generation plan in a central way, i.e. in L1?
Or, as a third solution suggestion, is it better to create a third language L3 just for the generator aspect?
Thank you very much in advance,
LaAck
Please sign in to leave a comment.
thank you very much for your response. I'm sorry, I'm afraid I caused some confusion regarding what I'm talking about. My problem are not the generator priorities but the rules in the mapping configuration, e.g. the reduction rules. I don't know if it is possible to create a mapping configuration in L1 and L2 respectively, providing only the mapping rules for the concepts included in the respective language. So let's assume that I want to generate an XML document. Is is possible and useful to describe the transformation for each concept in the language where it is uncluded? Or do I have to describe it in one mapping configuration of the "overall container" language?
I hope this clarifies the issue. Thank you very much again!
Kind regards,
LaAck
thank you very much! This is exactly what I wanted to know and what I hoped for.
Kind regards,
LaAck