...
The generated code includes some automatic validation of models with respect to syntactic issues. If the token sequence in a text file does not conform to the grammar, error markers are shown at appropriate points in the text. However, this should be augmented by semantic validation by checking high-level properties of the model. Implement such a semantic validation by editing the generated file BrainfuckValidator
in the validation
subpackage. Learn how this is done by reading the Xtext reference documentation →Runtime Concepts → Validation → Custom Validation. Implement at least the following checks:
- Does every [ has a corresponding closing bracket?
- Does every ] has a corresponding opening bracket?...
- ...
Info | ||
---|---|---|
| ||
In current versions of Xtext, the validator file in the |
...
- Dive deeper into the rich Xtext documentation: http://www.eclipse.org/Xtext/
- Perform our second Xtext tutorial: Xtext I (long tutorial)- Creating a Grammar for an Existing Metamodel
- Go on with our Xtend tutorial:
...