TermCaps.Mesa
Last Edited by: Spreitzer, March 13, 1985 11:19:34 pm PST
DIRECTORY BasicTime, OrderedSymbolTableRef, Rope;
TermCaps: CEDAR DEFINITIONS
= {
GMT: TYPE = BasicTime.GMT;
nullGMT: GMT = BasicTime.nullGMT;
ROPE: TYPE = Rope.ROPE;
RopeList: TYPE = LIST OF ROPE;
SymbolTable: TYPE = OrderedSymbolTableRef.Table;
TermCap: TYPE = REF TermCapRep;
TermCapRep: TYPE = RECORD [
fileID: FileID,
contents: SymbolTable,
complaints: ROPENIL];
FileID: TYPE = RECORD [gName: ROPE, create: GMT];
Term: TYPE = REF TermRep;
TermRep: TYPE = RECORD [
names: RopeList ← NIL,
bestName: ROPENIL,
Also present in names.
caps: SymbolTable,
default: Term ← NIL];
Alias: TYPE = REF AliasRep;
AliasRep: TYPE = RECORD [name: ROPE, val: Term];
Cap: TYPE = REF CapRep;
CapRep: TYPE = RECORD [
name: ROPE,
val: Val];
Val: TYPE = REF ANY --actually UNION [{cancel}, RefBool, RefInt, String]--;
cancel: Val;
RefBool: TYPE = REF BOOL;
RefInt: TYPE = REF INT;
String: TYPE = REF StringRep;
StringRep: TYPE = RECORD [
pad: REAL ← 0,
proportional: BOOLFALSE,
str: ROPE];
GetTermCap: PROC [fileName: ROPE, wDir: ROPENIL] RETURNS [tc: TermCap];
GetTerm: PROC [tc: TermCap, name: ROPE] RETURNS [term: Term];
GetCap: PROC [term: Term, name: ROPE, default: Val ← NIL] RETURNS [val: Val];
EnumerateCaps: PROC [term: Term, consume: PROC [cap: Cap] RETURNS [stop: BOOL]];
EnumerateTerms: PROC [tc: TermCap, consume: PROC [term: Term] RETURNS [stop: BOOL]];
}.