3 ms·
For what it's worth you can implement a C compiler in under 10kLOC. Chibicc is only a few thousand lines [1]. There is also Cake [2] and tinycc [3] which are bo
by hgs3 3y ago
For what it's worth you can implement a C compiler in under 10kLOC. Chibicc is only a few thousand lines [1]. There is also Cake [2] and tinycc [3] which are both relatively small.
[1] https://github.com/rui314/chibicc https://github.com/rui314/chibicc
[2] https://github.com/thradams/cake https://github.com/thradams/cake
[3] https://bellard.org/tcc/ https://bellard.org/tcc/
- muth02446 3y agoThe title omits a crucial word. Cwerg aims to be the best c-like language that can be implemented in 10kLOC. Obviously, best is highly subjective but I want to improve on C not just re-implement it.