Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Write the front-to-back pipeline that turns source into execution for a small language (arithmetic with variables, conditionals, and ideally functions): a LEXER (source → tokens), a PARSER (tokens → AST, with correct operator precedence), and either a tree-walking INTERPRETER or a bytecode compiler + stack VM that evaluates the AST. Handle errors gracefully (a useful message with a position, not a crash), and include a test suite of programs with expected outputs. Document where the stack vs the heap would come in and how a garbage-collected language would manage memory differently from your model.
Tokenizes correctly; parses to an AST with correct precedence/associativity; reports syntax errors with position instead of crashing.
A working tree-walking interpreter (or bytecode compiler + stack VM) that runs the language end to end with correct results, including variables and conditionals.
Graceful runtime/type errors; a test suite of programs with expected outputs that actually passes.
Can articulate the compile-vs-interpret trade-off and where stack/heap and garbage collection fit in a real implementation.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# An interpreter for a tiny language ## Goal Write the front-to-back pipeline that turns source into execution for a small language (arithmetic with variables, conditionals, and ideally functions): a LEXER (source → tokens), a PARSER (tokens → AST, with correct operator precedence), and either a tree-walking INTERPRETER or a bytecode compiler + stack VM that evaluates the AST. Handle errors gracefully (a useful message with a position, not a crash), and include a test suite of programs with expected outputs. Document where the stack vs the heap would come in and how a garbage-collected language would manage memory differently from your model. ## Acceptance criteria - [ ] Lexer & parser: Tokenizes correctly; parses to an AST with correct precedence/associativity; reports syntax errors with position instead of crashing. - [ ] Evaluation: A working tree-walking interpreter (or bytecode compiler + stack VM) that runs the language end to end with correct results, including variables and conditionals. - [ ] Robustness: Graceful runtime/type errors; a test suite of programs with expected outputs that actually passes. - [ ] Understanding: Can articulate the compile-vs-interpret trade-off and where stack/heap and garbage collection fit in a real implementation. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.