There&#x27;s always M4, which will preprocess just about anything you throw at it.<p>The syntax starts off pretty godawful, but eventually you learn to love it. C# and Java are much nicer with a little M4.<p>Everybody loves to hate on text-substitution macros (and hey, I write parsers and such, I&#x27;m a Smug Lisp Weenie, and generally I know how easy it is to break something and how much better real macros are), but sometimes they actually are the right tool for the job. Just because they&#x27;re sometimes very much the wrong tool doesn&#x27;t mean they should be kept out of your toolbox. Until all languages are either Lisp-ish or Forth-ish, I will maintain that there is a place for CPP&#x2F;M4&#x2F;etc. :-)<p>M4 is seriously awesome, just remember: with great text substitution comes great attention to detail. And heed the warning from the manual[1]:<p>&gt; Some people find m4 to be fairly addictive. They first use m4 for simple problems, then take bigger and bigger challenges, learning how to write complex sets of m4 macros along the way. Once really addicted, users pursue writing of sophisticated m4 applications even to solve simple problems, devoting more time debugging their m4 scripts than doing real work. Beware that m4 may be dangerous for the health of compulsive programmers.<p>1. <a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;m4&#x2F;manual&#x2F;m4.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;m4&#x2F;manual&#x2F;m4.html</a>