Semantics for Xtext Languages
Many languages defined with oAW Xtext have aspects in common. One way of exploiting this is to modularize language definitions and then composing specific languages from these modules. However, because of limitations of the current (4.3.1) version of Xtext, this is not necessarily a very viable approach.
The
semantic annotation toolkit provides support for another approach. Languages are built from scratch (i.e. there is no reuse between grammar fragments), but the semantics of various language building blocks are still reusable. By annotating grammar elements with semantic annotations, the necessary Xtext infrastructure can be generated to make those grammar elements behave in a specific way.
Technically, this is implemented by generating extensions and checks as well as by model transformations and extensions of the meta- model.
Take a look at the latest documentation on the
download page or watch this
introductory screencast.
Labels: eclipse, openarchitectureware