MPS生成器 - 是否可以引用外部语言的标签?

时间:2016-01-26 08:32:18

标签: mps

例如,我有语言生成器:

1) A -> baseLanguage
    a) defines a concept `a1`
    b) defines a label `a1ToClass`, in: `a1` of `A`, out: `ClassConcept` of `baseLanguage`
2) B -> A
    a) defines a concept `b1`
    b) defines a label `b1ToA1`, in: `b1` of `B`, out: `a1` of `A`

是否可以通过以下形式从后一个生成器引用标签a1ToClass

node<b1> b1Instance = getB1InstanceNode(); 
node<a1> a1Instance = genContext.get output by label "b1ToA1" and input `b1Instance`;
node<ClassConcept> classConceptInstance = genContext.get output by label "a1ToClass" and input `a1Instance`;

1 个答案:

答案 0 :(得分:2)

是,

你需要A发电机上B发电机的“设计”依赖性。然后映射标签变得可见。

瓦茨拉夫