<<>> <> <> <> <> <<>> DIRECTORY Rope, MathObjects, MathStructures; MathExprs: CEDAR DEFINITIONS ~ BEGIN <> ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; Object: TYPE = MathObjects.Object; <> Expr: TYPE = Object; ExprData: TYPE ~ REF ExprDataRep; -- external abstract type ExprDataRep: TYPE; -- internal concrete rep <> None - no Domain-specific data <> EltFlavor: MathObjects.UnaryToRefOp; -- $flavor Method; returns $Element EltDisplay1: MathBoxTrees.EltDisplayOp; Unpack1: PROC [e: Expr] RETURNS [Results]; -- Private Unpack proc used by EltDisplay1. EltDisplay2: MathBoxTrees.EltDisplayOp; <<>> <> EltDisplay: MathBoxTrees.EltDisplayOp; <> EltRead: MathObjects.ReadOp; <> <> <<>> EltToRope: MathObjects.ToRopeOp; <> EltFromRope: MathObjects.FromRopeOp; LegalFirstChar: MathObjects.LegalFirstCharOp; EltWrite: MathObjects.WriteOp; <> EltEval: MathEnvironments.EvalOp; <> <> <<>> <> <<Apply obvious rules, including substitution (and recursive call) for $symbol's that have bindings in e>> <> <> <<[op, args] _ ... ;>> <> <> <> <> <<}; -- also catch $assign$ or $kill$; ERROR if firstArg no Exprs>> <> <<{key _ $foo; [hint, eArgs] _ [eArgs.first, eArgs.rest] }>> <> <<[value, newEnv] _ MathEnvironments.AttemptMethod[op, hint, eArgs, e];>> <<{ if failure SIGNAL, then output a "functional" Expr, i.e. name[ ... argObjects ...] }>> <> <<>> <> <<[m,] _ LookupMethodInStructure[$foo, S, tryOther: FALSE, e];>> <> <> <> <> <> <> <> <<>> <> <> <> <<>> <> <> <> <<>> <> <> <<>> <> <> <> <> <> <<>> <> <> <> <> <> <> <> <<>> <> <> <> <> <> <<>> <<Field1: MathObjects.UnaryOp;>> <> <<>> <<Field2: MathObjects.UnaryOp;>> <> <> <> <> <> <> <> <> <> <> <<>> <<Data1: MathObjects.UnaryOp;>> <> <<>> <<Data2: MathObjects.UnaryOp;>> <> <> <> <> <> <> <> <<>> <> <> <<>> <> <> <<>> <> <> <<>> <> <> <<>> <> END.