New Javascript language for MPS or... a sort of.

Hi,
I just published what I developped so far during the last days.
It's an implementation of Javascript (ECMAScript 5.1) that I would like to use to generate Javascript after further improvements.

Here you can find the github project https://github.com/mar9000/ecmascript4mps
and here a small presentation http://mar9000.org/bliki/ecma-script-4-mps.html

I saw a similar project on github but it's quite old and probably less complete then mine with respect to supported constructs. ECMAScript4MPS is complete with respect to supported syntax.
It's just a draft work I know. I think to improve it in the future at least to make it usable in generation templates.
I would like to thank people from this forum who helped me when I did not have a clue.
Mainly Vaclav.

Mar
7 comments
Great work, Marco! Thank you for sharing it. Do you plan to migrate the project to 3.2?
You mention a desire to write a developer guide in your blog post. What topics would you like to cover?
0
Thanks Vaclav.
Yes I think to migrate to 3.2, I'll make a try one of these days.

With respect to documentation I would like, also as a way to organize my knowledge, to highlight a series of pattern that could help passing from grammar description (ANTLR, EBNF, PEG...) to the aspects you need to implement the same edit in projectional editing.
In theory that piece of a language that is "text editing" should be derived from its grammar.
I don't have the background to do it in a exhaustive way so... I don't how far I'll get.

In this sense should then be interesting to highlight some of these patterns in this, and in future versions, of ECMAScript4MPS.
0
This would be pretty useful, I believe, and I'd be interested to read it.

BTW, we're experimenting with a grammar-like editor definition language for one of the future MPS releases.
0
Hi Marco
Indeed, as Vaclav said, we're currently working exactly on the mechanism of deriving editing behaviour from not really grammar but a very grammar-like description. If you're into it then it would be great if you posted some update here from time to time. Even if it's only a link to a blog post, or something.
0
I am wondering if it would make sense for people interested in this line of development to talk about their plans and share with others. The MPS roadmap is very terse, and perhaps a page on confluence where groups can discuss features under development would be useful.

I am also interested in better integration between parsing technology and projectional editing in MPS and would be happy to discuss and share ideas.
0
At the moment mine it's only a feeling that I had after my first grammar-to-MPS translation. Several pieces of the implementation were repetitive so there should exists some way to automate them at least to outline the 90% of a language.
I don't feel I can help you guys at MPS :-) but I'll be happy to share my progess, the ECMAScript4MPS project does not have any internal/non-public part.

@Fabien: in case I'll post here, and switch to somethingelse as soon it will be set up.
0
Yes, I would imagine you would be looking at a lot of repetitive implementation bits.

I am thinking in addition to editing behavior, there are precedents to annotating a grammar to indicate how to populate an AST. For instance, see http://www.irisa.fr/caps/people/hardy/m1comp/doc/trees.html for a (arguably convoluted) description of how ANTLR manages to do that.

I am wondering if it would be possible to generate most of a language from a grammar, with specialized annotations. I personally prefer to develop languages the MPS way, but if a grammar is available, I would not mind having a simpler way to obtain an MPS language for that language than to re-implement everything from scratch.
0

Please sign in to leave a comment.