background preloader

Xtext

Facebook Twitter

Xtext. Build the Language You Want!

Xtext

Xtext can build full-featured text editors for both general-purpose and domain-specific languages. In the background it uses the LL(*) parser generator of ANTLR, allowing to cover a wide range of syntaxes. Xtext editors have already been implemented for JavaScript, VHDL, Xtend, and many other languages. Compile to Whatever You Want! You define the target format to which your language is compiled. Highly Customizable The default behavior of Xtext is optimized to cover a wide range of languages and use cases. Single Sourcing The grammar definition language of Xtext is not just for the parser. Incremental Compiler Xtext is built to scale, so no matter if you have a few source files written in your language or hundreds of them, the IDE remains responsive and reacts smoothly to any text change.

Compatible with Graphical Editors You can combine the text-based formats created with Xtext with many graphical editing frameworks, e.g. Xtext/Documentation/Migration. This document describes how Xtext projects of oAW 4.3 can be migrated to TMF Xtext.

Xtext/Documentation/Migration

It assumes that you do have a running version of TMF Xtext as described in the Getting Started Document. work in progress Setup new workspace with existing oAW Xtext projects First, set up an Eclipse that works with TMF Xtext and create a new, empty workspace. Import your existing oAW Xtext projects (Grammar project, Generator project and UI project) into this workspace for further reference. Be sure to disconnect these projects from version control or to work on a branch. Create new TMF Xtext project Create your new Xtext project in this workspace with the Xtext project wizard. Start over if the resultung package or grammar names are not as expected. Setup minimalistic model Test, whether your generator project works.

If not done, yet, put your newly created projects under version control. Migrate grammar and linking General procedure Merge original grammar into new grammar definition migrate workflow Eclipse. Bei Grabthar’s Hammer!* » Blog Archiv » How to Run Xtext (and other MWE2 Workflows) with Ant. Some days ago Sebastian showed How to Deploy Xtext to a Headless Plain-Java Envorinment.

Bei Grabthar’s Hammer!* » Blog Archiv » How to Run Xtext (and other MWE2 Workflows) with Ant

It’s nearly as easy to run the Xtext generator with Apache Ant. You just need the required libraries and the following Ant snippet to run the Xtext generator (or any other MWE2 workflow): Using Xtext 1.0 the following libraries are required to run the generator: Setting up a RCP product for a Xtext DSL « Karsten's Blog. How can I produce a standalone application with the DSL editor I created?

Setting up a RCP product for a Xtext DSL « Karsten's Blog

This question pops up sometimes in the forum. I will show you how to set up a rather minimal RCP application that enables using the DSL editor created with Xtext. As an example I take the simple Xtext project that you get when you create Xtext projects with the default settings. Sources for the example project can be downloaded here. 1. Open the menu File / New / Project / Xtext and select Xtext Project. You will get the three projects org.xtext.example.mydslorg.xtext.example.mydsl.generatororg.xtext.example.mydsl.ui 2. 3.

Now we will create a Feature that contains only our DSL specific plugins. 4. A second feature should bundle all the plugins that are required to get the DSL editor running on the RCP platform.