LichenFromExtPrivate.Mesa
Last tweaked by Mike Spreitzer on April 29, 1988 11:39:23 am PDT
DIRECTORY Basics, AbSets, IO, LichenDataStructure, SetBasics, ViewerClasses;
LichenFromExtPrivate: CEDAR DEFINITIONS
= {OPEN Sets:AbSets, LichenDataStructure;
REFTEXT: TYPE = REF TEXT;
Viewer: TYPE = ViewerClasses.Viewer;
Path: TYPE = LIST OF REF ANY--UNION [ROPE, REF Range2]--;
paths: READONLY Sets.Space;
SourceList: TYPE = LIST OF Source;
Source: TYPE = RECORD [stream: IO.STREAM ← NIL, name: ROPE ← NIL];
Reader: TYPE = REF ReaderRep;
ReaderRep:
TYPE =
RECORD [
keyword: ROPE,
read:
PROC [s: Source, reader: Reader, cr: CellReading],
Consumes newline at end of line.
data: REF ANY];
DesignReading: TYPE = REF DesignReadingRep;
DesignReadingRep:
TYPE =
MONITORED
RECORD [
d: Design,
wDir: ROPE,
fetTypes: Fn--FetType b cached FetType--,
unkosherArrays: Set,
toMerge: Fn--array prefix b Set of Path--,
arraySpecs: Fn--array cell type b REF ArraySpec.array--,
mostRecentPathToMerge: Path ← NIL,
impossibleMerges: ImpossibleMergeList ← NIL,
buffer: REFTEXT,
pacifier, pie, label, pause: Viewer,
stop: BOOL ← FALSE,
stack: SourceList ← NIL,
curCellTypeName, prefix: ROPE ← NIL,
curArray: BOOL ← FALSE,
curCellFileLength: REAL ← 0,
change: CONDITION];
undefinedINT: INT = FIRST[INT];
ImpossibleMergeList: TYPE = LIST OF ImpossibleMerge;
ImpossibleMerge:
TYPE =
RECORD [
arrayInstance: CellInstance, path1, path2: Path];
CellReading: TYPE = REF CellReadingRep;
CellReadingRep:
TYPE =
RECORD [
dr: DesignReading,
ct: CellType,
name: ROPE,
firstMerge: BOOL ← TRUE,
resistClasses: INT ← undefinedINT,
rScale: REAL--ohms-- ← 1.0E-3,
cScale: REAL--farads-- ← 1.0E-18,
lUnits: REAL--meters-- ← 1.0E-8,
scalingDefined: BOOL ← FALSE,
fetCount: INT ← 0,
newArrays: Set--of array cell types instantiated in ct--,
waitingMerges: PathPairList ← NIL
];
PathPairList: TYPE = LIST OF PathPair;
Use: TYPE = RECORD [childName: ROPE, as: ArraySpec];
ArraySpec:
TYPE =
RECORD [
variant:
SELECT kind: *
FROM
scalar => [],
array => [
range: Range2,
sep: Int2
]
ENDCASE];
FetTerminal:
TYPE =
RECORD [
name: SteppyName,
length: INT];
IntBox: TYPE = RECORD [xmin, ymin, xmax, ymax: INT];
PathPair: TYPE = REF PathPairPrivate;
PathPairPrivate: TYPE = RECORD [p1, p2: Path];
FetType: TYPE = REF FetTypeRep;
FetTypeRep:
TYPE =
RECORD [
className: ROPE,
area, perim, twiceLength: INT,
ct: CellType ← NIL];
Register: PROC [keyword: ROPE, read: PROC [s: Source, reader: Reader, cr: CellReading], data: REF ANY ← NIL];
ReadCellType: PROC [d: Design, cellFileName: ROPE, dr: DesignReading] RETURNS [ct: CellType];
TryArrayFile: PROC [cr: CellReading];
FinishWaitingMerges: PROC [cr: CellReading];
DoMerges: PROC [s: Source, cr: CellReading];
ComparePaths: PROC [path1, path2: Path] RETURNS [c: SetBasics.TotalComparison];
CheckArrayUsage: PROC [d: Design, act: CellType];
TokenBreak: IO.BreakProc;
R: PROC [r: ROPE] RETURNS [ROPE] ~ INLINE {RETURN [r]}--stupid goddam anachronism--;
}.