I have two DSL. The first is the input DSL:
attributes += Attribute*
And here is the mapping DSL:
mappings += Mapping*
target=[input::Attribute] '=' source=[input::Attribute]
Now, I want to extend the mapping with sources which are defined in the mapping DSL, e.g.:
'property' name=ID '=' value=STRING
And then write such DSL files:
property prop = "somevalue"
A = prop
B = SourceAttribute
The question is, how to extend the Mapping grammar. Property and Attribute are in different DSLs. Preferrably, I would not want to modify the input DSL. The following is obviously ambiguous and does not work:
target=[input::Attribute] '=' source=[Source]
I know of a few ways I could solve this but would like to hear from experts how they would solve this situation.