C-Core-Compiler Docs¶
A documentation hub for a staged, explainable C subset compiler built in Python.
This site is designed for two kinds of readers:
- people who want to use the compiler and run examples quickly
- people who want to study how the compiler is structured internally
Start In English¶
Follow the English reading path if you want architecture, implementation, CLI, and examples explained stage by stage.
What You Can Read Here¶
Compiler Architecture¶
Understand the full pipeline from source code to executable, including why this project currently uses two backend paths.
Stage-by-Stage Internals¶
Follow the compiler as it moves through lexing, parsing, semantic analysis, IR lowering, optimization, and backend generation.
Practical Debugging¶
Use the CLI as a structured inspection tool, not just as a launcher. Learn which flag maps to which compiler layer.
Example Programs¶
Read the sample programs as a learning set for language boundaries, control flow, recursion, arrays, strings, and pointers.
Recommended Reading Paths¶
- Open the English or Chinese home page
- Read the compiler overview
- Follow lexing, parsing, semantics, and IR in order
- Use the CLI guides to inspect intermediate outputs
- Use the examples guide to compare the
intsubset path and the AST backend path
- Start with Getting Started or 快速开始
- Run
hello.c - Run a
_stdoutexample - Inspect
--emit-cto see the generated backend code - Return to the architecture pages when you want to understand why it works