Implementing Domain-Specific Languages with Xtext and Xtend - Second Edition

Autor: Lorenzo Bettini
Předmět:
Kategorie:
Popis: About This BookLeverage the latest features of Xtext and Xtend to develop a domain-specific language.Integrate Xtext with popular third party IDEs and get the best out of both worlds.Discover how to test a DSL implementation and how to customize runtime and IDE aspects of the DSLWho This Book Is ForThis book is targeted at programmers and developers who want to create a DSL with Xtext. They should have basic familiarity with Eclipse and its functionality. Previous experience with compiler implementation can be advantageous. However, this book will explain all the development stages of a DSL.What You Will LearnWrite an Xtext grammar for a DSLUse Xtend to customize all aspectsWrite constraint checks using the validator mechanismCustomize the UIWrite a code generator and an interpreter for a DSLTest the DSL implementation with JUnitMaster the Xtext scoping mechanism for symbol resolutionBuild your Xtext DSL with Maven/Tycho and GradleUse an Xtext editor in a web application and in IntelliJUnderstand best practices in DSL implementationsGet familiar with XbaseManually maintain the EMF model for an Xtext DSLIn DetailXtext is an open source Eclipse framework for implementing Domain-Specific Languages (DSLs) together with their integration in the Eclipse IDE. Xtext covers all aspects of a language infrastructure, including the parser, code generator, interpreter, and more. This book will enable you to implement DSLs efficiently, together with their IDE tooling, with Xtext and Xtend. Opening with a brief coverage of Xtext features involved in DSL implementation, the book will then introduce you to Xtend (a language that's completely interoperable with Java). You will then explore the typical programming development workflow with Xtext starting from the grammar of the DSL. The book will then explain the main concepts of Xtext, such as validation, code generation, and customizations of runtime and UI aspects. You will learn how to test a DSL implemented in Xtext with JUnit and advanced concepts such as type checking and scoping. The book will show you how to build and test your DSL with Maven/Tycho and Gradle, and how an Xtext DSL editor can also be used in a web application and in IntelliJ. You will also familiarize yourself with Xbase. At the end of the book, you will also learn how to manually maintain the EMF model for an Xtext DSL.
Databáze: eBook Collection (EBSCOhost)