frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: C-Minus Preprocessor v2

https://fossil.wanderinghorse.net/r/c-pp/doc/trunk/README.md
1•sgbeal•1h ago
About 3 years ago i wrote a custom preprocessor to assist in processing the SQLite project's JavaScript builds (e.g. filtering the small differences between vanilla JS and ESM modules). Recently, that app was forked, refactored into a library, and is now, AFAIK, the world's only source-agnostic[^1], client-extensible preprocessor (if one doesn't count sed, awk, etc.).

It's implemented in portable C99 and has a two-file source distribution (one header, one .c file). Its only third-party code dependency is SQLite.

If you've got C-like preprocessing needs, but aren't working with C, c-pp might be of interest.

[^1]: So long as it's UTF-8.