StatementInterpreterPrivate.Mesa
Last Edited by: Spreitzer, January 7, 1985 10:48:28 pm PST
DIRECTORY AMModel, AMTypes, Interpreter, InterpreterOps, IO, PPLeaves, PPTree, Rope, SafeStorage, StatementInterpreter, SymTab;
StatementInterpreterPrivate: CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
Tree: TYPE = InterpreterOps.Tree;
Node: TYPE = REF PPTree.Node;
EvalHead: TYPE = InterpreterOps.EvalHead;
Context: TYPE = AMModel.Context;
Type: TYPE = AMTypes.Type;
TV: TYPE = AMTypes.TV;
nullType: Type = AMTypes.nullType;
SymbolTable: TYPE = SymTab.Ref;
Interval: TYPE = REF IntervalRep;
IntervalRep: TYPE = RECORD [
lowClosed, highClosed: BOOLFALSE,
low, high: TVNIL
];
Lambda: TYPE = REF LambdaRep;
LambdaRep: TYPE = RECORD [
name: ROPENIL,
args, rets: Fields ← NIL,
body: Node ← NIL,
symbols: SymbolTable ← NIL];
Fields: TYPE = REF FieldsRep;
FieldsRep: TYPE = RECORD [
named: BOOLEAN,
fields: SEQUENCE length: CARDINAL OF Field];
Field: TYPE = RECORD [
name: ROPENIL,
type: AMTypes.Type ← nullType,
typed, valued: BOOLEANFALSE,
value: REF ANYNIL];
SignalDecision: TYPE = RECORD [
type: SignalDecisionType,
fields: Fields ← NIL, --only if Return or Resume
label: ROPENIL--only if GoTo
];
SignalDecisionType: TYPE = {Reject, Retry, Continue, Resume, Return, Exit, Loop, GoTo};
BasicSignalDecisionType: TYPE = SignalDecisionType[Reject .. Continue];
empty: TV;
typeType: Type;
Exit: ERROR;
Loop: ERROR;
Return: ERROR [fields: Fields];
Resume: ERROR [fields: Fields];
GoTo: ERROR [label: ROPE];
DecideSignal: ERROR [decision: BasicSignalDecisionType];
NarrowToSymbolTable: PROC [ra: REF ANY] RETURNS [st: SymbolTable];
NestHead: PROC [outer: EvalHead, st: SymbolTable ← NIL] RETURNS [inner: EvalHead];
DigestFields: PROC [tree: Tree, eval, mayNIL: BOOLEAN, head: EvalHead ← NIL] RETURNS [fields: Fields];
ForceType: PROC [tv: TV, head: EvalHead, parent: Tree] RETURNS [Type];
InterpNoProps: PROC [tree: Tree, head: EvalHead, nest: BOOLTRUE];
EvalExpr: PROC [tree: Tree, head: EvalHead, target: Type ← nullType] RETURNS [tv: TV];
EvalReturn: PROC [rn: Node, head: EvalHead];
EvalResume: PROC [rn: Node, head: EvalHead];
EvalProcedure: PROC [head: EvalHead, tree: Tree, target: Type ← nullType, data: REFNIL] RETURNS [return: TV] --EvalQuote.EvalQuoteProc--;
END.