Difference between revisions of "Xtext/Documentation"
(New page: = What is Xtext? = The TMF Xtext project provides a domain-specific language (the grammar language) for description of textual programming languages and domain-specific languages. It is t...)
Revision as of 07:25, 16 September 2008
- 1 What is Xtext?
- 2 The Grammar Language
- 3 Service framework
- 4 Runtime Architecture
- 5 UI Architecture
What is Xtext?
The TMF Xtext project provides a domain-specific language (the grammar language) for description of textual programming languages and domain-specific languages. It is tightly integrated with the Eclipse Modeling Framework (EMF) and leverages the Eclipse Platform in order to provide language-specific tool support. In contrast to common parser generators the grammar language is much simpler but is used to derive much more than just a parser and lexer. From a grammar the following is derived:
- incremental, Antlr3-based parser and lexer
- Ecore-based meta models (optional)
- a serializer, used to serialize instances of such meta models back to a parseable textual representation
- an implementation of the EMF Resource interface (using the concrete syntax defined in the grammar)
- a full-fledged integration of the language into Eclipse IDE
- syntax coloring
- navigation (F3, etc.)
- code completion
- outline views
- code templates
- folding, etc.
The generated artifacts are wired up through a dependency injection framework, which makes it easy to exchange certain functionality in a non-invasive manner. For example if you don't like the default code assistant implementation, you need to come up with an alternative implementation of the corresponding service and configure it via exlipe extension point.
The Grammar Language
At the heart of Xtext there is the grammar language. The grammar language is defined in itself, of course. The grammar can be found here []