ANSI proposal for preprocessor strings

Martin Minow minow at decvax.UUCP
Mon Mar 4 12:27:30 AEST 1985


Gwyn at brl-tgr.arpa points out that some compilers perform the
"cpp" functions as part of the general lexical analysis, and
therefore need a tokenizing preprocessor.  Thus the string
replacement and concatenation techniques in the Reiser cpp
don't work.

Actually, they can be made to work fairly easily.  Just consider
the string as a series of tokens: "foo bar" becomes "foo" " " "bar"
and do further processing on any token that looks like a formal
parameter.  Token concatenation using /**/ is just about as
easy.

On the other hand, the draft standard is probably more understandable
and a bit easier to implement.

Martin Minow
decvax!minow



More information about the Comp.lang.c mailing list