C= is a minimal subset of C that can compile itself.
PS: affectionately known as C min / C minus minus
to build a compiler that is sufficiently powerful compiles itself.
- single pass, LL(1)
- bootstrap in js:
- start with the minimal grammar
- compile to text LLVM IR
- using bootstrap to get working C= compiler
- add further features & language enhancements
- built in smart pointer
- remove null: built in option
- built in unit testing
- multiple source files
- incremental, iterative, vertical sliced development
- clean room implementation
- not allowed: referring to any existing code.
- allowed: tutorials / discussions on the web that is not code.
- exceptions:
- lexer & parser tables from blog posts online
- lots of sessions with grok & chatgpt, but no code.
- test driven development.
clang.exe -Wno-override-module -o example.exe example.ll -fuse-ld=lld "-Wl,/SUBSYSTEM:CONSOLE,/DEFAULTLIB:libcmt,/DEBUG:FULL"
- bootstrap
- self-dogfood
- enhancements
- unit tests
- smart pointers
- refer C= definition