1 option
Implementing domain-specific languages with Xtext and Xtend / Lorenzo Bettini.
- Format:
- Book
- Author/Creator:
- Bettini, Lorenzo.
- Series:
- Community experience distilled
- Language:
- English
- Subjects (All):
- Software engineering.
- Domain-specific programming languages.
- Physical Description:
- 1 online resource (342 p.)
- Edition:
- 1st edition
- Other Title:
- Learn how to implement a DSL with Xtext and Xtend using easy-to-understand examples and best practices
- Place of Publication:
- Birmingham : Packt Publishing, 2013.
- Language Note:
- English
- System Details:
- text file
- Biography/History:
- Bettini Lorenzo: Lorenzo Bettini is an associate professor in computer science at the Dipartimento di Statistica, Informatica, Applicazioni "Giuseppe Parenti, " Universit di Firenze, Italy. Previously, he was a researcher in computer science at Dipartimento di Informatica, Universit di Torino, Italy. He also was a Postdoc and a contractual researcher at Dipartimento di Sistemi e Informatica, Universit di Firenze, Italy. He has a masters degree summa cum laude in computer science and a PhD in "Logics and Theoretical Computer Science. " His research interests cover design, theory, and the implementation of programming languages (in particular, objectoriented languages and network-aware languages). He has been using Xtext since version 0. 7. He has used Xtext and Xtend for implementing many domain-specific languages and Java-like programming languages. He also contributed to Xtext, and he recently became an Xtext committer. He is the author of the first edition of the book "Implementing Domain-Specific Languages with Xtext and Xtend", published by Packt Publishing (August 21, 2013). He is also the author of about 80 papers published in international conferences and international journals. You can contact him at http: //www. lorenzobettini. it.
- Summary:
- 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. 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 type checking and scoping. The book also shows you how to build and release a DSL so that it can be installed in Eclipse, and gives you hints on how to build the DSL headlessly in a continuous integration server. "Implementing Domain-Specific Languages with Xtext and Xtend" aims to complement the official Xtext documentation to explain the main concepts through simplified examples and to teach the best practices for a DSL implementation in Xtext. It is a Beginner’s Guide which should set you up for professional development DSL and its Eclipse IDE tooling.
- Contents:
- Cover
- Copyright
- Credits
- About the Author
- Acknowledgement
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Implementing a DSL
- Domain Specific Languages
- So, why should you create a new language?
- Implementing a DSL
- Parsing
- The Abstract Syntax Tree (AST)
- IDE integration
- Syntax highlighting
- Background parsing
- Error markers
- Content Assist
- Hyperlinking
- Quickfixes
- Outline
- Automatic build
- Summarizing DSL implementation
- Enter Xtext
- Installing Xtext
- Let's try Xtext
- The aim of this book
- Summary
- Chapter 2: Creating Your First Xtext Language
- A DSL for entities
- Creating the project
- Xtext projects
- Modifying the grammar
- Let's try the Editor
- The Xtext generator
- The Eclipse Modeling Framework (EMF)
- Improvements to the DSL
- Dealing with types
- Chapter 3: The Xtend Programming Language
- An introduction to Xtend
- Using Xtend in your projects
- Xtend - a better Java with less "noise
- Extension methods
- The implicit variable - it
- Lambda expressions
- Multi-line template expressions
- Additional operators
- Polymorphic method invocation
- Enhanced switch expressions
- Debugging Xtend code
- Chapter 4: Validation
- Validation in Xtext
- Default validators
- Custom validators
- Textual modification
- Model modification
- Quickfixes for default validators
- Chapter 5: Code Generation
- Introduction to code generation
- Writing a code generator in Xtend
- Integration with the Eclipse build mechanism
- Standalone command-line compiler
- Chapter 6: Customizations
- Dependency injection
- Google Guice in Xtext
- Customizations of IDE concepts
- Labels
- The Outline view
- Customizing other aspects
- Custom formatting
- Other customizations.
- Summary
- Chapter 7: Testing
- Introduction to testing
- Junit 4
- The ISetup interface
- Implementing tests for your DSL
- Testing the parser
- Testing the validator
- Testing the formatter
- Testing code generation
- Test suite
- Testing the UI
- Testing the content assist
- Testing workbench integration
- Testing the editor
- Other UI testing frameworks
- Testing and modularity
- Clean code
- Chapter 8: An Expression Language
- The Expressions DSL
- Digression on Xtext grammar rules
- The grammar for the Expressions DSL
- Left recursive grammars
- Associativity
- Precedence
- The complete grammar
- Forward references
- Typing expressions
- Type provider
- Validator
- Writing an interpreter
- Using the interpreter
- Chapter 9: Type Checking
- SmallJava
- SmallJava grammar
- Rules for declarations
- Rules for statements and syntactic predicates
- Rules for expressions
- Utility methods
- Testing the grammar
- First validation rules
- Checking cycles in class hierarchies
- Checking member selections
- Checking return statements
- Checking for duplicates
- Type checking
- Type provider for SmallJava
- Type conformance (subtyping)
- Expected types
- Checking type conformance
- Checking method overriding
- Improving the UI
- Chapter 10: Scoping
- Cross-reference resolution in Xtext
- Containments and cross-references
- The index
- Qualified names
- Exported objects
- The linker and the scope provider
- Component interaction
- Custom scoping
- Scope for blocks
- Scope for inheritance and member visibility
- Visibility and accessibility
- Filtering unwanted objects from the scope
- Global scoping
- Packages and imports
- The index and the containers
- Checking duplicates across files.
- Providing a library
- Default imports
- Using the library outside Eclipse
- Using the library in the type system and scoping
- Dealing with super
- What to put in the index?
- Additional automatic features
- Chapter 11: Building and Releasing
- Release engineering
- Headless builds
- Target platforms
- Continuous integration
- Introduction to Buckminster
- Installing Buckminster
- Using the Xtext Buckminster wizard
- Building the p2 repository from Eclipse
- Customizations
- Defining the target platform
- Build headlessly
- Maintaining the examples of this book
- Chapter 13: Xbase
- Getting introduced with Xbase
- The Expressions DSL with Xbase
- The IJvmModelInferrer interface
- Code generation
- Debugging
- The Entities DSL with Xbase
- Defining attributes
- Defining operations
- Imports
- Bibliography
- Index.
- Notes:
- Bibliographic Level Mode of Issuance: Monograph
- Includes bibliographical references and index.
- Description based on publisher supplied metadata and other sources.
- ISBN:
- 9781782160311
- 1782160310
- OCLC:
- 857278051
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.