% Alternative Preprocessors for C and Other Languages
General Preprocessors
cpp
, the C preprocessor (C99)- metapp — Supports Perl code insertion
- perlpp
- gpp — General Purpose Preprocessor
- Cog — Enables Python code insertion.
m4
- Could
tex
be used as a general-purpose macro language over text files? Initial research suggests no —tex
doesn't care to output text. Hrrm...
Preprocessors for Literate Programming
- WEB, CWEB and its descendants
- “Enhanced CWEB” apparently has a “preprepreprocessor (scroll down)”. More information not found.
Semantic Patching and Program Transformation
patch
- Coccinelle — for C only.
- S-expressions: search for
macroexpand-all
Miscellaneous Code Modification Tools
sed
Ideas
<?perl ... ?>
— Perl code injection.<?scheme ... ?>
— Scheme code injection.- Way to run S-expressions through Lisp macro processing without executing macros in separate file.
See also Language Research.