The parser emits deterministic diagnostics for invalid relation forms:
Table 1. Relation diagnostics.
| Code | Cause | Message |
|---|---|---|
| D-REL-001 | Kind keyword before role keyword | relation role keyword (input/output) must precede the kind keyword |
| D-REL-002 | More than one role keyword | at most one role keyword (input, output) is permitted |
| D-REL-003 | More than one kind keyword | at most one kind keyword (relation, stream, multiset) is permitted |
| D-REL-004 | Bracket body with a primary-key clause | bracket-form relations cannot declare a primary key clause |
| D-REL-005 | Empty bracket body | bracket-form relations require a single element type between '[' and ']' |
| D-REL-006 | Primary-key clause on a non-input relation |
primary key clauses are only valid on input relations |
| D-REL-007 | Stray or malformed primary key clause |
unexpected or malformed primary key clause |
| D-REL-008 | Bracket-wrapped primary-key clause | bracket-wrapped primary key clauses are not supported; remove the surrounding '['/']' |