> m4 seems to be Turing complete It's pretty hard for any language with memory (the macro table) and conditionals not to be.
I made the following comment before, but mistakenly omitted the context, so it read pretty mysteriously. Turing complete does not mean "it can do anything", where that is taken to mean that it can give the same literal output as any other processor. That's a trivial remark when the two processors work on different character sets. A universal machine can, from a suitable encoding of another machine's input compute an encoding of the subject machine's output. The question of whether m4 can produce the same output as cpp can't be answered by appeal to universality. Obviously it can't take the same input, because "define" looks different in the two languages. Whether there's a general way to encode cpp input so that m4 produces output that is identical to cpp's is very much an open question. Doug
