Now that we have a working DSL, we can do some improvements and modifications to the grammar.
After every modification to the grammar, as we said in the section The Xtext generator, we must run the MWE2 workflow so that Xtext will generate the new ANTLR parser and the updated EMF classes.
First of all, while experimenting with the editor, you might have noted that while
is a valid sentence of our DSL, this one (note the spaces between the square brackets)
MyEntity[ ] myattribute;
produces a syntax error.
This is not good, since spaces should not be relevant in a DSL (although there are languages like Python and Haskell where spaces are indeed relevant).
The problem is due to the fact that in the