8cc C Compiler is a small and educational C compiler designed to support the C11 standard while maintaining a compact and easy-to-understand codebase. It was created as a hobby project with the goal of demonstrating how a compiler works internally, making it a valuable resource for learning compiler design. The project includes core components such as a lexer, parser, and preprocessor, allowing users to explore each stage of the compilation process. One of its notable features is its ability to compile itself, showcasing its completeness and serving as a practical example of bootstrapping in compiler development. The code is intentionally written to be concise and readable, making it accessible to developers who want to study compiler internals. Although it lacks advanced optimization features and is not intended for production use, it provides a solid foundation for understanding how C programs are translated into machine code.
Features
- Support for the C11 programming language standard
- Includes lexer, parser, and preprocessor components
- Self-hosting capability by compiling its own source code
- Designed for readability and educational purposes
- Compact codebase for studying compiler internals
- Focus on correctness rather than optimization