Building DSLs with Eclipse

SLs are becoming more & more popular, allowing developers to express their intent more precisely & with less syntactic noise. DSLs can be built on top of a host language (like Java or Ruby), which are referred to as “internal DSLs”. External DSLs are far more flexible in terms of language design: you can define any desired grammar, you can define domain specific constraints & error messages, & you can process the DSL in a concise manner because it can either be interpreted or transformed into the code of any language by a generator. Xtext, which is a part of the Eclipse Galileo release (and the upcoming Helios release), is a framework for developing textual domain-specific languages. Given an EBNF-style grammar, Xtext automatically generates an Ecore meta model & a rich-featured, fully configurable text-based DSL editor including features such as syntax highlighting, hyperlinked reference navigation, reference look-up, code completion, formatting, an outline & so on.