A tree-walking interpreter for a pedagogical subset of C. Built from scratch in Python with zero external runtime dependencies.
// Declare variables
int x;
float pi;
// Assign values
x = 42;
pi = 3.14159;
// Control flow
if (x > 10) {
printf(x);
} else {
printf(0);
}
Write and execute C-Lite code directly in your browser.
printf(x);
printf("hello");
Every design decision documented. Every component transparent.
Only Python 3.8+ standard library.
Recursive-descent parsing with formal EBNF grammar.
Multi-line input, state inspection, and error recovery.
A simplified, statically-typed subset of C
| Type | Description | Examples |
|---|---|---|
| int | Signed integer | 0, 42 |
| float | IEEE 754 double-precision | 3.14, .5 |
int x; // declaration
x = 42; // assignment