What are the main differences between MPS Jetbrains and Eclipse Xtext?

I used Eclipse Xtext in several projects. I liked the ease of defining grammar using the Ecore (meta) model and allowing you to create everything for you, including the awesome Eclipse plug-in editor, but I was very uncomfortable with basic EMF with all the wires in static fields.

Recently, I met Jetbrains MPS (Meta Programming System) . This is based on a completely different philosophy. Although Xtext is designed to create text DSLs that generate a parser for you (and create instances of these EObjects), it is in the MPS language, which edits directly the basic structure of the model. So far I understand that.

Does anyone have experience working with these DSL tools to indicate the main differences in terms of working with them, the intended use cases and audience, complexity, learning curve (to be honest, to start using Xtext, you need to know a lot about EMF), generation code, etc.

+42
xtext dsl eclipse-emf mps
Apr 08 '10 at 20:16
source share
3 answers

Xtext is a traditional parser approach that works with regular text files. They can be mailed, saved, and mapped to any version control system and even modified outside the editor using your favorite command line tool. It integrates closely with the Eclipse EMF and works great with the whole set of tools you can find in the Eclipse ecosystem. Recently it has evolved (and still does) into some kind of “programming language development toolkit”, where it allows you to support all kinds of additional toolkit.

MPS, on the other hand, works with a projection editor that simply “looks” like text while working in the environment. The main storage format depends on the specific tool (read: not applicable without special programs) and does not analyze text files. This provides some great benefits, such as embedding custom langauges (like Regex inside SQL inside Java). The tool chain allows you to generate in the form of a model a simulation of transformations that, as a rule, look unusual at the beginning, but also powerful.

Both tools somehow block you in their world (MPS / Eclipse). Although you can run both in headless mode, you cannot easily launch the Xtext editor inside another environment. The same is true for MPS. I would say that Xtext is “more open” because it works with regular text files on the one hand and works well with installed tools (EMF and Eclipse in general) on the other.

Does this answer your question? I will try to give you more accurate answers if you have more detailed questions.

+48
Apr 09 '10 at 9:14
source share

The main idea of ​​MPS is to use a projection editor instead of a text one. This is language compatibility. For example, you can extend Java with tuples, and another person can extend Java with asynchronous method calls. In text tools (such as XText), it is impossible to guarantee that the two extensions work well together, since the resulting grammar can be ambiguous. MPS makes this possible. You simply add a language to your project, for example, add libraries.

+16
Nov 26 '10 at 11:13
source share

In my opinion, the Jetbrain MPS is easier to learn at first. You do not need to work with configuration files, such as Workflow-Files in xtext.

The main difference is that in MPS you edit the model directly, and this model is shown to you in the syntax / editor view. In xtext you are editing the syntax and the model is generated / parsed.

In my opinion, MPS is more powerful. You can combine languages ​​much easier and expand them. The big advantage of projection editors is that you can hide information or show additional information obtained from the model. You can also use various views, such as tables or graphs (in MPS 2.1).

Versioning can be done using MPS. Theres is a merge / diff tool that runs on a tree model.

+14
Apr 15 '11 at 10:44
source share



All Articles