TiogaAccessPrivate.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Doug Wyatt, July 2, 1985 10:59:52 am PDT
Russ Atkinson (RRA) July 2, 1985 11:06:55 am PDT
Private types for TiogaAccess.
DIRECTORY
Atom USING [PropList],
LooksReader USING [Ref],
Rope USING [ROPE],
RopeReader USING [Ref],
Rosary USING [ROSARY],
TextLooks USING [Looks, Runs],
TextNode USING [Ref],
TiogaAccess USING [CharSet, TiogaChar];
TiogaAccessPrivate: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
ROSARY: TYPE ~ Rosary.ROSARY;
CharSet: TYPE ~ TiogaAccess.CharSet;
TiogaChar: TYPE ~ TiogaAccess.TiogaChar;
ropePieces: NAT ~ 15;
Reader: TYPE ~ REF ReaderRep;
ReaderRep: TYPE ~ RECORD [
root: TextNode.Ref,
textNode: TextNode.Ref,
textNodeIndex: INT,
format: ATOM,
end: BOOLEAN,
comment: BOOLEAN,
nodeProps: Atom.PropList,
level: INT,
nodeLength: INT,
ropeReader: RopeReader.Ref,
looksReader: LooksReader.Ref,
startingOffsetFromOriginalRoot: INT,
putback: LIST OF TiogaChar
];
Writer: TYPE ~ REF WriterRep;
WriterRep: TYPE ~ RECORD [
root: TextNode.Ref,
first: TextNode.Ref,
last: TextNode.Ref,
level: INT,
lastLevel: INT,
nodeSize: INT,
ropes: ARRAY [0..ropePieces) OF ROPE,
textBuf: REF TEXT,
The contents of the current node is represented by the concatenation of ropes in order by decreasing index, together with the contents of textBuf. The size of ropes[i] is either 0 or approximately textBufSize*2**i; building the rope this way yields a balanced rope without a lot of flattening.
runs: TextLooks.Runs,
newLooks: TextLooks.Looks,
newLooksRepeat: INT,
charSets: ROSARY,
newCharSet: REF CharSet,
newCharSetRepeat: INT,
charProps: ROSARY,
newCharProp: Atom.PropList,
newCharPropRepeat: INT
];
END.