@@ -32,17 +32,17 @@ Each name slot in the grammar belongs to one of these position kinds:
| Position | Description | Example |
|---|---|---|
| **Free** | Reachable as a first token of an expression (DataUseWrapped). Competes with `'instance'`, `'parameter'`, `'omit'`, `'an'`, `'size'`, `'not'`, `'-'`, `'('`, `'?'`, `'*'`, `'@'` as alternative starts. | `dataElement` in DataElementUse, `componentInstance` in VariableUse |
| **Tight** | Anchored on at least one side by a structural token (`.`, `(`, type-ref, `=`, `\|`, `,`, `)`). No competing alternative starts with an identifier in this state. | Member name after `.`, parameter name after `(` in a binding |
| **Introducer-anchored** | Preceded by a strong introducer keyword (`Type`, `Action`, `'execute'`, `'perform'`, …). The next token's role is fixed by the parent rule. | Top-level decl names, anchored cross-refs |
| **Parameter / Tight** | Anchored on at least one side by a structural token (`.`, `(`, type-ref, `=`, `\|`, `,`, `)`). No competing alternative starts with an identifier in this state. | Member name after `.`, parameter name after `(` in a binding |
| **Introducer-anchored** | Preceded by a strong introducer keyword (`Type`, `Action`, `'execute'`, `'perform'`, …). The next token's role is fixed by the parent rule. Uses the same admission set as parameter slots; the `DeclName` alias documents intent at the grammar surface. | Top-level decl names, anchored cross-refs |
| **Qualifier-prefixed** (TO) | Preceded by `Qualifier*` greedy chain in TO contexts. Both the qualifier loop and the name slot accept any identifier; the parser greedily takes all but the last. | TO `LiteralValueFragment.name`, `DataContent.name` |
Free positions are the most constrained — every keyword admitted there must
not be a sibling-first token, not a Qualifier-vocabulary word, and not an
expression operator. Tight positions are looser. Introducer-anchored
positions are the loosest, bounded mostly by what the rule's *follower*
keyword set is.
expression operator. Parameter/tight positions are looser. Introducer-anchored
positions share the parameter-position admission set under the `DeclName`
alias.
## TDL-side rules (three tiers)
## TDL-side rules (two tiers)
### `Identifier` — free-position rule
@@ -59,13 +59,9 @@ Admits a conservative keyword set:
'entity' 'event' 'component' 'variable' 'timer'
'argument' 'action' 'behaviour'
'verdict' 'exception'
'get'
'when' 'then'
'check' 'where'
'sends' 'receives' 'triggers' 'accepts'
```
Excluded and why:
Excluded from `Identifier`and why:
| Excluded | Reason |
|---|---|
@@ -74,15 +70,23 @@ Excluded and why:
| `a`, `an`, `the` | `ArticleQualifier` member; `'an'` also a sibling-first of `DataInstanceUse` |
| `gate` | Would clash with the `'on' (ComponentInstance | 'gate' GR)` discriminator in `Quiescence` |
| `sends`, `receives`, `triggers` | Discriminator keywords in `Message` and `ReceiveMessage`. Admissible only at parameter positions where the discriminator role is unreachable |
| `accepts` | Follower of the `Gate` decl name (`'Gate' name 'accepts' dataType+=...`). Admissible only at parameter positions |
| `get` | `.get(LParen ... RParen)` is a collection method-call form. Admissible only at parameter positions (where the position is anchored and the method-call competition is unreachable) |
| `when`, `then`, `check`, `where` | **Excluded from every generic identifier rule** — see "Universally excluded keywords" below |