M4 (language)


For homonymous articles, see M4.

M4 is a macros processing language.

A macro processor is a text replacement tool. Its main use is to reuse text patterns, typically in programming applications but also in text editors. Among the most common uses, the GNU implementation of M4 is used in GNU Autoconf, or in Sendmail to generate the sendmail.cf configuration file.

At the time assembler was an important step in software development, programmers noticed that most of their programs were text repetition. Simple ways to reuse these texts were invented. They quickly discovered that this not only allowed us to reuse entire sections of text, but also to substitute different values ​​based on parameters. This defines the scope of the macro processors.

M4 offers the following possibilities:

Unlike previous macro processors, M4 has not been targeted for a particular computer or human language. Historically, however, it has been developed to support the Fortran ratfor dialect. Related Articleschange the code

wiki