
446 Appendix B
B.3.1 Real-world: M4 Macro Processor
This macro processor is a general-purpose macro processor, used extensively on Unix and Unix-like
systems, including Linux. An extended version is available as a GNU package.
M4 is a macro processor, in the sense that it copies its input to the output, expanding macros as it
goes. Macros are either built-in or user-defined, and can take any number of arguments. Besides just
doing macro expansion, M4 has built-in functions for including named files, running shell commands,
doing integer arithmetic, manipulating text in various ways, performing recursion, etc. It can be used
either as a front-end ...