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 (like e.g. JavaCC or ANTLR), the grammar language is used to derive much more than just a parser and lexer (lexical analyzer).
From a grammar the following is derived:
incremental, ANTLR 3 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
a linker
an implementation of the EMF Resource interface (based on the parser and the serializer)
a full-fledged integration of the language into Eclipse IDE
syntax coloring
navigation (F3, etc.)
code completion
outline views
code templates
The generated artifacts are wired up through Google Guice, 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, all you need to do is to come up with an alternative implementation of the corresponding service and configure it via dependency injection.