January 30, 2009
MPS by JetBrains
Our solution is to have code always maintained in an Abstract Syntax Tree (AST), which consists of nodes with properties, children and references, and fully describes the program code.

At the same time, MPS offers an efficient way to keep writing code in a text-like manner.

In creating a language, you define the rules for code editing and rendering. You can also specify the language type-system and constraints. This allows MPS to verify program code on the fly, and thus makes programming with the new language easy and less error-prone.

MPS uses a generative approach. You can also define generators for their language to transform code in the custom language to compilable code in some conventional language. Currently, MPS is particularly good for, but is not limited to, generating Java code. You can also generate XML, HTML, JavaScript, and more.

*MPS for Creating DSLs and Language Extensions*

MPS originally includes a ready-to-use universal language called BaseLanguage, which can itself be used to create programs. However, the right way to use MPS is to extend BaseLanguage and create new languages. MPS comes with several helpful extensions to BaseLanguage for working with strings, collections, dates, regular expressions, etc. You can also use them as a reference for creating new languages. These powerful tools make MPS quite proficient as an instrument for creating Domain Specific Languages (DSL).

*MPS for Using DSLs*

You can define custom language editors and other constraints for any new language, so that working with those DSLs becomes really simple. Domain experts who are not familiar with traditional programming can easily work in MPS with their domain-specific languages using domain-specific terminology.

Xtext is a framework/tool for development of external textual DSLs. Just describe your very own DSL using Xtext's simple EBNF grammar language and the generator will create a parser, an AST-meta model (implemented in EMF) as well as a full-featured Eclipse Text Editor from that.

The Framework integrates with technology from Eclipse Modeling such as EMF, GMF, M2T and parts of EMFT. Development with Xtext is optimized for short turn-arounds, so that adding new features to an existing DSL can be done in seconds. Still with the new version more sophisticated programming languages can be implemented.

tags: ComputersAndTechnology
comments powered by Disqus