Re: C preprocessor vs Macro processor

tgm@netcom.com (Thomas G. McWilliams)
11 Nov 1997 14:37:52 -0500

          From comp.compilers

Related articles
C preprocessor vs Macro processor peter.govoni@analog.com (Peter Govoni) (1997-11-02)
Re: C preprocessor vs Macro processor gjb@cs.washington.edu (Greg Badros) (1997-11-07)
Re: C preprocessor vs Macro processor tgm@netcom.com (1997-11-11)
Re: C preprocessor vs Macro processor ok@cs.rmit.edu.au (1997-11-13)
| List of all articles for this month |
From: tgm@netcom.com (Thomas G. McWilliams)
Newsgroups: comp.compilers
Date: 11 Nov 1997 14:37:52 -0500
Organization: Jot-Em-Down Store and Library
References: 97-11-021 97-11-033
Keywords: macros

Peter Govoni <peter.govoni@analog.com> writes:
: Could someone please explain why a macro processor (e.g. M4)
: is 1) more powerful than the C preprocessor . . .


Greg Badros (gjb@cs.washington.edu) 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.
-John]




--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.