Version 3 of m4

Updated 2004-11-30 18:07:46 by lwv

String substitution language, a more general macro facility than the C preprocessor, first really publicised as the macro processor for Ratfor in the book Software Tools. It's a sophisticated language, but tricky to use because there's no unique substitution symbol to distinguish macros from ordinary running text.

DKF: It's Turing-Complete, but only really used for autoconf hacking now (and that's a fairly heavily modified version).

Peter da Silva: It's also used in sendmail for automating the generation of config files.

Back around '82, after I left Berkeley, I was using RSX-11 and feeling UNIX-starved. I took a copy of Software Tools and implemented everything in it from Ratfor through ed. When I implemented macro I renamed all the internal symbols so they began with a dollar sign. This made a huge difference in the usability of the language.


LV So, are there enough benefits to m4 to make it worth a developer's time to use it with Tcl to write sort of metacode, which would be expanded before execution?


Category Language