Xtext ist ein Open-Source -Software-Framework zur Entwicklung von Programmiersprachen und domänenspezifischen Sprachen (DSLs). Im Gegensatz zu herkömmlichen Parsergeneratoren generiert Xtext nicht nur einen Parser , sondern auch ein Klassenmodell für den abstrakten Syntaxbaum und bietet zudem eine voll ausgestattete, anpassbare Eclipse-basierte IDE. [ 2 ]

Xtext wird im Rahmen des Eclipse-Projekts als Teil des Eclipse Modeling Framework -Projekts entwickelt. Es ist unter der Eclipse Public License lizenziert . [ 3 ]

Geschichte

Die erste Version von Xtext wurde 2006 im Rahmen des Projekts openArchitectureWare veröffentlicht. Die letzte im Rahmen des oAW-Projekts veröffentlichte Version war Version 4.3. Seit Anfang 2008 wird Xtext bei Eclipse im Rahmen des Eclipse Modeling Project weiterentwickelt. [ 4 ]

Parallel zu Eclipses jährlichem Update-Zyklus veröffentlichte Xtext die Versionen 0.7.0 (Juni 2009), 1.0 (Juni 2010), 2.0 (Juni 2011), 2.3 (Juni 2012), 2.5 (Dezember 2013), 2.6 (Mai 2014) und 2.7 (September 2014). Das Framework wird hauptsächlich von der deutschen Firma Itemis entwickelt. [ 5 ]

Funktionalität

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:

  • Syntax coloring
  • Code completion
  • Static analysis
  • Outline view
  • Source-code navigation
  • Indexing
  • Compare view
  • Hovers
  • Code folding
  • Rename refactoring

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.[6]

  • An implementation of AWK, the popular Domain Specific Language (DSL) is based on Xtext.
  • The general-purpose language Xtend is also built with Xtext.

Awards

  • Eclipse Community Awards 2010: "Most Innovative New Feature or Eclipse Project"[7]
  • Sebastian Zarnekow, commiter, Eclipse Community Awards 2011: "Top Committer"[8]
  • Sven Efftinge, project lead, Eclipse Community Awards 2012: "Top Committer"[9]

See also

References

  1. ^"Xtext - Release Notes". eclipse.dev. Retrieved 2023-05-29.
  2. ^github/xtext, Eclipse Foundation, 2021-02-04, retrieved 2021-02-08
  3. ^Web, EclipseWeb (2013-01-31). "Eclipse Xtext". projects.eclipse.org. Retrieved 2024-11-24.
  4. ^ Efftinge, Sven. „Xtext – Sprachentwicklung leicht gemacht!“ . www.eclipse.org . Abgerufen am 16. Februar 2018 .
  5. ^ itemis. Abgerufen von http://www.itemis.com .
  6. ^ Abgerufen von http://www.eclipse.org/Xtext/community.html .
  7. ^ Gayowski, Lynn. „Eclipse Community Awards Winners Announced“ . www.eclipse.org . Abgerufen am 16. Februar 2018 .
  8. ^ Skerrett, Ian. „Gewinner der Eclipse Community Awards bekanntgegeben“ . www.eclipse.org . Abgerufen am 16. Februar 2018 .
  9. ^ Guindon, Christopher. „Eclipse Community Award Winners Announced“ . www.eclipse.org . Abgerufen am 16. Februar 2018 .

Bibliographie