artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
# DECISIONS — shared (append-only)
|
||||
|
||||
## 2026-06-15 — Token representation
|
||||
|
||||
Used a dataclass with `kind: str` and `value` (Any). This lets NUMBER store int or float, and other tokens store the character string. Simple and sufficient for the parser phase.
|
||||
|
||||
## 2026-06-15 — Number parsing
|
||||
|
||||
Integers → int, floats (containing `.`) → float. Handles `.5`, `10.`, `3.14`.
|
||||
|
||||
## 2026-06-15 — Advisory: multi-dot number strings
|
||||
|
||||
`tokenize("1.2.3")` produces a bare `ValueError` from `float()` rather than a `LexError` because the greedy digit+dot scanner consumes the whole string before conversion. DoD only requires LexError for character-level invalids, so this is not a phase-lex defect. Parser phase should guard against malformed numeric literals if needed.
|
||||
Reference in New Issue
Block a user