If you know Eclipse then learning how to implement a DSL using Xtext is a natural progression. And this guide makes it easy to get started through a step-by-step approach accompanied with simple examples.
Overview
- Learn to quickly develop a domain-specific language with Xtext
- Implement any aspect of a DSL using Xtend, a fully featured Java-like programming language
- Discover how to test a DSL implementation and how to customize runtime and IDE aspects of the DSL
In Detail
Xtext is an open source Eclipse framework for implementing domain-specific languages together with its IDE functionalities. It lets you implement languages really quickly, and, most of all, it covers all aspects of a complete language infrastructure, starting from the parser, code generator, interpreter, and more.
Implementing Domain-Specific Languages with Xtext and Xtend will teach you how to develop a DSL with Xtext, an Eclipse framework for implementing domain-specific languages. The chapters are like tutorials that describe the main concepts of Xtext such as grammar definition, validation, code generation, customizations, and many more, through uncomplicated and easy-to-understand examples.
Starting with briefly covering the features of Xtext that are involved in a DSL implementation, including integration in an IDE, the book will then introduce you to Xtend as this language will be used in all the examples throughout the book. We then proceed by explaining the main concepts of Xtext, such as validation, code generation, and customizations of runtime and UI aspects. By the end of the book, you will have learned how to test a DSL implemented in Xtext with Junit, in order to follow a test-driven development strategy that will help the developer implement maintainable code that is much faster and cleaner.
A test-driven approach is used throughout the book when presenting advanced concepts such as typl“.