JetBrains MPS

JetBrains MPS

Projectional editor for building domain specific languages

Description

Anyone who has built a DSL knows where it hurts: the grammar is the easy part, and then you still owe the world a lexer and a parser — and every change to the syntax means rewriting them. JetBrains MPS removes that step entirely. It uses projectional editing, so what you edit is the abstract syntax tree itself and what you see on screen is just one rendering of that tree. No parser is ever needed.

Once parsing is gone, a language is no longer stuck looking like text. A decision table can be an actual table sitting inside a method body, a formula can carry real fractions and summation signs, a state machine can be a diagram. Notation your domain experts already read becomes part of the language instead of something they have to translate into braces first.

Features



Projectional editor: the caret, completion and refactorings all operate on AST nodes, so unbalanced brackets and broken indentation simply cannot be typed — syntactically invalid code never gets entered in the first place.

Tables, diagrams and math notation: a language's concrete form can be a table, a tree, a graph or typeset mathematics rather than lines of text, which is what finally lets a rate card or a condition matrix be written as the table it is.

Built-in generators: compile the DSL down to Java, C, XML and other targets, so a finished model lands on something runnable without you maintaining a template engine on the side.

Languages extend each other: build a new language on top of an existing one, bolt your own statements onto Java, or mix several DSLs inside the same file.

The whole IDE comes free: it runs on the IntelliJ platform, so your language gets highlighting, completion, find-usages, refactoring, a debugger with breakpoints and configured Git and Subversion support without extra work.

Sample languages in the box: the install ships a set of complete examples, from a minimal expression language up to voice menus and decision tables — far faster to adapt than starting from an empty project.