Re: History of code completion

Geoff Wozniak <gzw@home.com>
27 Oct 2001 18:34:15 -0400

          From comp.compilers

Related articles
History of code completion gswork@mailcity.com (2001-10-20)
Re: History of code completion lex@cc.gatech.edu (Lex Spoon) (2001-10-21)
Re: History of code completion neelk@alum.mit.edu (2001-10-23)
Re: History of code completion jsgray@acm.org (Jan Gray) (2001-10-23)
Re: History of code completion lhp+news@toft-hp.dk (2001-10-23)
Re: History of code completion gzw@home.com (Geoff Wozniak) (2001-10-27)
Re: History of code completion marcov@toad.stack.nl (Marco van de Voort) (2001-11-05)
Re: History of code completion genew@mail.ocis.net (2001-11-08)
Re: History of code completion binary@eton.powernet.co.uk (Richard Heathfield) (2001-11-08)
Re: History of code completion lex@cc.gatech.edu (Lex Spoon) (2001-11-08)
Re: History of code completion neelk@alum.mit.edu (2001-11-11)
Re: History of code completion rbates@southwind.net (Rodney M. Bates) (2001-11-11)
[1 later articles]
| List of all articles for this month |

From: Geoff Wozniak <gzw@home.com>
Newsgroups: comp.compilers,comp.programming
Date: 27 Oct 2001 18:34:15 -0400
Organization: Excite@Home - The Leader in Broadband http://home.com/faster
References: 01-10-091 01-10-112
Keywords: editor
Posted-Date: 27 Oct 2001 18:34:15 EDT

Lex Spoon <lex@cc.gatech.edu> writes:
>
> The other style is to leave the programmer with a general text editor,
> and then have the editor maintain a parse tree for what the user has
> typed -- essentially compiling while the user types.


I'm currently working on something for (X)Emacs that does this in a
better fashion than the current syntax highlighters do (the current
syntax highlighters basically work on regular expressions and don't
actually offer symbol completion).


I have yet to try it out (I'm still pondering a couple design
decisions related to C), but instead of keeping track of everything
all the time, you can simplify it immensely if you just parse the
input every time a completion is requested. You still need error
recovery, of course, because you have no idea what the input might be.


Admittedly, this is somewhat wasteful, but if parsing speeds are
acceptable, the system wouldn't be all that bad (as far as I can tell,
based on what I know). If speeds are not quite up to par, you can
either force the programmer to manually force a parse or cache some
information and not get all the symbols every time. Acceptable
losses, I suppose, but I guess I'll have to find out.


--
Geoff(rey) Wozniak, Limited Duties Instructor
University of Western Ontario
Computer Science Department
London, Ontario, Canada
http://woz.killdash9.org/


GPG Key: http://woz.killdash9.org/misc/woz.gpg


Post a followup to this message

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