3 ms·
I haven't looked closely, but this appears to be the C4 compiler (or an update to it), which has been around for a while and is worthy of attention in itself.
by blacksqr 3y ago
I haven't looked closely, but this appears to be the C4 compiler (or an update to it), which has been around for a while and is worthy of attention in itself.
- seansh 3y agoThe C4 compiler is certainly fascinating and worth studying but don't believe that swieros's C compiler is based on that judging by their code [1][2]. There are similarities of course but well they are compiling the same language after all using some similar standard techniques like recursive descent parser [3]. Anyways, C4 is also very cool and focused on minimalism. Swieros's compiler seems much more extensive and even includes #define as the other comment mentioned and va_args. [1] https://github.com/rswier/swieros/blob/master/root/bin/c.c https://github.com/rswier/swieros/blob/master/root/bin/c.c [2] https://github.com/rswier/c4/blob/master/c4.c https://github.com/rswier/c4/blob/master/c4.c [3] https://en.wikipedia.org/wiki/Recursive_descent_parser https://en.wikipedia.org/wiki/Recursive_descent_parser
- seansh 3y agoOh I completely missed the fact that they're both written by the same person.