- Initialize MNTC ( Macro Name Table ) Counter = 0 and MDTC ( Macro Definition Table
Counter ) = 0
-
Scanning of all macro definitions one by one . If MACRO found in program then for each macro perform:
-
MNTC = MNTC + 1 and enter name of MACRO in MNTC ( Macro Name Table ).
-
For every model statement MDTC = MDTC + 1 in definition of macro
-
Generate argument list array.
-
Scan main program for macro call. For each macro call perform.
-
Scan MNT to detect Macro Name and its address in MDT ( Macro Definition Table ).
-
Replacement of all formal parameters by actual parameters.
-
Replace macro call by model statements from MDT.