---
title: "Contract grammar and vocabulary reference"
description: "The Contract grammar and vocabulary the compiler accepts: every declaration, element and attribute."
modificationDate: "2026-11-30"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Contract grammar and vocabulary reference

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/reference/contract-grammar: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

This is a descriptive reference for the compiler on `main`, not a proposal for
new syntax. The [human guide](https://exact.expo.dev/learn/contract-for-humans.md) teaches the
language; the [agent guide](https://exact.expo.dev/learn/contract-for-agents.md) gives the implementation loop.
The parser, type checker, and lowering rules are authoritative when this summary
and implementation disagree.

The grammar below describes authored forms. Context-sensitive restrictions are
listed separately: parsing a construct does not imply it types, lowers, bakes,
or runs on every host. `IDENT`, `FIELD`, and `TAG` are identifier tokens accepted
in their respective contexts; reserved-word handling differs by context.
