ATStead: in-browser structured editing in ATS

36 views
Skip to first unread message

Artyom Shalkhakov

unread,
Oct 19, 2017, 12:09:59 PM10/19/17
to ats-lang-users
Hello all,

I'd like to share ATStead:


It is a simple structured editor based on:


Try it to see if you can enter some expressions! Structured editors are known to be clunky, but this one is at least modeless. :-)

Basically, all functionality presented in the paper works. In contrast to the paper, the editor's main datastructure is imperative and is very efficiently updated. So I guess it should scale to big, complex real-world ASTs (well, one can dream right???).

What I'm going to do next:
  • improve rendering (it's very dumb at the moment, both in terms of being from-scratch everytime, and in terms of lacking in visual clarity)
  • improve keyboard entry (handle keybindings, try guessing node types by lexing the input etc.)
  • add selection by mouse (this one is simple)
  • add undo/redo
  • extend to handle ABTs (so that the editor can help you out with typical programming stuff: renaming variables, looking up definitions, etc.)
  • make easily embeddable in a typical JS application

gmhwxi

unread,
Oct 19, 2017, 3:08:40 PM10/19/17
to ats-lang-users

Do you think we could combine ATStead with the following interpreter I wrote:

http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Fall16/.xshare/BitBucket/cs520-2016-fall/lectures/lecture-11-28/FPL-lambda/JS/FPL-lambda.html

If I define a datatype, can such an editor be generated based on the datatype
description?

Artyom Shalkhakov

unread,
Oct 19, 2017, 11:30:02 PM10/19/17
to ats-lang-users
On Friday, October 20, 2017 at 1:08:40 AM UTC+6, gmhwxi wrote:

Do you think we could combine ATStead with the following interpreter I wrote:

http://www.cs.bu.edu/~hwxi/academic/courses/CS520/Fall16/.xshare/BitBucket/cs520-2016-fall/lectures/lecture-11-28/FPL-lambda/JS/FPL-lambda.html

If I define a datatype, can such an editor be generated based on the datatype
description?

There is no code generation. By the way, would you recommend making [tree] parameterized by the type of label? Seems like an obvious thing to do.

Could you point me to the datatype that you use for that language? The current object language in ATStead has "lam" an "app" constructs, but not "fix" or "ifnz".

Hongwei Xi

unread,
Oct 19, 2017, 11:40:09 PM10/19/17
to ats-lan...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/0c089ac9-3b81-4205-9920-094645bcf78d%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages