Xtext
   HOME

TheInfoList



OR:

Xtext is an open-source software framework for developing
programming languages A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
and domain-specific languages (DSLs). Unlike standard
parser generators In computer science, a compiler-compiler or compiler generator is a programming tool that creates a parser, interpreter, or compiler from some form of formal description of a programming language and machine. The most common type of compiler- ...
, Xtext generates not only a
parser Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term ''parsing'' comes from Lat ...
, but also a class model for the
abstract syntax tree In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language. Each node of the tree denotes a construct occurr ...
, 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 Eclipse Modeling Framework (EMF) is an Eclipse-based modeling framework and code generation facility for building tools and other applications based on a structured data model. From a model specification described in XML Metadata Interchange ...
Project and is licensed under the
Eclipse Public License The Eclipse Public License (EPL) is a free and open source software license most notably used for the Eclipse IDE and other projects by the Eclipse Foundation. It replaces the Common Public License (CPL) and removes certain terms relating to ...
.


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. 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.itemis. Retrieved from http://www.itemis.com.


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 In computer-based language recognition, ANTLR (pronounced ''antler''), or ANother Tool for Language Recognition, is a parser generator that uses LL(*) for parsing. ANTLR is the successor to the Purdue Compiler Construction Tool Set (PCCTS), firs ...
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 Code or text folding, or less commonly holophrasting, is a feature of some graphical user interfaces that allows the user to selectively hide ("fold") or display ("unfold") parts of a document. This allows the user to manage large amounts of tex ...
* Rename refactoring Xtext languages and the IDE are highly configurable, as the language infrastructure and the IDE are wired up using dependency injection and
Guice Google Guice (pronounced like "juice") is an open-source software framework for the Java platform released by Google under the Apache License. It provides support for dependency injection using annotations to configure Java objects. Dependency ...
. 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 In computing, Code generation denotes software techniques or systems that generate program code which may then be used independently of the generator system in a runtime environment. Specific articles: * Code generation (compiler), a mechanism to pr ...
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. * 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" * Sebastian Zarnekow, commiter, Eclipse Community Awards 2011: "Top Committer" * Sven Efftinge, project lead, Eclipse Community Awards 2012: "Top Committer"


See also

*
JetBrains MPS JetBrains MPS (Meta Programming System) is a language workbench developed by JetBrains. MPS is a tool to design domain-specific languages (DSL). It uses projectional editing which allows users to overcome the limits of language parsers, and buil ...
*
Intentional programming In computer programming, Intentional Programming is a programming paradigm developed by Charles Simonyi that encodes in software source code the precise ''intention'' which programmers (or users) have in mind when conceiving their work. By using ...


References


Bibliography

* * {{Cite web , url=http://effi-blog.blogspot.com/2008/06/fowlers-dsl-example-with-xtext.html , title=Fowler's DSL example with Xtext , publisher=sven efftinge's blog , author= Sven Efftinge , access-date=2012-07-03 Eclipse (software) Software using the Eclipse license Language workbench Parser generators