[comp.lang.lisp] Hierarchical Browsers

dwt@zippy.eecs.umich.edu (David West) (01/28/88)

In a recent posting, I asked for (pointers to) info on writing hierarchical 
browsers, with particular reference to efficient screen updating. I should 
perhaps have been a little clearer; 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. 
for example an if-then-else that might occupy more than a single screen could 
be displayed as  
	if <boolexp> 
	then <stmts> 
	else <stmts>
with the contents of the <boolexp> or the <stmts> optionally displayable in
the same style.  A fisheye viewer is a variant of this in which the level
of detail displayed depends on a more general quantity than just depth of
nesting.  A (syntax-directed) viewer is presumably much simpler to write than 
a (syntax-directed) editor, and could be almost as useful.  In fact, I'm
surprised someone hasn't posted one to comp.sources.* already.
(I don't know enough about Emacs; does it do this? For different languages?
If so, is there a way to find out how it's done without reading the entire
GNU Emacs source, which I don't even have?)
Please reply by email, and I'll summarize if there's interest and enough info.

-David West    dwt@zippy.eecs.umich.edu

jack@cs.hw.ac.uk (Jack Campin) (01/30/88)

Expires:

Sender:

Followup-To:



>In a recent posting, I asked for (pointers to) info on writing hierarchical 
>browsers ...
> 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

I have tried to reach .edu sites MANY times from here and it almost never
works, so this is going to the news ...

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)

I supervised a student who implemented a rough approximation to the CSG in 12
weeks last summer (and did versions of lex and yacc on the way) - this was in
our persistent higher-order language PS-algol; you could probably do the same
in Standard ML in about the same time, but it would be a helluva grunt in a
glorified assembler like C. Write back (via a uucp site or nss.cs.ucl.ac.uk)
if you want more information.
-- 
ARPA: jack%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk
JANET:jack@uk.ac.glasgow.cs       USENET: ...mcvax!ukc!cs.glasgow.ac.uk!jack
Mail: Jack Campin, Computing Science Department, University of Glasgow,
      17 Lilybank Gardens, Glasgow G12 8QQ, Scotland (041 339 8855 x 6045)

sommar@enea.se (Erland Sommarskog) (02/01/88)

What I'm going to tell you about is probably a little aside of
what you're asking for, but it may be of interest to you anyway.
My apologies if it's not.

EXCO is not a viewer, but a fully-fledged editor, on the other
hand it is not syntax-directed. It is hierarchical, which is
why I bring it up.

In EXCO a line can either be a header line or a bottom line.
When you read in a file, you will only see the header lines.
You can expand such a line, to find new header lines or bottom
lines. When writing source code you typically write the pseudo-
code first and make those lines header lines, hiding one or
more source lines. You can of course work the other way. Write
a chunk of code see that it's getting too volumious and decide
to hide part of it.

You may wonder, "Hey what happens with those header lines when
I compile?". Well, EXCO introduces a new step in compile-link
chain, you must extract the source code first, but that's
is a relatively swift operation. Yes, the EXCO world has tools
for that.

I have been using EXCO for some years and it's quite nice. 
However, I feel the great advantage is when writing documents. 
EXUT, the related formatter uses the hierachical information 
for the chapter division. It saves from many obscure commands
a la nroff.

EXCO is not in the public domain. It is available on VMS and MS-DOS. 
For Unix it is currently only available for Sun. 

Write me if you want more info. No, neither I nor my employer have any
commercial interests in EXCO.
-- 
Erland Sommarskog       
ENEA Data, Stockholm        "Will you remember president Reagan
sommar@enea.UUCP             will you rememeber all the bills we'll have to pay
                             or even yesterday, tomorrow?" - David Bowie

lambert@cwi.nl (Lambert Meertens) (02/01/88)

[I am posting this instead of replying by email, because of some incredible
piece of software on the way.  Can you believe this: using the news reply
facility, the address generated was "To: dwt@zippy.eecs.umich.edu"; the
message got returned to me because: "david_west@iti... User unknown".  My
reply did not contain either of the names "David" or "West".  Now if this
user is unknown, how do they (does it) know that dwt == david_west?  Beats
me.]

From: Mailer-Daemon%iti@umix.cc.umich.edu (Mail Delivery Subsystem)
Subject: Returned mail: User unknown
Message-Id: <8801310903.AA27366@itivax.iti>
To: lambert@piring.cwi.nl
Status: R

   ----- Transcript of session follows -----
550 david_west@iti... User unknown

   ----- Unsent message follows -----
Received: by itivax.iti (5.51/1.0)
	id AA27364; Sun, 31 Jan 88 04:03:50 EST
Received: by umix.cc.umich.edu (5.54/umix-2.0)
	id AA14037; Sun, 31 Jan 88 01:45:03 EST
Received: by zippy.eecs.umich.edu (5.51/umich-5.0)
	id AA29702; Sun, 31 Jan 88 01:42:54 EST
Received: from mcvax.UUCP by uunet.UU.NET (5.54/1.14) with UUCP 
	id AA14539; Sun, 31 Jan 88 01:41:59 EST
Received: by mcvax.cwi.nl; Sun, 31 Jan 88 04:31:07 +0100 (MET)
Received: by piring.cwi.nl; Sun, 31 Jan 88 04:24:26 +0100 (MET)
Date: Sun, 31 Jan 88 04:24:26 +0100
From: lambert%cwi.nl%mcvax.uucp@uunet.UU.NET (Lambert Meertens)
Message-Id: <8801310324.AA11895@piring.cwi.nl>
To: dwt@zippy.eecs.umich.edu
Subject: Re: Hierarchical Browsers
Newsgroups: comp.lang.lisp,comp.lang.misc
In-Reply-To: <747@zippy.eecs.umich.edu>
Organization: CWI, Amsterdam

In article <747@zippy.eecs.umich.edu> you write:
) In a recent posting, I asked for (pointers to) info on writing hierarchical 
) browsers, with particular reference to efficient screen updating. I should 
) perhaps have been a little clearer; 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. 

You might find the following reference of interest:

    %A M. Mikelsons
    %T Prettyprinting in an interactive programming environment
    %B Proc. of the ACM SIGPLAN SIGOA Symp. on Text Manipulation
    %P SIGPLAN Notices 16, nr. 6, 108-116
    %D 1981

If you get further interesting info, I would appreciate receiving a copy.

-- 

Lambert Meertens, CWI, Amsterdam; lambert@cwi.nl

woodl@byuvax.bitnet (02/03/88)

detail.  George Furnas as Bell Labs has some interesting work in the area
of human computer interface notions via a fisheye view analogy.  He has
implemented for tree structures, structured programming languages, calenders
and some other interesting structures.  Anyone interested in more info,
contact me.
Larry Wood, Brigham Young University, WoodL@BYUVAX.bitnet