Xtext Tip: Add custom values to your DSL
Sometimes we have a value that has different representations. For example, an integer can be represented in base 10, base 2, base 16 or any other. Depending of the domain, one of these representations might mean more to the experts. Xtext allows to do this very easily. The full code for this example can be found here.
The hex language
To illustrate this feature we are using a DSL to represent a binary file as a chain of hexadecimal values. A file of this language looks like follows:
Continue Reading