-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Implementing Domain-Specific Languages with Xtext and Xtend - Second Edition
By :
For the first example of the use of Xbase, we implement a DSL similar to the Expressions DSL that we presented in Chapter 8, An Expression Language, which we call as Xbase Expressions DSL; this DSL is inspired by the Scripting Language DSL of the seven languages examples.
Let's create a new project with the following settings:
org.example.xbase.expressionsorg.example.xbase.expressions.ExpressionsxexpressionsBefore running the MWE2 generator for the first time, you should modify the grammar so that it uses the Xbase grammar, not the Terminals grammar:
grammar org.example.xbase.expressions.Expressions with org.eclipse.xtext.xbase.Xbase
Since our grammar now inherits from the Xbase grammar, all the Xbase grammar rules are in effect in our DSL.
When using Xbase, some files in the projects will contain lots of warnings of the shape:
Discouraged access: The method ... from the type ... is not accessible due...