DoctorWkt/acwj ? reverse-engineered prompt

Reverse engineered prompt

Build me a practical little compiler in C that can compile a useful subset of C and grow step by step, with clear explanations along the way.

I want it to start with scanning and parsing, then handle expressions, statements, variables, functions, pointers, arrays, structs, enums, typedefs, and a basic preprocessor. It should generate real assembly or another simple backend so I can actually compile and run test programs, and it would be great if it can target more than one platform later. Please also include a simple regression test setup so I can check that each new language feature still works as I add it.

Keep it educational and easy to follow, like a hands on compiler writing journey, not an abstract theory project. If you need to look up current docs or backend details online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab