eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
754 stars 68 forks source link

Create example for multi-language and parameterized rules #362

Closed spoenemann closed 2 years ago

spoenemann commented 2 years ago

Extracted from https://github.com/langium/langium/pull/346#pullrequestreview-851320480

I think this would be a good time to add a fourth example showing both the multi-language and parameterized rules features. It would be good to see these in a live example. The example languages could be two aspects of a system with a commonly used part of the syntax.

Rough idea: one language for a static view and another language for a dynamic view of a system, both sharing a common expression language.

spoenemann commented 2 years ago

A multi-language example was added with #676.

msujew commented 2 years ago

Note that we have an example for parameterized rules in our own grammar language:

https://github.com/langium/langium/blob/58037d69220bc0c5e11a0de5d258cbaaa8f292c0/packages/langium/src/grammar/langium-grammar.langium#L54-L55