DIRECTORY AMTypes USING [TV], AMModel USING [Context], Rope USING [ROPE], SymTab USING [Ref]; Interpreter: CEDAR DEFINITIONS = BEGIN OPEN AMModel, Rope, AMTypes; AbortClosure: TYPE = RECORD [proc: AbortProc, data: REF _ NIL]; nilAbortClosure: AbortClosure = [NIL, NIL]; AbortProc: TYPE = PROC [data: REF] RETURNS [abort: BOOL _ FALSE]; Evaluate: PROC [rope: ROPE, context: Context _ NIL, -- NIL means use AMModel.RootContext[LocalWorld[]] symTab: SymTab.Ref _ NIL, -- look here first for name to TV lookup abort: AbortClosure _ nilAbortClosure -- default is to never abort ] RETURNS[result: TV, errorRope: ROPE, noResult: BOOL]; EvaluateToRope: PROC [rope: ROPE, context: Context _ NIL, -- NIL means use AMModel.RootContext[LocalWorld[]] symTab: SymTab.Ref _ NIL, -- look here first for name to TV lookup abort: AbortClosure _ [NIL, NIL] -- default is to never abort ] RETURNS[result: ROPE, errorRope: ROPE, noResult: BOOL]; END. Interpreter.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Paul Rovner, July 25, 1983 10:25 am Russ Atkinson (RRA) February 12, 1985 3:00:02 pm PST ... called by Evaluate at intervals to ask whether it should abort its task and return. USING THE INTERPRETER ... parses and interprets the given rope as a Mesa expression, returning a TV for the result (noResult is TRUE if there is no result). ... is just like Evaluate, except that the result is a ROPE produced by IO.PutTV with defaulted arguments. ΚΤ˜codešΟi œ™Kšœ Οmœ1™