Java Reference
In-Depth Information
1.5.2 Concrete Syntax Development
The abstract syntax for a DSL usually must be presented for use by humans, so
one or more concrete syntaxes must be developed. By default, EMF provides
XMI serialization of model instances, but you might want to provide an alterna-
tive serialization syntax as well. You also might choose to define a textual con-
crete syntax used for serialization.
GMF Project
The GMF project provides a graphical concrete syntax. Using GMF, a Toolsmith
can develop the graphical notation for a DSL and map it to the abstract syntax.
These models generate a feature-rich diagram editor. Chapter 4, “Developing a
DSL Graphical Notation,” covers the development of diagrams for DSLs using
GMF.
TMF Project
Those who prefer a textual concrete syntax can use the TMF project. After
extracting grammar from the domain model, you can leverage generators that
target the Eclipse platform to produce high-quality textual editors, complete with
syntax highlighting, code completion, builders, and so on. Chapter 5, “Develop-
ing a DSL Textual Syntax,” covers the development of textual editors for DSLs.
1.5.3 Model Transformation
As satisfying as it is to define a DSL and generate a custom textual or graphical
editing environment, we typically want to produce some output from our
instance models. We include the development of model transformations in the
context of a DSL Toolkit because, without them, the story is incomplete. The
Modeling project provides both model-to-model and model-to-text transforma-
tion components.
Model-to-Model Transformation (M2M) Project
Using the abstract syntax definition of our DSL, we can define model transfor-
mations to produce other models or generate textual output. In the case of the
former, you will develop model-to-model transformations using the QVT
Operational Mapping Language (OML), although the Model-to-Model
Transformation (M2M) project offers alternatives such as ATL and QVT
Relations. You will develop model-to-model transformations using QVT in
Chapter 6, “Developing Model-to-Model Transformations.”
Search WWH ::




Custom Search