DIRECTORY JunoAlgebra USING [Se]; JunoProcViewer: DEFINITIONS = BEGIN OPEN Alg: JunoAlgebra; StartUp: PUBLIC PROC; GetCurrentDef: PUBLIC PROC [name: ATOM] RETURNS [value: Alg.Se]; AddDef: PUBLIC PROC [name: ATOM, value: Alg.Se]; Terminate: PUBLIC PROC; END. ROPE: TYPE = Rope.ROPE; GetBody: PUBLIC PROC [name: REF ANY] RETURNS [REF ANY]; GetLocals: PUBLIC PROC [name: REF ANY] RETURNS [REF ANY]; AddDef: PUBLIC PROC [name, locals, body: REF ANY]; -- adds to lambdaAlist the definition of name Handle: TYPE = REF HandleRep; NewHandle: PROC [v: ViewerClasses.Viewer] RETURNS [h: Handle]; HandleRep: TYPE = RECORD [ ph: Parser.Handle, viewer: ViewerClasses.Viewer, WellFormed: SyntacticPredicate, content: LIST OF NodeContent, contentValid: BOOL]; NodeContent: TYPE = RECORD [text1: ROPE, text2: ROPE, tree: REF ANY]; SyntacticPredicate: TYPE = PROC [f: REF ANY] RETURNS [VerdictAndCulprit]; VerdictAndCulprit: TYPE = RECORD [verdict: Verdict, culprit: REF ANY]; Verdict: TYPE = {Yes, No, OfCourseNot}; -- Yes == innocent HasForm: PROC[f: REF ANY, op: ATOM, Arg1: SyntacticPredicate, Arg2: SyntacticPredicate _ NIL] RETURNS [VerdictAndCulprit]; Or: PROC [aw1, aw2: VerdictAndCulprit] RETURNS [r: VerdictAndCulprit]; ParseViewer: PUBLIC PROC [pw: Handle]; AddTree: PUBLIC PROC[pw: Handle, tree: REF]; AddText: PUBLIC PROC[pw: Handle, text1: ROPE, text2: ROPE]; AddOp: PROC[h: Handle, op: ROPE, alias: ROPE, -- alternate form; op is preferred bp: INTEGER, f: OperatorType, c: ROPE, u: INT _ 0]; OperatorType: TYPE = {infix, matchfix, subfixMatchfix, prefix, infixPrefix, closefix};  JunoProcViewer.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 6, 1984 4:39:04 am PDT Maintains a text viewer containing the current set of Juno procedures. Exports procedures that search this list and that append new procedures to it. TO FIX: Implement it. TO FIX: Should we have procedures to lock/unlock the proc viewer while an evaluation is in progress? Or should there be a procedure that returns the current a-list, called once at the beginning of a command?. Opens the Juno source viewer and initializes data structures. Get definition of name by searching proc viewer. Will re-parse viewer if necessary. Adds a new procedure to the current set, unparses it and displays on the viewer Destroys the Juno source viewer and sets the procedure Alist to NIL. - - - - OLD JUNK - - - - XXX Moved here from JunoStorage on April 6, 1984 3:52:04 pm PST; need to be fixed!!! - - - - XXX culprit relevant only if verdict is No or OfCourseNot HasForm tests if Car[f] is of the form (op x y) where x is of the form Arg1 and y is of the form Arg2,unless Arg2 = NIL in which case the test is for the form (op x). It is assumed that Arg1 # NIL and (Arg1 = NIL => Arg2 = NIL). unparses the tree, adds the text, and repaints the viewer. adds a new last node to the viewer, with header text1 and body text2. Does not parse the viewer or alter pw.content. The idea is that text1 and text2 will have fields to be filled in by the user. ʘ™-™J™ J™1J™5—J™˜—JšœÏbœ™JšœœÊ™ÑšœÏk ˜ Jšœ žœ˜—Jšœœž œ˜šœž˜Jšœžœ˜šœÏnœžœžœ˜JšœC™C—š œŸ œžœžœžœžœ˜AJšœY™Y—š œŸœžœžœžœ˜1JšœP™P—šœŸ œžœžœ˜JšœJ™J——Jšœžœ˜šœ™Jšžœžœžœ˜šœ ™ JšœP™QJšœŸœžœžœžœžœžœžœžœ˜8JšœŸ œžœžœžœžœžœžœžœ˜:Jš œŸœžœžœžœžœÏc.˜c—šœ ™ Jšœ žœžœ ˜JšœŸ œžœ%žœ ˜IJš œ žœžœfžœžœžœ˜ªJšœžœžœ žœ žœžœžœŸœžœžœžœžœžœ˜”š œžœžœžœžœ˜IJšœ5™5—Jšœ žœ ˜;šœŸœžœžœžœžœKžœžœ˜–Jšœæ™æ—JšœŸœžœ$žœ˜LJšœŸ œžœžœ˜(Jš œŸœžœžœžœ˜-Jšœ:™:š œŸœžœžœžœ žœ˜