TiogaAccessPrivate.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Russ Atkinson (RRA) July 2, 1985 11:06:55 am PDT
Doug Wyatt, September 2, 1986 5:49:34 pm 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 [Node],
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.Node,
textNode: TextNode.Node,
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.Node,
first: TextNode.Node,
last: TextNode.Node,
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.