-- texhyphdefs.mesa

-- last written by Doug Wyatt, November 10, 1979  2:29 AM

TexHyphDefs: DEFINITIONS =
BEGIN

MaxWL: INTEGER = 32;
HyphBits: TYPE = WORD; -- bit vector specifying hypens
CharSetIndex: TYPE = {null,aeiouy0,aeiouy,cl,nr,bcdfgptz,fsz,st,ln,ehiklouvwxy,
									chsw,afglm,afu,
									lr,gr,t,n,r,er,hlnr,d,p,dgst,gmnt,
									lrt,kqd,ekxdgst,kgmnt,pqt};
SufIndex: TYPE = [0..108];
SufInstr: TYPE = {scan,double,table,check,
						success,fail,repeat,again,mark,efail};
PrefSufArgType: TYPE = RECORD
	[SELECT OVERLAID * FROM
		char => [c: CHARACTER],
		set => [s: CharSetIndex],
		index => [i: CARDINAL],
		ENDCASE];
SufEntry: TYPE = RECORD
	[inst: SufInstr, arg: PrefSufArgType, succ, fail: CARDINAL];
PrefIndex: TYPE = [0..108];
PrefInstr: TYPE = {scan,table,success,fail,repeat,mark,cons,vow};
PrefEntry: TYPE = RECORD
	[inst: PrefInstr, arg: PrefSufArgType, succ, fail: CARDINAL];
CPIndex: TYPE = [2..31];
CPEntry: TYPE = RECORD [set: CharSetIndex, hchar,weak: CARDINAL[0..7]];
FiveBitChar: TYPE = CARDINAL[0B..40B);

Comparison: TYPE = {less, equal, greater};
Zeros: HyphBits = 0;
	-- Exception tables for hyphenation routine
XSize: INTEGER = 512;
XIndex: TYPE = [0..XSize);

AlphaBits: TYPE = ARRAY [0..1] OF WORD;
CharSetTable: TYPE = ARRAY CharSetIndex OF AlphaBits;
charSetTable: POINTER TO CharSetTable;

SuffixTable: TYPE = ARRAY SufIndex OF SufEntry;
suffixTable: POINTER TO SuffixTable;

PrefixTable: TYPE = ARRAY PrefIndex OF PrefEntry;
prefixTable: POINTER TO PrefixTable;

CPTable: TYPE = ARRAY CPIndex OF CPEntry;
cpTable: POINTER TO CPTable;

XEnt: PROCEDURE[STRING];

TexHyphInit: PROGRAM;

END.