0%

Section 04: Spec + Grammar Sync

Goal

See frontmatter. Proposal §Spec Changes Required + §Grammar Changes. Runs after section-03 ships the implementation (spec describes shipped behavior).

04.1 grammar.ebnf + Spec Clause Sync via /sync-grammar + /sync-spec

  • /sync-grammar: update grammar.ebnf assignment + add assignment_target production to match the parser (section-02). NEVER direct-edit grammar.ebnf.
  • /sync-spec 13-variables.md: extended-assignment section (index/field/compound syntax, desugar targets, mutable-root rule, nested/mixed examples, type-directed note).
  • /sync-spec 09-properties-of-types.md: IndexSet trait definition + Index/IndexSet semantic contract.
  • /sync-spec 14-expressions.md: index/field assignment examples + IndexSet cross-reference in the Index Trait section.
  • /sync-spec 21-memory-model.md: ARC copy-on-write note for index assignment (refcount==1 → in-place).
  • .claude/rules/ori-syntax.md: verify §Index/Field Assignment matches shipped surface (per ori-lang.md).
  • Verify: python -m scripts.plan_corpus check clean; spec examples compile against the shipped compiler.

Intelligence Reconnaissance

2026-06-01 — feature-mode scaffold; proposal is the research artifact. Doc/spec-sync section; /sync-grammar + /sync-spec own the mechanical sync.

  • scripts/intel-query.sh file-symbols "ori_parse/src/grammar" --repo ori/sync-grammar parse-site coverage for the assignment_target production [ori:ori_parse/src/grammar/expr/].
  • scripts/intel-query.sh callers "updated" --repo ori/sync-spec blast-radius: a spec edit must not ship without its implementation call sites updated.
  • Spec surfaces: [ori:compiler_repo/docs/ori_lang/v2026/spec/grammar.ebnf] + clauses 05/07/09/15.

Spec References

  • Proposal §Spec Changes Required (05/07/09/15), §Grammar Changes Required.
  • ori-lang.md (sync rules: syntax change → grammar.ebnf + spec clause + ori-syntax.md).