Summary

In this chapter, we presented type checking techniques that are typical for a DSL with object-oriented features. A small Java-like language was introduced to demonstrate how to parse features such as member access and inheritance and how to handle validation of type conformance. The reader might want to experiment with the caching techniques we described in the previous chapter and apply them to the implementation of the DSL.

For further reading concerning type system implementations for Xtext languages, we refer the interested reader to the articles Bettini et al. 2012, Bettini 2013, and Bettini 2016. In these articles, a DSL for implementing type systems for Xtext languages, Xsemantics is also described. Xsemantics is available as an ...

Get Implementing Domain-Specific Languages with Xtext and Xtend - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.