Exploiting the m4 Macro Language

Kenneth J. Turner · 1994

m4 is a macro language and macro processor that is available with a number of operating systems such as UNIX and MS-DOS. The role of m4 is discussed, and it is concluded that m4 has a useful part to play even though it has not achieved widespread popularity. A summary of m4 is given along with some basic examples. A cookbook of techniques is then described, allowing surprisingly sophisticated macros to be developed. Some applications of the approach are described for specifying Open Systems Interconnection standards, telecommunications service creation and digital logic circuits. To show the range of possibilities for m4, a 1.1 The Role of m4 m4 is a macro language and an associated macro processor designed by Dennis M. Ritchie [7]. m4 has been supplied with UNIX systems for some years, and is also available for other environments such as MS-DOS. m4 is quite simple but can be used in surprisingly sophisticated ways.

Read the paper · More papers on PaperTik