DEFINITION MODULE M2EM;
(*$ LargeVars:=FALSE NameChk:=FALSE LongAlign:=FALSE *)
FROM M2DM IMPORT
 ObjPtr,ParPtr,StrPtr,Standard;
FROM M2SM IMPORT
 Symbol;
FROM M2XM IMPORT
 Item;

PROCEDURE InitM2EM;

PROCEDURE AllocVar(obj:ObjPtr; VAR adr:LONGINT);
PROCEDURE AllocPar(par:ParPtr; VAR adr:LONGINT);
PROCEDURE AllocFld(obj:ObjPtr; VAR adr:LONGINT);

PROCEDURE GenIndex(VAR x,y:Item);
PROCEDURE GenField(VAR x:Item; f:ObjPtr);
PROCEDURE GenDeRef(VAR x:Item);
PROCEDURE GenNeg(VAR x:Item);
PROCEDURE GenNot(VAR x:Item);
PROCEDURE GenAnd(VAR x:Item);
PROCEDURE GenOr(VAR x:Item);
PROCEDURE GenSingSet(VAR x,e:Item);
PROCEDURE GenSet(VAR x,e1,e2:Item);
PROCEDURE GenOp(op:Symbol; VAR x,y:Item);
PROCEDURE GenStParam(VAR p,x:Item; fctno:Standard; parno:INTEGER;
                     morepar:BOOLEAN);
PROCEDURE GenStFct(fctno:Standard; parno:INTEGER);

PROCEDURE ConvertTyp(VAR x: Item; newtyp: StrPtr);

END M2EM.
