-- TexNoadDefs.Mesa -- definitions related to math Noads -- last written by Doug Wyatt, December 13, 1979 4:37 PM DIRECTORY TexDefs: FROM "TexDefs", TexMathDefs: FROM "TexMathDefs", TexNodeDefs: FROM "TexNodeDefs"; TexNoadDefs: DEFINITIONS = BEGIN OPEN TexDefs,TexMathDefs; NoadType: TYPE = {common,node,disc,style,space,listhead}; MField: TYPE = RECORD [SELECT tag: * FROM box => [box: TexNodeDefs.BoxNodePtr], -- pointer to a box Node or NIL mchar => [mchar: MChar], -- a math character mlist => [mlist: NoadPtr], -- pointer to the first noad of an mlist ENDCASE ]; nilMField: MField=[box[NIL]]; MFieldPtr: TYPE = POINTER TO MField; BoxMField: TYPE = box MField; BoxMFieldPtr: TYPE = POINTER TO BoxMField; Noad: TYPE = RECORD [ link: NoadPtr, body: SELECT type: NoadType FROM common => [ mtype: MType, -- for spacing box: TexNodeDefs.BoxNodePtr, -- the resulting box cvariant: SELECT ctype: * FROM scripted => [ operand,subscr,supscr: MField, svariant: SELECT stype: SType FROM none,sqrt,over,under => NULL, vctr => [vctr: VctrType], op => [limitswitch: BOOLEAN], accent => [accent: MChar], ENDCASE ], above => [ numerator,denominator: MField, aboverule: Dimn, ldelim,rdelim: Delimiter ], delim => [dtype: DelimType, delim: Delimiter], ENDCASE ], node => [p: TexNodeDefs.NodePtr], disc => [c: MChar], -- discretionary * style => [s: MathStyle], space => [sp: MathSpace], listhead => [last: NoadPtr], ENDCASE ]; NoadPtr: TYPE = POINTER TO Noad; CommonNoad: TYPE = common Noad; CommonNoadPtr: TYPE = POINTER TO CommonNoad; ScriptedNoad: TYPE = scripted CommonNoad; ScriptedNoadPtr: TYPE = POINTER TO ScriptedNoad; AboveNoad: TYPE = above CommonNoad; AboveNoadPtr: TYPE = POINTER TO AboveNoad; NoadListPtr: TYPE = POINTER TO listhead Noad; InitNoadList: PROCEDURE RETURNS[NoadListPtr]; FinishNoadList: PROCEDURE[list: NoadListPtr] RETURNS[NoadPtr]; StoreNoad: PROCEDURE[list: NoadListPtr, p: NoadPtr]; MakeScriptedNoad: PROCEDURE[operand: MField←nilMField, mtype: MType←Ord, stype: SType←none] RETURNS[ScriptedNoadPtr]; MakeCharNoad: PROCEDURE[tmchar: TMChar] RETURNS[ScriptedNoadPtr]; MakeAccentNoad: PROCEDURE[accent: MChar] RETURNS[ScriptedNoadPtr]; MakeAboveNoad: PROCEDURE RETURNS[AboveNoadPtr]; MakeDelimNoad: PROCEDURE[dtype: DelimType, delim: Delimiter] RETURNS[NoadPtr]; MakeNodeNoad: PROCEDURE[TexNodeDefs.NodePtr] RETURNS[NoadPtr]; MakeDiscNoad: PROCEDURE[MChar] RETURNS[NoadPtr]; MakeStyleNoad: PROCEDURE[MathStyle] RETURNS[NoadPtr]; MakeSpaceNoad: PROCEDURE[MathSpace] RETURNS[NoadPtr]; StartNoadAllocation,FinishNoadAllocation: PROCEDURE; TexNoad: PROGRAM; END.