Re: syntax-directed editing

Marat Boshernitsan <maratb@CS.Berkeley.EDU>
8 Sep 2000 01:56:13 -0400

          From comp.compilers

Related articles
syntax-directed editing stip@mathematik.uni-ulm.de (Alexander Stippler) (2000-08-27)
Re: syntax-directed editing qjackson@home.com (Quinn Tyler Jackson) (2000-09-07)
Re: syntax-directed editing maratb@CS.Berkeley.EDU (Marat Boshernitsan) (2000-09-08)
Re: syntax-directed editing neelk@brick.cswv.com (2000-09-08)
| List of all articles for this month |
From: Marat Boshernitsan <maratb@CS.Berkeley.EDU>
Newsgroups: comp.compilers
Date: 8 Sep 2000 01:56:13 -0400
Organization: University of California at Berkeley
References: 00-08-120
Keywords: editor

Alexander Stippler <stip@mathematik.uni-ulm.de> writes:


> How can I manage this rebuilding as little as possible of the AST and
> how can I do it at all?


You should take a look at the Harmonia project
(http://www.cs.berkeley.edu/~harmonia). We've been working on something
like this for a while (actually, we reparse on virtually every
keystroke) and we have a fairly general solution to the incremental
parsing problem (follow the "publications" link and look for Tim
Wagner's dissertation).


> Do you know some introducing papers or other
> materials on this topic?


There's been a lot of work on syntax directed editors done in the 80s.
Take a look at the reference section of Tim Wagner's work and you will
find a lot of useful references. One of the biggest caveats is getting
the user model "right", so that the user does not even suspect that
there's an AST underlying the textual representation he/she sees on the
screen. See


http://www.sun.com/research/people/mlvdv/COM.sun.mlvdv.www.pub.lncs896_abs.html


and, possibly,


http://www.sun.com/research/people/mlvdv/COM.Sun.Labs.Forest.doc.coset_2000.abs.html


Hope this helps,


Marat Boshernitsan, UC Berkeley


Our esteemed moderator writes:


> that incrementally updated the parse tree. If the text is stored in a
> tokenized form, I'd guess that reparsing is fast enough that it's
> not worth a lot of work to avoid. -John]


This is all true unless there's information associated with internal
AST nodes rather than leaves (tokens) and that cannot be (easily)
recomputed. An example would be profiling data attached to function
declarations. In this case it is worth the trouble to preserve as
much AST structure as possible across parses.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.