M4 macro processor

Chris Lewis clewis at ferret.ocunix.on.ca
Mon Feb 4 06:56:23 AEST 1991


In article <1080 at mwtech.UUCP> martin at mwtech.UUCP (Martin Weitzel) writes:
>In article <873 at fnx.UUCP> del at fnx.UUCP (Dag Erik Lindberg) writes:
>>I have an application that is just screaming for something like a 
>>macro-processor.  The C pre-processor is no good because the files
>>I need to deal with are Motorola assembly sources which use '#'
>>to signify a constant value as opposed to a memory reference.

>The C-Preprocessor is a C-Preprocessor is a C-Preprocessor ....
>and NOT a general macro processor. I support your view so far.

Weeelll, I agree with the sentiment, but it shouldn't neccessarily
stop people from trying new things with it.  Back when U of Toronto
got its first 68000 evaluation board (long before Sun et. al.) some
poor soul cobbled up a 68000 assembler out of CPP.  (well, actually,
I believe it was used to substitute ".text" numeric constants for
mnemonics and run thru the PDP 11 assembler to produce a binary, but
you get what I mean).  Dag may very well be able to use CPP on his
assembler provided that he runs sed on it first and afterwards to change
the '#' to something else and back.  Sed may even be enough to
do what he needs all by itself.

Another source for reasonably close documentation on m4 (or, indeed
source for a replacement) is in Kernighan's Software Tools book
(or, Software Tools in Pascal).
-- 
Chris Lewis, Phone: (613) 832-0541, Internet: clewis at ferret.ocunix.on.ca
UUCP: uunet!mitel!cunews!latour!ecicrl!clewis
Moderator of the Ferret Mailing List (ferret-request at eci386)
Psroff enquiries: psroff-request at eci386, current patchlevel is *7*.



More information about the Comp.unix.sysv386 mailing list