At your Finger Tips:
Software systems are not only made up of structure. At some point you'll have to define behavior and computations.
These aspects are implemented using expressions. Defining domain-specific languages with Xtext is very easy and comparable with
defining APIs but without any restrictions and much better tooling. However when it comes to defining expressions things used to become
more complicated. That's a thing of the past!
Xbase is a predefined set of expressions, which can easily be embedded into any language developed with Xtext. It not only provides you with the
necessary grammar, but also comes with a reusable compiler, an interpreter, and of course the top-notch Eclipse tooling you would expect form any
language developed with Xtext.
Modern expressions ...
Xbase supports everything you'd expect from a modern expression language. Static typing, type inference, closures and operator overloading
are just the tip of the ice berg. You can of course extend the language and add further expressions. E.g. date or color literals might be a good idea
in your specific case. No Problem!
Have a look at the language reference to learn what's already there.
... right within your DSL
See what Xbase looks like when it is embedded in a DSL. It's seamless!
This screencast shows the example domain model language, which is shipped as part of Xtext.
You can materialize the respective projects it into your worksapce using the examples-wizard.
In the documentation you can find a detailed description of what needs to be done to emebed Xbase into your DSL.