Files
agent-orchestrator-benchmark/calculators/builder-adversary-min/run-03/machine-docs/JOURNAL-lex.md

656 B
Raw Blame History

Journal — phase lex

2026-06-15

Built calc/lexer.py with Token dataclass, LexError, and tokenize().

Design notes:

  • Token is a dataclass with kind: str and value: Union[int, float, str, None]; EOF has value=None, operators carry their char as value, numbers carry the parsed numeric value.
  • Number parsing: scans while digit or .; uses int() if no dot else float().
  • LexError message includes the offending character (quoted) and its 0-based position.
  • 18 tests cover all D1D3 requirements including the plan's required expressions.

Committed ba1f056, then c465844 (STATUS sha update). Waiting for Adversary review.