-> The goal of this project is to learn how compilers & computation works under the hood and to actually implement them by making some actual compilers <3.
P.S. I know this might some insane by idk shit so why not try it out.
-
Implemented
- Lexer and parser for a small toy language (identifiers, integers, arithmetic, parentheses, basic control flow)
- AST construction and pretty-printing
- Simple semantic checks (scopes, variable resolution)
- Interpreter / REPL for executing programs
- Basic code generation to a simple stack-based bytecode and a VM
-
Limitations
- No optimizations
- Minimal type system (mostly dynamic/untyped)
- Limited standard library and error reporting
-
Next Goal
- Add stronger typing and type checking
- Implement optimization passes and more backends (e.g., LLVM or native asm)
- Improve diagnostics, tests, and documentation
-
Run the CLI script by path:
python -m tinycalc.cli example.c