Xtext Explained

Eclipse Xtext
Latest Release Version:2.31.0
Latest Release Date:[1]
Genre:Software framework
License:Eclipse Public License

Xtext is an open-source software framework for developing programming languages and domain-specific languages (DSLs). Unlike standard parser generators, Xtext generates not only a parser, but also a class model for the abstract syntax tree, as well as providing a fully featured, customizable Eclipse-based IDE.

Xtext is being developed in the Eclipse Project as part of the Eclipse Modeling Framework Project and is licensed under the Eclipse Public License.

History

The first version of Xtext was published in 2006 in the openArchitectureWare project. The last version released under the oAW project was version 4.3. Since the beginning of 2008, Xtext has been developed at Eclipse under the Eclipse Modeling Project.[2]

Joining Eclipse's annual simultaneous release, Xtext released version 0.7.0 (June 2009), 1.0 (June 2010), 2.0 (June 2011), 2.3 (June 2012), 2.5 (December 2013), 2.6 (May 2014) and 2.7 (September 2014). The framework is mainly developed by the German company Itemis.[3]

Functionality

To specify a language, the developer has to write a grammar in Xtext's grammar language. This grammar describes how an Ecore model is derived from a textual notation. From that definition, a code generator derives an ANTLR parser and the classes for the object model. Both can be used independently of Eclipse.

Xtext includes features which integrate well with the Eclipse-based IDE:

Xtext languages and the IDE are highly configurable, as the language infrastructure and the IDE are wired up using dependency injection and Google Guice. The default components can be easily replaced by binding customized ones instead.

Since version 2.0, Xtext has facilitated the development of domain-specific languages for the Java virtual machine, referring to and compiling to Java artifacts with tight integration into Eclipse's Java Development Toolkit. A reusable expression languages library enables rich behavior within the DSL.

A code generator written in Xtend can be hooked in for any language. For JVM languages, it is enough to map the DSL concepts to Java artifacts to get holistic Java integration. An alternative interpreter is also available.

Uses

At the time of writing this article, the Xtext homepage listed around 40 commercial and non-commercial projects from several application domains using Xtext.[4]

Awards

See also

Bibliography

Notes and References

  1. Web site: Xtext - Release Notes . eclipse.dev . 2023-05-29.
  2. Web site: Xtext - Language Engineering Made Easy!. Sven. Efftinge. www.eclipse.org. 16 February 2018.
  3. itemis. Retrieved from http://www.itemis.com.
  4. Retrieved from http://www.eclipse.org/Xtext/community.html.
  5. Web site: Eclipse Community Awards Winners Announced. Lynn. Gayowski. www.eclipse.org. 16 February 2018.
  6. Web site: Eclipse Community Awards Winners Announced. Ian. Skerrett. www.eclipse.org. 16 February 2018.
  7. Web site: Eclipse Community Award Winners Announced. Christopher. Guindon. www.eclipse.org. 16 February 2018.