PacktLib: Implementing Domain-Specific Languages with Xtext and Xtend

Implementing Domain-Specific Languages with Xtext and Xtend

Credits

About the Author

Acknowledgement

About the Reviewers

www.PacktPub.com

Preface

Implementing a DSL

Domain Specific Languages

Implementing a DSL

IDE integration

Enter Xtext

The aim of this book

Summary

Creating Your First Xtext Language

A DSL for entities

The Xtext generator

The Eclipse Modeling Framework (EMF)

Improvements to the DSL

Summary

The Xtend Programming Language

An introduction to Xtend

Xtend – a better Java with less "noise"

Debugging Xtend code

Summary

Validation

Validation in Xtext

Quickfixes

Summary

Code Generation

Introduction to code generation

Writing a code generator in Xtend

Integration with the Eclipse build mechanism

Standalone command-line compiler

Summary

Customizations

Dependency injection

Google Guice in Xtext

Customizations of IDE concepts

Custom formatting

Other customizations

Summary

Testing

Introduction to testing

Junit 4

The ISetup interface

Implementing tests for your DSL

Test suite

Testing the UI

Testing and modularity

Clean code

Summary

An Expression Language

The Expressions DSL

The grammar for the Expressions DSL

Left recursive grammars

Forward references

Typing expressions

Writing an interpreter

Summary

Type Checking

SmallJava

First validation rules

Type checking

Improving the UI

Summary

Scoping

Cross-reference resolution in Xtext

Custom scoping

Global scoping

Providing a library

Dealing with super

What to put in the index?

Additional automatic features

Summary

Building and Releasing

Release engineering

Introduction to Buckminster

Using the Xtext Buckminster wizard

Maintaining the examples of this book

Summary

Xbase

Getting introduced with Xbase

The Expressions DSL with Xbase

The Entities DSL with Xbase

Customizations

Summary

Bibliography

Index