Skip to main content
Jump to: navigation, search

Eclipse Modeling Day/Session Abstracts Toronto

< Eclipse Modeling Day
Revision as of 10:58, 21 September 2009 by Ian.skerrett.eclipse.org (Talk | contribs) (New page: ====Building DSLs with Xtext==== Domain-Specific Languages (DSLs) are becoming more and more popular, allowing developers to express their intent more precisely and with less syntactic no...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Building DSLs with Xtext

Domain-Specific Languages (DSLs) are becoming more and more popular, allowing developers to express their intent more precisely and 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 and error messages, and 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, is a framework for developing textual domain-specific languages. Given an EBNF-style grammar, Xtext automatically generates an Ecore meta model and 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 and so on. The default implementation can easily be customized.

In this session we will explain what DSLs are and why you should care about using them. After a short introduction, we will show how to develop DSLs with Xtext during a live demo. You will see how to define a grammar for a DSL and create a full-blown editor for this DSL. We will also show how to apply code generation that allows you to transform your DSL scripts into running software.

Back to the top