artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs

This commit is contained in:
2026-06-16 15:39:42 +00:00
parent 64bc360fc0
commit bb85aa9f11
728 changed files with 34148 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# JOURNAL-lex
## 2026-06-15
### Build
- Created `calc/__init__.py` (empty package marker)
- Created `calc/lexer.py`: `Token` (NamedTuple with `kind` and `value`), `LexError`, `tokenize(src)`
- Handles integers (int), floats (float, including `.5` and `10.` edge cases)
- Single-char operators: `+ - * / ( )`
- Whitespace (space, tab) skipped
- Invalid chars raise `LexError` with char repr and position
- Appends `EOF` token at end
- Created `calc/test_lexer.py`: 14 unittest cases covering D1D3
### Verification
- `python -m unittest -q` → 14 tests, 0 failures — PASS
- `tokenize('3.5*(1-2)')` → correct 8-token sequence — PASS
- `tokenize('1 @ 2')` → raises `LexError: unexpected character '@' at position 2` — PASS
### Commit
`7ac5cdaded6af3b635d6d638f9c20082b5648393`