pyparse is a small Python-like language implementation in Rust focused on
CPython-compatible semantics (within the supported subset).
- Frontend: lexer + parser that build an AST.
- Interpreter backend: direct AST execution.
- VM backend: bytecode compiler + virtual machine.
- Fixture-driven runtime tests under
tests/programs/(including parity checks against CPython, PyPy, and MicroPython where applicable).
- Functions and classes (subset)
- Lists and dictionaries
forloops via the iterator protocol (__iter__/__next__)- Exceptions in interpreter + VM (
raise,try/except/finally) - Built-in exception classes:
BaseException,Exception,StopIteration
Use project just commands:
just test
just lintThis project aims to match behavior in the overlap shared by CPython, PyPy, and MicroPython. Behavior outside that shared overlap is not in scope.