storage management, exported by PGSControl
MakeSymTab: PROC[length: CARDINAL] RETURNS[new: SymTab];
MakeSymInfo: PROC[length: CARDINAL] RETURNS[new: SymInfo];
MakeAliases: PROC[length: CARDINAL] RETURNS[new: Aliases];
MakeTokenInfo: PROC[length: CARDINAL] RETURNS[new: TokenInfo];
MakeProdInfo: PROC[length: CARDINAL] RETURNS[new: ProdInfo];
MakeRhsChar: PROC[length: CARDINAL] RETURNS[new: RhsChar];
MakeStateInfo: PROC[length: CARDINAL] RETURNS[new: StateInfo];
MakeTable: PROC[length: CARDINAL] RETURNS[new: Table];
MakeBackChain: PROC[length: CARDINAL] RETURNS[new: BackChain];
MakeStack: PROC[length: CARDINAL] RETURNS[new: Stack];
MakeBitsInfo: PROC[length: CARDINAL] RETURNS[new: BitsInfo];
MakeBitString: PROC[length, width: CARDINAL] RETURNS[new: BitString];
MakeAttrVec: PROC[length: CARDINAL] RETURNS[new: AttrVec];
MakeHashTab: PROC[length: CARDINAL] RETURNS[new: HashTab];
MakeTab: PROC[length: CARDINAL] RETURNS[new: Tab];
MakeColumn: PROC[length: CARDINAL] RETURNS[new: Column];
MakeStateData: PROC[length: CARDINAL] RETURNS[new: StateData];
MakeNTDefaults: PROC[length: CARDINAL] RETURNS[new: NTDefaults];
MakeRenumber: PROC[length: CARDINAL] RETURNS[new: Renumber];
MakeVocabIndex: PROC[length: CARDINAL] RETURNS[new: VocabIndex];
MakeSInfo: PROC[length: CARDINAL] RETURNS[new: SInfo];
MakePInfo: PROC[length: CARDINAL] RETURNS[new: PInfo];
ExpandSymTab: PROC[old: SymTab, ext: CARDINAL] RETURNS[new: SymTab];
ExpandSymInfo: PROC[old: SymInfo, ext: CARDINAL] RETURNS[new: SymInfo];
ExpandAliases: PROC[old: Aliases, ext: CARDINAL] RETURNS[new: Aliases];
ExpandProdInfo: PROC[old: ProdInfo, ext: CARDINAL] RETURNS[new: ProdInfo];
ExpandRhsChar: PROC[old: RhsChar, ext: CARDINAL] RETURNS[new: RhsChar];
ExpandStateInfo: PROC[old: StateInfo, ext: CARDINAL] RETURNS[new: StateInfo];
ExpandStack: PROC[old: Stack, ext: CARDINAL] RETURNS[new: Stack];
ExpandBitsInfo: PROC[old: BitsInfo, ext: CARDINAL] RETURNS[new: BitsInfo];
ExpandBitString: PROC[old: BitString, ext: CARDINAL] RETURNS[new: BitString];
ExpandSInfo: PROC[old: SInfo, ext: CARDINAL] RETURNS[new: SInfo];
ExpandPInfo: PROC[old: PInfo, ext: CARDINAL] RETURNS[new: PInfo];
seterrstream: PROC;
setoutstream: PROC[dotstring: Rope.ROPE];
resetoutstream: PROC;
closeoutstream: PROC;
cleanupstreams: PROC;
inchar: PROC RETURNS[c: CHAR, end: BOOL];
getindex: PROC RETURNS[CARDINAL];
setindex: PROC[index: CARDINAL];
outchar: PROC[c: CHAR, n: INTEGER];
outeol: PROC[n: INTEGER];
outnum: PROC[val: INTEGER, cols: NAT, signChar: CHAR←'-];
outstring: PROC[string: Rope.ROPE];
outtab: PROC;
outtime: PROC;
openwordstream: PROC[scratch: BOOL ← TRUE];
closewordstream: PROC;
inword: PROC RETURNS[CARDINAL];
outword: PROC[n: CARDINAL];
outblock: PROC[address: LONG POINTER, words: CARDINAL, offset: CARDINAL ← 0];
bit manipulation, exported by PGSControl
BitsPtr: PRIVATE TYPE ~ LONG POINTER TO PACKED ARRAY[0..0) OF BOOL;
FindBit:
PROC[source: BitString, index, bit:
CARDINAL]
RETURNS[
BOOL]
~ TRUSTED INLINE {RETURN[LOOPHOLE[@source[index*source.width], BitsPtr][bit]]};
InsertBit:
PROC[sink: BitString, index, bit:
CARDINAL]
~ TRUSTED INLINE {LOOPHOLE[@sink[index*sink.width], BitsPtr][bit] ← TRUE};
orCount: VAR CARDINAL;
OrBits: PROC[source: BitString, sourceI: CARDINAL, sink: BitString, sinkI: CARDINAL];