O'Reilly logo

Implementing Domain-Specific Languages with Xtext and Xtend by Lorenzo Bettini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizations

Depending on the complexity of your DSL, you might want to customize the default implementation of several components of Xbase, such as scoping and validation. This can be achieved by subclassing the corresponding Xbase classes and by specifying the bindings in the Guice module. Note that the Xbase scope provider implementation is not based on AbstractDeclarativeScopeProvider, thus, you cannot rely on the convention for method names that we used in Chapter 10, Scoping; you will have to redefine the getScope method. Moreover, you will have to inspect the implementation of Xbase scope provider and validator to understand which method to override.

It is also possible to override some rules of the Xbase grammar in order to change the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required