🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5124

Re: Hierarchical Browsers (syntax directed editors)

#5124
From: Jan Gray
Date: Sat, 06 Feb 1988 07:17
35 lines
2381 bytes
In article <1666@brahma.cs.hw.ac.uk> jack@cs.glasgow.ac.uk (Jack Campin) writes:
>> what I am interested in is an interactive 
>>syntax-directed source code viewer that lets one control the amount of detail 
>>visible at various levels of nesting, so that more context is visible. ...
>> A (syntax-directed) viewer is presumably much simpler to write than 
>>a (syntax-directed) editor, and could be almost as useful.  
>>-David West    dwt@zippy.eecs.umich.edu
>
>There are tools available for generating syntax-directed editors; the Cornell
>Synthesizer Generator is the best known. The bottom of the learning curve for
>it is hard work, though. (the specification language is arcane)

Pure syntax directed editors have severe drawbacks.  (I know, I helped build a
Pascal programming environment around one).  Yes, they are quite flashy to
demo, and with the behind-the-scenes parse tree you can build very powerful
features such as a fancy debugger.  I might even advocate a syntax directed
editor for absolute beginners learning to program.  However, many experienced
programmers who are used to text editors for input will dislike your system.

The problem is that certain types of common text-editor transformations
(e.g. "change 'while a { while b {}}' into 'while b { while a {}}'" or
"change all occurrences of a.b into pa->b") become extremely difficult to
do in a syntax directed editor.   Ask yourself "how often in the course of
writing code in a text editor is my code syntactically correct?"

Of course, one solution is to add "drop down into text editing mode whilst
I do some non-syntactically-correct manipulations" and a built in parser,
but I suggest that the juxtaposition of the two very different editing
environments would be quite confusing.


These opinions have nothing to do with Microsoft Corp. or its products.

Jan Gray   uunet!microsoft!jangr   Microsoft Corp., Redmond Wash.   206-882-8080
Technical Details
Message-ID: <1134@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!microsoft!jangr
References: <747@zippy.eecs.umich.edu> <1666@brahma.cs.hw.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!microsoft!jangr
From: jangr@microsoft.UUCP (Jan Gray)
Newsgroups: comp.lang.misc
Subject: Re: Hierarchical Browsers (syntax directed editors)
Message-ID: <1134@microsoft.UUCP>
Date: 6 Feb 88 07:17:12 GMT
References: <747@zippy.eecs.umich.edu> <1666@brahma.cs.hw.ac.uk>
Reply-To: jangr@microsoft.UUCP
Organization: Microsoft Corporation, Redmond, WA
Lines: 35