Re: Smart textual editors

Darius Blasband <darius@phidani.be>
24 Jul 1996 22:53:01 -0400

          From comp.compilers

Related articles
[3 earlier articles]
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)
Re: Smart textual editors yuval.peduel@channel1.com (1996-07-26)
Re: Smart textual editors bdynin@movil.com (1996-07-26)
Re: Smart textual editors balaji@platinum.com (1996-08-01)
| List of all articles for this month |
From: Darius Blasband <darius@phidani.be>
Newsgroups: comp.compilers
Date: 24 Jul 1996 22:53:01 -0400
Organization: Phidani Software, Brussels
References: 96-07-103 96-07-115
Keywords: syntax, tools

> > 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.)


Jacob Navia wrote:
> Having implemented a syntax analyzing editor, I think the editor you want
> is out of the question for the foreseeable future (2-3 years...).


> This simple analysis is very difficult to do in real time: If you happen
> to type a '/' just before a '*' all the text until the end of the file
> will be a comment, and has to be changed (redrawn). The editor has to
> scan each character you type looking for 'interesting' ones, like '/', to
> avoid rescaning the whole file at each character typed.


Given the performance of modern machines, I don't think it would be a true
problem to have a parser going through the entire source when the system is
idle, and which simply does not analyze any further if a syntax error is
found (in which case it might even display a non-intrusive message at the
bottom of the screen). The analysis would be interruptable. If the user
presses a key, the analysis is cancelled, and started again later.


If the language is reasonably easy to analyze (I guess that C and C++'s
preprocessor would make the taks quite more difficuly) I believe - without
formal evidence, though - that this kind of brute force approach could be
applied successfully.


We have a Modula-2 oriented editor with a syntax checker that analyzes over
3000 lines per second on a pentium, and it was not even remotely optimized.
I agree that semantical analysis might prove much more difficuly, but my
experience would make me believe that it is perfectly feasible.


In my opinion, of course...


Regards,


darius
--


Post a followup to this message

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