|
1 | | -# Lython |
| 1 | +# LeanPython |
2 | 2 |
|
3 | 3 | Python 3.12 interpreter in Lean4, targeting the leanSpec Ethereum consensus spec. |
4 | 4 |
|
5 | 5 | ## Build Commands |
6 | 6 |
|
7 | | -- `lake build` — build the Lython library and executable |
8 | | -- `lake test` — run tests (builds LythonTest driver; `#guard` failures = build errors) |
9 | | -- `lake exe lython` — run the interpreter |
| 7 | +- `lake build` — build the LeanPython library and executable |
| 8 | +- `lake test` — run tests (builds LeanPythonTest driver; `#guard` failures = build errors) |
| 9 | +- `lake exe leanPython` — run the interpreter |
10 | 10 |
|
11 | 11 | ## Project Structure |
12 | 12 |
|
13 | 13 | ``` |
14 | | -Lython.lean — umbrella import for the library |
15 | | -Lython/ |
| 14 | +LeanPython.lean — umbrella import for the library |
| 15 | +LeanPython/ |
16 | 16 | Lexer.lean — tokenizer entry point (imports sub-modules, exposes tokenize) |
17 | 17 | Lexer/ |
18 | 18 | Types.lean — SourcePos, SourceSpan, TokenKind, Token, LexError |
@@ -46,8 +46,8 @@ Lython/ |
46 | 46 | Ops.lean — Operator dispatch, truthiness, equality, comparison, iteration |
47 | 47 | Builtins.lean — Built-in function implementations (print, len, range, etc.) |
48 | 48 | Main.lean — CLI entry point (reads .py file, parses, interprets) |
49 | | -LythonTest.lean — test driver root |
50 | | -LythonTest/ |
| 49 | +LeanPythonTest.lean — test driver root |
| 50 | +LeanPythonTest/ |
51 | 51 | Basic.lean — lexer tests (keywords, operators, numbers, strings, indent) |
52 | 52 | Parser.lean — parser tests (expressions, statements, integration) |
53 | 53 | Interpreter.lean — interpreter tests (#eval-based, IO assertions) |
|
0 commit comments