Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 7 C Preprocessor Projects
-
Cloak
A mini-preprocessor library to demostrate the recursive capabilites of the preprocessor (by pfultz2)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
c-iterators
:books: A demonstration of implementing a "type-safe" lazy iterator interface in pure C99
-
website-meta-language
An old offline HTML preprocessor (which can be used for static site generation), written in Perl and C that is still maintained for legacy reasons, but probably not recommended for new sites.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Where cloak.h is https://github.com/pfultz2/Cloak/blob/master/cloak.h
The above macros are admitttedly very hairy. If C had a better preprocessor, but was otherwise unchanged, they could look a lot nicer.
> I never said such a thing. Would appreciate if you didn't put words in my mouth.
A normal part of dialogue is, "I'm going to repeat your point back to you in my own words, and you can either agree with my restating of it, or point out at which point I've misunderstood you". That's what I was doing. "Would appreciate if you didn't put words in my mouth" is unnecessary hostility.
> In my concrete example, given that FILE and DIR were classified as objects, to which of the so-called objects does F(const char*, FILE, DIR) belong?
Take any language which you agree is "OO". Add one new feature (if it isn't already there): functions/methods which don't belong to any class/object. Now the function you are talking about is possible in that language. Did the language thereby suddenly cease to be OO when we added that feature? Most people would disagree with "Yes". But if "No", what is the actual difference between C and that language?
> QBE is a new optimizing backend much simpler than LLVM; cproc and cparser are two of the C compilers that target it, in addition to its own minic.
I thought cparser targeted libFirm. That's what their GitHub page says [0].
"It acts as a frontend to the libFirm intermediate representation library."
> We really need a production quality open source C compiler that is actually written in C.
I honestly think cproc or cparser are almost there already. For cproc, you just need to improve the quality of code optimization; it's really QBE you'd need to change. For example, you could change unnecessary multiplications by powers of 2 into left shifts, improve instruction selection so that subtraction is always something like "sub rax, rdi" and not "neg rdi / add rax, rdi" [1]).
For cparser, I notice slightly higher quality codegen; libFirm just needs more architecture support (e.g. AMD64 support appears to work for me, but it's labeled as experimental).
[0]: https://github.com/libfirm/cparser
[1]: I'm pretty sure this is the line of code that generates it, too: https://c9x.me/git/qbe.git/tree/amd64/emit.c#n418
C Preprocessor related posts
- Compiling History: A brief tour of C compilers
- Object-oriented Programming with ANSI-C [pdf]
- Plain C API design, the real world Kobayashi Maru test
- Website Meta Language is an offline HTML preprocessor, dating back to the 1990s
- Website Meta Language is an offline HTML preprocessor, dating back to the 1990s
- Pretty-Printable Enumerations in Pure C
- Website Meta Language is an offline HTML preprocessor, dating back to the 1990s
-
A note from our sponsor - InfluxDB
www.influxdata.com | 28 Apr 2024
Index
What are some of the best open-source Preprocessor projects in C? This list will help you:
Project | Stars | |
---|---|---|
1 | Cloak | 889 |
2 | cparser | 318 |
3 | nymph | 180 |
4 | xcc | 176 |
5 | c-iterators | 90 |
6 | tinycc | 23 |
7 | website-meta-language | 14 |
Sponsored