ABSTRACT
Whether there is an (emerging or legacy) Domain-Specific Language to increase the expressiveness of your coworkers or whether you are about to invent a new General Purpose Prgramming Language: Tool support that goes beyond a parser/compiler is essential to make other people adopt your language and to be more productive. Xtext is an award- winning framework to build such tooling.
In this tutorial we explain how to define a language and a statically typed, EMF-based Abstract Syntax Tree using only a grammar. We then generate a parser, a serializer and a smart editor from it. The editor provides many features out-of-the-box, such as syntax highlighting, content-assist, folding, jump-to-declaration and reverse-reference lookup across multiple files. Then, it is shown how literally every as- pects of the language and its complementary tool support can be customized using Dependency Injection, especially how this can be done for linking, formatting and validation. As an outlook, we will demonstrate how to integrate a custom language with Java, how Xtext maintains a workspace-wide index of named elements and how to implement incremental code generation or attach an interpreter.
- }}Xtext framework, http://eclipse.org/XtextGoogle Scholar
- }}M. Eysholdt and J. Rupprecht. Migrating a Large Modeling Environment from XML/UML to Xtext/GMF. Proceedings of SPLASH' 10, 2010. Google ScholarDigital Library
- }}M. Fowler. Domain Specific Languages. Addison-Wesley Professional, 2010. Google ScholarDigital Library
- }}T. Stahl andM. Völter. Model-Driven Software Development. Wiley, 2006. Google ScholarDigital Library
- }}D. Steinberg, F. Budinsky, M. Paternostro, and E. Merks. EMF: Eclipse Modeling Framework 2.0. Addison-Wesley Professional, 2009. Google ScholarDigital Library
Index Terms
- Xtext: implement your language faster than the quick and dirty way
Recommendations
XMLText: from XML schema to xtext
SLE 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Software Language EngineeringA multitude of Domain-Specific Languages (DSLs) have been implemented with XML Schemas. While such DSLs are well adopted and flexible, they miss modern DSL editor functionality. Moreover, since XML is primarily designed as a machine-processible format, ...
The spoofax language workbench: rules for declarative specification of languages and IDEs
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsSpoofax is a language workbench for efficient, agile development of textual domain-specific languages with state-of-the-art IDE support. Spoofax integrates language processing techniques for parser generation, meta-programming, and IDE development into ...
A DSL for writing type systems for Xtext languages
PPPJ '11: Proceedings of the 9th International Conference on Principles and Practice of Programming in JavaXtext is a framework for the development of languages, which also generates all the typical and recurrent artifacts for a fully-fledged IDE on top of Eclipse. The validation (e.g., checking the correctness of programs from the point of view of types) of ...
Comments