Reference syntax

The reference syntax is written in labeled BNF and the following documentation is derived from this using BNFC. Parsers for Tenet may be built directly from this source in multiple languages.

Discrepancies with specifications

The reference syntax does not enforce certain rules; these must be enforced after parsing.

1. Restrictions on identifiers
2. Restrictions on positional arguments
3. The !Unspec type and !!builtin functions are used by the reference implementation.
4. Restrictions on placement of statements

Errata

• The reference syntax contains two shift-reduce conflicts.
• All comma-delimited lists should be tolerant of trailing commas, but map literals aren’t.