|C preprocessor vs Macro processor firstname.lastname@example.org (Peter Govoni) (1997-11-02)|
|Re: C preprocessor vs Macro processor email@example.com (Greg Badros) (1997-11-07)|
|Re: C preprocessor vs Macro processor firstname.lastname@example.org (1997-11-11)|
|Re: C preprocessor vs Macro processor email@example.com (1997-11-13)|
|From:||firstname.lastname@example.org (Thomas G. McWilliams)|
|Date:||11 Nov 1997 14:37:52 -0500|
|Organization:||Jot-Em-Down Store and Library|
Peter Govoni <email@example.com> writes:
: Could someone please explain why a macro processor (e.g. M4)
: is 1) more powerful than the C preprocessor . . .
Greg Badros (firstname.lastname@example.org) replies:
: Also, M4 has many many more builtin functions (including regular
: expression matching, and much more) and permits recursive macros;
My two cents:
And M4 allows stacks which make it possible to construct and parse
non-trivial macro implemented "grammars". An example application for
such a grammar would be adding structured control mechanisms to a
non-structured language such as a plain-jane assembler. M4 used in
such a way was a vital part of the implementation for RATFOR, an early
example of structured Fortran.
[I never saw a version of Ratfor in anything other than C or Fortran.
Return to the
Search the comp.compilers archives again.