C Preprocessor

Open-source C projects categorized as Preprocessor

Top 7 C Preprocessor Projects

  • Cloak

    A mini-preprocessor library to demostrate the recursive capabilites of the preprocessor (by pfultz2)

  • Project mention: Object-oriented Programming with ANSI-C [pdf] | news.ycombinator.com | 2023-06-21

    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?

  • cparser

    C99 parser and frontend for libfirm

  • Project mention: Compiling History: A brief tour of C compilers | news.ycombinator.com | 2024-02-14

    > 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

  • 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.

    InfluxDB logo
  • nymph

    🧚 A slightly different version of C.

  • Project mention: Nymph : A slightly different version of C | /r/coolgithubprojects | 2023-07-19
  • xcc

    Toy C compiler for x86-64/aarch64/riscv64/wasm

  • c-iterators

    :books: A demonstration of implementing a "type-safe" lazy iterator interface in pure C99

  • tinycc

    My working copy of tinycc made reentrant (by mingodad)

  • 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.

    WorkOS logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C Preprocessor related posts

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
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com