<> <> <> <> <<>> <<-- ExprRead: Read expressions of the form 'var _ expr' or 'var ~ expr'. If the operator is '_ then the expr is evaluated using symbols in a symbol table, or things in the global naming context. See Interpreter.mesa for more details. If the operator is '~ then expr is simply treated as a rope which is then assigned to var.>> <<-- This module uses the slot named '&' in the passed symbol tables as a temporary placeholder. Anything that the caller places there might be destroyed. >> DIRECTORY AMTypes USING [TV], SymTab USING [Ref], Rope USING [ROPE]; ExprRead: CEDAR DEFINITIONS = BEGIN Error: ERROR [ec: ErrorCode, msg: Rope.ROPE]; ErrorCode: TYPE = {Null, -- never raised CouldNotEval, -- could not evaluate expression NoValue, -- expression didn't return a value Syntax, -- bad expression syntax FileError, -- could not read from file MarkNotInTile, -- the Mark is not in the specified cell or design PlacedTileNotInDesign, -- the PlacedTile is not in the specified design ObjectMustBeTileOrDesign -- something else was passed }; <> Eval: PROC [expr: Rope.ROPE, symTab: SymTab.Ref] RETURNS [AMTypes.TV]; <> Assign: PROC [line: Rope.ROPE, symTab: SymTab.Ref]; <> ReadFile: PROC [fileName: Rope.ROPE, symTab: SymTab.Ref]; <> TVToRope: PROC [tv: AMTypes.TV] RETURNS[Rope.ROPE]; TVToListOfRope: PROC [tv: AMTypes.TV] RETURNS[LIST OF Rope.ROPE]; TVToInt: PROC [tv: AMTypes.TV] RETURNS[REF INT]; TVToCardinal: PROC [tv: AMTypes.TV] RETURNS[REF CARDINAL]; -- value must be non-negative TVToAtom: PROC [tv: AMTypes.TV] RETURNS[ATOM]; END.