Related articles |
---|
Smart textual editors gupta@csc.ti.com (1996-07-15) |
Re: Smart textual editors jacob@jacob.remcomp.fr (1996-07-18) |
Re: Smart textual editors kanze@lts.sel.alcatel.de (1996-07-20) |
Re: Smart textual editors gupta@csc.ti.com (1996-07-20) |
Re: Smart textual editors mihai@west.net (Mihai Christodorescu) (1996-07-20) |
Re: Smart textual editors bjm@dcs.ed.ac.uk (1996-07-22) |
Re: Smart textual editors cuedng@uic.edu (Nick Geovanis) (1996-07-23) |
Re: Smart textual editors mihai@west.net (Mihai Christodorescu) (1996-07-23) |
Re: Smart textual editors peach@entrenet.com (1996-07-24) |
Re: Smart textual editors darius@phidani.be (Darius Blasband) (1996-07-24) |
Re: Smart textual editors pc@linus.mitre.org (1996-07-26) |
[3 later articles] |
From: | Mihai Christodorescu <mihai@west.net> |
Newsgroups: | comp.compilers |
Date: | 20 Jul 1996 21:41:58 -0400 |
Organization: | Compilers Central |
References: | 96-07-103 96-07-115 |
Keywords: | tools |
Jacob Navia wrote:
> > I was looking for smart textual editors. By smart, I mean editors
> > which might be doing data flow analysis and such things even while the
> > editing is in progress so that they can point out the errors to the
> > programmer. (e.g. if certain part of the code is unreachable, then it
> > might give hints to the programmer etc.)
>
> But doing a DATA FLOW ANALYSIS in real time?
>
> First, a representation of all the globals/variables of the current
> procedure would be necessary. This information would have to be updated
> constantly, since the user is constantly modifying the program text!!!
> Syntax errors would have to be ignored, and I do not know how: what do
> you do when the user just typed a ' { ' ???
>
> Where you will put the missing closing brace?
>
> This solves the syntax error problem. As the moderator rightly pointed
> out, syntax errors MUST be accepted by the editor's parsers to let the
> user type what he wants without the editor becoming an obstacle to the
> user.
I think such a SMART editor will not come in the next ten years, because
it needs a very powerful capability: to understand what the program is
doing, not only syntax checking.
Consider the following scenario in C:
1: void function(void)
2: {
3: ....
4: { // a start of a block
5: ...
6: { // now the user types { instead of } for closing the block
7: // the two keys are very close on the keyboard ;-)
8: ....
9: }
Now the editor has to decide if there are TWO closing brackets missing
or just ONE INSTEAD of "{" on line 6. My solution is analyzing the logic
of the algorithm... at my current level of knowledge I don't know of such
a SMART EDITOR.
Regards, Mihai
P.S. every sentence should start with IMHO
Mihai Christodorescu
-------------------------------------------------------------------------------
mihai@west.net
221 Estancia Place, Camarillo, CA 93012-5242, USA
http://www.west.net/~mihai
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.