JunoGlobalAlist.mesa (ex OldParseWindow.mesa)
Coded September 6, 1982 12:25 am
Last Edited by: Gnelson, October 11, 1983 9:29 pm
Last Edited by: Stolfi, June 13, 1984 11:03:23 am PDT

Maintains a collection of text viewers containing the current set of Juno procedures. Exports procedures that search this list and that append new procedures to it.

TO FIX: Implement it.

DIRECTORY

JunoParseUnparse USING [Se];

JunoGlobalAlist: DEFINITIONS =

BEGIN

OPEN Parser: JunoParseUnparse;

StartUp: PUBLIC PROC;

Opens one Juno source viewer and initializes data structures.

ParseAll: PROC;

Parses all procedure viewers that need to be parsed, building global procedure AList.

AddViewer: PUBLIC PROC;

Appends a new empty viewer to the list of proc viewers.

GetDef: PUBLIC PROC [name: ATOM] RETURNS [value: Parser.Se];

Get definition of name by searching global procedure Alist built by last call to ParseAll.

AddDef: PUBLIC PROC [name: ATOM, value: Parser.Se];

Adds a new procedure to the current set, unparses it and displays on the viewer.

The value must be a lambda-expression,
(Parser.lambda <formals> <body>),
where the <formals> are NIL or a commated nest of atoms
It is converted to the old-style (Juno I) procedure declaration format
(Parser.colon (Parser.leftPren <name> <paramters>) <body>) or
(Parser.colon <name> <body>)

Terminate: PUBLIC PROC;

Destroys the Juno source viewer and sets the procedure Alist to NIL.

END.