Vitte Grammar Reference

Source of truth: src/vitte/grammar/vitte.ebnf.

The generated artifacts should not be modified by hand:

  • docs/book/grammar/grammar-surface.ebnf
  • docs/book/grammar/vitte.ebnf
  • docs/book/grammar-surface.ebnf

Standard commands

make grammar-sync
make grammar-check
make grammar-test
make core-language-test
make core-semantic-success
make grammar-docs
make grammar-gate
make core-language-gate
bin/vitte grammar check

Maturity

The grammatical coverage and implementation surface are wider than the stabilized language core.

  • stable: behavior protected by the language kernel policy and the core gate.
  • experimental: implemented or documented, but not yet protected as part of the core language.
  • internal: implementation detail, not a public language contract.

References:

  • docs/LANGUAGE_CORE.html
  • docs/LANGUAGE_CORE_CHECKLIST.html
  • docs/LANGUAGE_CORE_COMPATIBILITY.html
  • docs/LANGUAGE_CORE_GUARANTEES.html
  • docs/LANGUAGE_CORE_TEST_PLAN.html
  • docs/API_LIFECYCLE.html

Targeted semantic gate:

  • make core-semantic-success
  • make core-semantic-snapshots
  • tests/core_semantic_success_manifest.txt
  • tests/diag_snapshots/core_semantic_manifest.txt

Change policy

  • Breaking grammar change: changes the accepted syntax or shape of the parse tree.
  • Non-breaking grammar change: refactoring/factoring with the same surface accepted.
  • Change limited to diagnostics: identical grammar, parse error text/code modified.

Log each grammar change in docs/book/grammar/grammar-changelog.html.

PR checklist (grammar)

  • Rule changed only in src/vitte/grammar/vitte.ebnf.
  • make grammar-sync executed.
  • make core-language-test is green if the change affects the core of the language.
  • Valid/invalid corpus updated in tests/grammar.
  • Expected diagnostics updated in docs/book/grammar/diagnostics/expected.
  • Snapshots refreshed if necessary.
  • make grammar-gate is green.