0%

Goal

Bring grammar.ebnf, 14-expressions.md, and the ori-syntax.md quick reference into agreement with the approved proposal. Spec is SSOT; sync after the parser deliverable (section-02) lands.

Intelligence Reconnaissance

Queries (2026-05-31): scripts/intel-query.sh file-symbols ori_parse --repo ori (grammar production surface).

  • [ori] Lambda productions live at grammar.ebnf:550-553 (lambda/simple_lambda/typed_lambda); Clause-14 prose at 14-expressions.md:149.
  • [ori] No approved proposal conflicts with the unified lambda_tail grammar (grep of proposals/approved/ returned none).
  • Spec-edit gate block-spec-edits.sh requires .claude/.spec-proposal-active naming the approved proposal before any spec/grammar edit.

Implementation Sketch

The spec-edit gate (block-spec-edits.sh) requires .claude/.spec-proposal-active to name the approved proposal before any edit under compiler_repo/docs/ori_lang/v2026/spec/. Run /sync-grammar for grammar.ebnf and /sync-spec for 14-expressions.md; update ori-syntax.md directly (not gated).

Implementation Items

  • Set .claude/.spec-proposal-active to typed-lambda-inferred-return-proposal.md (or export ORI_SPEC_PROPOSAL).
  • /sync-grammar — replace the lambda / simple_lambda / typed_lambda productions with the unified lambda / lambda_tail grammar.
  • /sync-spec — update 14-expressions.md:149 with the new form + disambiguation rule + bare--> Type diagnostic, in ISO/IEC shall style.
  • Update .claude/rules/ori-syntax.md Lambdas line with (x: int) -> x * 2.
  • Verify grammar.ebnf14-expressions.mdori-syntax.md agree.
  • Clear .claude/.spec-proposal-active after the spec commit lands.

Spec References

  • Proposal §Spec & Grammar Impact.
  • .claude/rules/spec.md (ISO/IEC Directives style; proposal-gate workflow).
  • grammar.ebnf:550-553, 14-expressions.md:149.

Tests

  • Round-trip check: grammar.md includes grammar.ebnf; the spec build/lint passes.
  • No code tests in this section; the conformance gate lives in section-11.