Xsemantics is a DSL (implemented in Xtext itself) for writing type systems, reduction rules, interpreters (and in general relation rules) for languages implemented in Xtext. It then generates Java code that can be used in your language implemented in Xtext for scoping and validation (it can also generate a validator in Java).
https://projects.eclipse.org/projects/modeling.xsemantics
http://download.eclipse.org/xsemantics/milestones/
- version 1.13 requires Xtext 2.13.0
- version 1.14 requires Xtext 2.14.0
- version 1.15 requires Xtext 2.15.0
- version 1.16 requires Xtext 2.16.0
- version 1.17 requires Xtext 2.17.0
- version 1.18 requires Xtext 2.19.0 (no version avaialable for Xtext 2.18)
- version 1.19 requires Xtext 2.20.0
- version 1.13.0-SNAPSHOT requires Xtext 2.13.0
- version 1.14.0-SNAPSHOT requires Xtext 2.14.0
- version 1.15.0-SNAPSHOT requires Xtext 2.15.0
- version 1.16.0-SNAPSHOT requires Xtext 2.16.0
- version 1.17.0-SNAPSHOT requires Xtext 2.17.0
- version 1.18.0-SNAPSHOT requires Xtext 2.19.0 (no version avaialable for Xtext 2.18)
- version 1.19.0-SNAPSHOT requires Xtext 2.20.0
Make sure you enable Maven snapshots repositories, see, e.g., https://github.com/eclipse/xsemantics/blob/master/tests/org.eclipse.xsemantics.example.maven.test/pom.xml