Appendix B — Keywords
Contents of ATD 0.1
Every keyword of ATD 0.1, by the module that defines it, with the documentation the language servers show on hover. Every keyword is soft: it is also a name wherever a name is expected (§3.6). true, false and null are CEL's literals, not keywords.
| Keyword | Documentation |
|---|---|
atd |
The header atd <major>.<minor>, the first construct of every file: the version of ATD the file is written in (§5.1, §18). |
designer |
The kind of a tool type that is a form-based visual layout: designer <origin> version "<semver>" { … } (§5.1). |
diagram |
The kind of a tool type that draws elements and the relations between them: diagram <origin> version "<semver>" { … } (§5.1). |
editor |
The kind of a tool type in which typing text is the core interaction: editor <origin> version "<semver>" { … } (§5.1). |
of |
part of <origin>: the description a part belongs to (§5.2). |
part |
part of <origin>: starts a part of a description (§5.2). |
version |
version "<semver>": the tool type's version, in the tool construct (§5.1). |
| Keyword | Documentation |
|---|---|
| `as` | Names what precedes it: a slot in `contains`, a label's id, a binding rule's name, an import's alias, the element an action creates. A CEL reserved word: not an identifier inside CEL. |
| `attribute` | In an element type: `attribute <name>: <Type> [required] [many] [readonly] [default <value>] { … }`, an attribute (§7.6, DISL §4.3). In a binding rule: `attribute <name> from <slot> { … }`, an attribute binding (§11.3, FBL §5.2). |
| `behavior` | `behavior { … }`: DISL's behaviour settings beside its operations and hooks: deletion, clipboard, retype, undo, the edit gate (§7.12). |
| `builtin` | In `constraints`: `builtin <std.name> { … }`, the settings of a built-in constraint (DISL §8.7). |
| `capability` | `requires capability <name>@<range>`, `algorithm … capability <name>`, `family capability <name>`, `preview capability <name>`: a named, generic algorithm the platform provides (§13). |
| `confirm` | In an operation: `confirm { … }`, the confirmation it asks for (DISL §9.5). |
| `constraint` | `constraint <id> [for <Types>] { when … rule … message … }`: a constraint, whose findings the running tool reports (§7.9, DISL §8.2). |
| `constraints` | `constraints { … }`: constraints, the settings of the built-in ones, and the constraints' common settings (§7.9). |
| `contains` | In an element type: `contains <Types> [as <slot>] [ordered] { … }`, which element types it contains (§7.8, DISL §4.8). |
| `datatype` | In `model`: `datatype <Name> [: <Base>] { … }`, a data type (§7.7, DISL §4.4). |
| `default` | In an attribute: `default <value>`, its default. In `coordinates` and `layout`: `default <name>`, the default system or algorithm. |
| `doc` | `doc <value>`: documentation of the construct it stands in, a string or DISL's `Doc` (§7.3); `///` comments add to it. |
| `document` | In `model`: `document { … }`, the attributes of the document itself (§7.8). |
| `element` | In `model`: `element <Name> [extends <Types>] { … }`, an element type (§7.5). In a binding: `element <Type> [as <name>] [at|line …] { … }`, an element rule (§11.3). |
| `enabled` | In an operation: `enabled <CEL>`, when it can be run (DISL §9.3). |
| `enum` | In `model`: `enum <Name> ["<label>"] { <values> }`, an enumeration (§7.7, DISL §4.5). |
| `extends` | `extends <Types>`: the supertypes of an element or relation type, or the styles a style extends; inheritance is C3 (DISL §4.7). |
| `fix` | `fix <name> ["<label>"] { … }`: a quick fix of a constraint (DISL §8.5), or a fix on a range of an editor's text (§10.2). |
| `for` | Names the types a construct applies to (`constraint … for`, `operation … for`); `for <name> in <CEL> limit <n> { … }` is a loop (§12.2). A CEL reserved word. |
| `from` | In a relation type: its source types. In `connect`: the source. In a binding: `from <slot>`, the slot a value is read from (§11.3). |
| `hook` | `hook <id> on <event> [for <Types>] { … }`: statements run when an event happens (§7.11, DISL §9.2). |
| `import` | `import "<path>"` takes a part into the description; `import "<path>" as <name>` another description as a library (§5.3). A CEL reserved word. |
| `label` | `label <value>`: a display name or, in a notation, a label: `label <value> [as <id>] { … }` (§7.2, §8.4). |
| `many` | In an attribute: the flag `many`, a list of values (DISL §4.3). |
| `message` | In a constraint or reason: `message <value>`, its sentence. At the top: `message <std.name> <value>`, a standard message (§7.12). |
| `model` | `model { … }`: the tool type's metamodel: element and relation types, enums, data types and the document's attributes (§7.4). |
| `on` | In a hook: `on <event>`. In `layout`: `on <CEL>`, the scope it lays out. |
| `operation` | `operation <id> ["<label>"] [for <Types>] { … }`: a command, its statements run in one transaction (§7.10, DISL §9.3). |
| `ordered` | In `contains`: the flag `ordered`, the children's order is meaningful (DISL §4.8). |
| `param` | In an operation: `param <name>: <Type> …`, a parameter its form asks for (DISL §9.3). |
| `persistence` | `persistence { … }`: DISL's and DESL's persistence settings, ids among them (§7.13). |
| `plugin` | `plugin <name> { … }`: a DISL plugin declaration (§7.14); `call plugin <name>(…)` calls one. |
| `port` | In an element type: `port <name> { … }`, a port type. In a node notation: `port <Types> { … }`, its notation (DISL §4.10, §6.9). |
| `readonly` | In an attribute: the flag `readonly`, never written by an edit (DISL §4.3). |
| `reason` | `reason <id> "<text>"` or `reason <id> { when … message … }`: a named reason why something is refused or unavailable (§7.12). |
| `relation` | In `model`: `relation <Name> [from <Types> to <Types>] { … }`, a relation type (§7.5). In a binding: a relation rule (§11.3). |
| `required` | In an attribute: the flag `required` (DISL §4.3). |
| `requires` | `requires capability <name>@<range>`: a capability the description uses (§13.2). |
| `rule` | In a constraint: `rule <CEL>`, what must hold (DISL §8.2). |
| `severity` | In a constraint: `severity <name>` (`error`, `warning`, `info`, `hint`). In `notify`: the message's severity. |
| `to` | In a relation type: its target types. In `connect`, `move`, `resize`, `retype` and `reparent`: where to. |
| `unavailable` | In an operation: `unavailable <reasons>`, why it cannot be run (DISL §9.3). |
| `when` | A condition: of a constraint, an operation's context, a hook, a variant, a context tool set, a binding rule. |Shown as written in the source.
| Keyword | Documentation |
|---|---|
| `after` | In `create`, `move`, `reparent` and `reorder`: the sibling the element is placed directly after (DISL §9.4, positional create; DESL §8.2). |
| `at` | In a binding rule: `at "<selector>"`, where the entries are (FBL §4.2). In `create`: the point the element is placed at. |
| `before` | In `create`, `move`, `reparent` and `reorder`: the sibling the element is placed directly before. |
| `break` | Leaves the nearest loop (§12.2). A CEL reserved word. |
| `by` | In `reorder`: the number of places to move by. In `outline`: the attribute that nests the outline. In `references`: the attribute that names the referenced entry, or `id`. |
| `call` | `call <operation>(<args>)` runs another operation; `call plugin <name>(<args>)` delegates to a plugin action (§12.3). |
| `connect` | `connect <Type> from <CEL> to <CEL> { … } [as <name>]`: creates a relation (§12.3, DISL §9.4). |
| `continue` | Continues the nearest loop with its next iteration (§12.2). A CEL reserved word. |
| `create` | `create <Type> { <attr>: <CEL> … } [in <CEL>] [after|before <CEL>] [as <name>]`: creates an element (§12.3, DISL §9.4). |
| `delete` | `delete <CEL>`: deletes an element or a list of them (§12.3). |
| `editLabel` | `editLabel <CEL> [{ label: <id> }]`: starts editing a label in place (§12.3). |
| `else` | The branch of `if` taken when its condition is false (§12.2). A CEL reserved word. |
| `fail` | `fail <CEL>`: refuses the gesture with the message and discards the transaction (§12.2, DISL's `abort`). |
| `fn` | `fn <name>(<params>) [-> <Type>] [recursion <n>] { … }`: a script function, callable from CEL (§12.1). |
| `highlight` | `highlight <CEL> [{ durationMs: <n> }]`: applies the `highlighted` state (§12.3). |
| `if` | `if <CEL> { … } [else …]`: a conditional (§12.2). A CEL reserved word. |
| `into` | In `move`: the new parent, `null` for the document's own elements. |
| `layout` | `layout { … }`: a diagram's layouts (§8.8). As a statement, `layout <name> [on <CEL>]`: runs a layout (§12.3). |
| `let` | `let <name> [: <Type>] = <CEL>`: an immutable local (§12.2). A CEL reserved word. |
| `limit` | In a loop: `limit <n>`, the most iterations it may take; reaching it stops the call (§12.2). |
| `move` | `move <CEL> [to <x>, <y>] [into <parent>] [slot <name>] [after <CEL> \| before <CEL>]`: changes an element's placement, its parent and its place among its siblings (§12.3, DESL §8.2). |
| `notify` | `notify <CEL> [severity <name>]`: shows a message (§12.3). |
| `open` | `open <CEL>`: opens a link, as DISL §9.4 says (§12.3). |
| `openForm` | `openForm <form> for <CEL>`: opens a form for an element (§12.3). |
| `place` | In `create`: the parent placement that chooses its parent and index (DISL §9.1). |
| `recursion` | In a function: `recursion <n>`, how deep it may recurse, at most 64 (§12.6). |
| `reorder` | `reorder <CEL> by|after|before <CEL>`: changes an element's place among its siblings (§12.3). |
| `reparent` | `reparent <CEL> to <CEL> …`: moves an element to another parent (§12.3). |
| `resize` | `resize <CEL> to <width>, <height>` (§12.3). |
| `return` | `return <CEL>` returns from a function; `return` last in a block ends the statements (§12.2). A CEL reserved word. |
| `retype` | `retype <CEL> to <Type>`: changes an element's type (§12.3). |
| `reveal` | `reveal <CEL>`: scrolls the canvas to elements (§12.3). |
| `select` | `select <CEL>`: changes the selection (§12.3). |
| `set` | `set <path> = <CEL>`: assigns an attribute (§12.3). |
| `size` | In `create`: the new element's size. |
| `slot` | In `create`, `move`, `reparent` and a binding's `parent`: the containment slot. |
| `unset` | `unset <path>`: removes an attribute's stored value (§12.3). |
| `var` | `var <name> [: <Type>] = <CEL>`: a mutable local (§12.2). A CEL reserved word. |
| `view` | `view <CEL> { <key>: <CEL> … }`: changes view data (§12.3, DISL §9.4). |
| `while` | `while <CEL> limit <n> { … }`: a loop (§12.2). A CEL reserved word. |Shown as written in the source.
| Keyword | Documentation |
|---|---|
| `algorithm` | In `layout`: `algorithm <name> [capability <name>] { … }`, a layout algorithm: one of DISL's, named by its setting `algorithm`, or a capability of the `layout` extension point (§8.8). |
| `axis` | In `coordinates`: `axis <name> { … }`, an axis (DISL §5.3). |
| `badge` | In a node notation: `badge <id> { … }`, a badge (DISL §6.9). |
| `canvas` | In `notation`: `canvas { … }`, the canvas's background, header, legend, filters and notices (DISL §6.13). |
| `compartment` | In a node notation: `compartment <id> { … }`, a compartment (DISL §6.9). |
| `context` | In `toolbox`: `context [for <Types>] [when <CEL>] { … }`, a context tool set (DISL §7.3). |
| `coordinates` | `coordinates { … }`: the coordinate systems, axes and snapping profiles of a diagram (§8.1, DISL §5). |
| `defaults` | In `notation`: `defaults { … }`, the notation's defaults. |
| `edge` | In `notation`: `edge <Types> { … }`, the notation of relation types (§8.5, DISL §6.10). |
| `field` | In a form: `field <attribute> ["<label>"] { … }`, a form field for an attribute (DISL §7.5). |
| `form` | A form: `form <id> ["<label>"] [for <Types>] { … }` (§8.7, DISL §7.5). |
| `group` | In `toolbox`: `group <id> ["<label>"] { … }`, a group of tools (DISL §7.1). |
| `icon` | In `notation`: `icon <name> { … }`, an icon definition (DISL §6.14). |
| `item` | In a form: `item [<id>] ["<label>"] { … }`, a form item of any kind (DISL §7.5). |
| `line` | In an edge notation: `line { … }`, the line's stroke and routing (DISL §6.10). In a binding rule or block: `line "<regex>"`, the statement (FBL §4.6). |
| `marker` | In `notation`: `marker <name> { … }`, a marker definition. In an edge notation: `marker source|target|mid <value>` (DISL §6.11). |
| `mid` | In an edge notation: `marker mid <value>`, a marker along the edge. |
| `node` | In `notation`: `node <Types> { … }`, the notation of element types (§8.4, DISL §6.9). |
| `notation` | `notation { … }`: how a diagram is drawn: theme, styles, shapes, markers, node and edge notations (§8.3, DISL §6). |
| `section` | In a form: `section [<id>] ["<label>"] { … }`. In a binding of the `bullets` family: `section <name> "<heading>"` (FBL §4.8). |
| `shape` | In `notation`: `shape <name> { … }`, a custom shape. In a node notation: `shape <value> { … }`, the node's shape (DISL §6.7, §6.8). |
| `snapping` | In `coordinates`: `snapping <name> { … }`, a snapping profile (DISL §5.9). |
| `source` | In an edge notation: `marker source …`. In a relation rule: `source from <slot>`. |
| `state` | In a node or edge notation: `state <name> { … }`, the style of a state (DISL §6.6). |
| `style` | In `notation`: `style <name> [extends <names>] { … }`, a named style (DISL §6.6). |
| `system` | In `coordinates`: `system <name> { … }`, a coordinate system (DISL §5.7). |
| `target` | In an edge notation: `marker target …`. In a relation rule: `target from <slot>`. |
| `template` | In `toolbox`: `template <id> { … }`, a template (DISL §7.4). In a binding: `template <value>`, the bytes of a new body (FBL §13). |
| `theme` | In `notation`: `theme { … }`, the theme's tokens and modes (DISL §6.2). |
| `tool` | In `toolbox`: `tool <id> ["<label>"] { … }`, a tool; in `context`, a context tool (DISL §7.2, §7.3). |
| `toolbox` | `toolbox { … }`: a diagram's tools, groups, context tools and templates (§8.6, DISL §7). |
| `variant` | In a node or edge notation: `variant <name> [when <CEL>] { … }`, a variant (DISL §6.9). |
| `viewpoint` | `viewpoint <id> ["<label>"] { … }`: a viewpoint (§8.9, DISL §3.5). |Shown as written in the source.
| Keyword | Documentation |
|---|---|
cells |
In surface table: cells <Type> { … }, the element type of the cells, with the attribute naming the column (DESL §7.3). |
columns |
In surface table: columns <Type> { … }, the element type of the columns, with the attributes that play their parts (DESL §7.3). |
convert |
In a value type: convert <type> <conversion>, what a value becomes when its column's type changes (DESL §7.6). |
entries |
In surface hierarchy: entries <Type> { … }, the entries' element type (DESL §7.7). |
filters |
In surface hierarchy: filters <Type> { … }, the stored filters' element type (DESL §7.7). |
hierarchy |
surface hierarchy { … }: a designer's surface of boxes that contain boxes (§9.3, DESL §7.7). |
labels |
In surface hierarchy: labels <attribute> { … }, an attribute whose values name members of a list (DESL §7.7). |
levels |
In surface hierarchy: levels <Type> { … }, the levels' element type (DESL §7.7). |
notes |
In surface hierarchy: notes <Type> { … }, the notes' element type (DESL §7.7). |
rows |
In surface table: rows <Type> { … }, the rows' element type (DESL §7.2). |
surface |
`surface table |
table |
surface table { … }: a designer's surface of rows and columns (§9.1, DESL §7.2). |
valueType |
In surface table: valueType <key> ["<label>"] { … }, a value type (DESL §7.5). |
views |
In surface table: views <Type> { … }, the views' element type (DESL §7.4). |
widths |
In surface hierarchy: widths <Type> { … }, the element type that keeps the widths of the columns of levels, with the attributes of a column's depth and its width (DESL §7.7.1). |
| Keyword | Documentation |
|---|---|
check |
In surface text: check with <source> { … }, a check whose findings the editor shows (§10.2). |
complete |
In surface text: complete from <source> { … }, a completion source (§10.2). |
files |
In surface text: the files an editor opens. In claims: the files a binding takes. In a binding rule: the file rules it reads (FBL §10). |
fold |
In surface text: fold <Types> { … }, the element types whose ranges fold (§10.2). |
outline |
In surface text: outline <Types> [by <attribute>] { … }, what the outline shows (§10.2). |
preview |
In surface text: preview <source> { … }, an embedded preview (§10.2). |
text |
surface text { … }: an editor's surface (§10). In a binding: text { … }, the conventions of new text (FBL §6.3). As a slot: the text of an element (FBL §5.2). |
token |
In surface text: token <class> { … }, a token class of the editor's own (§10.2). |
tokens |
In surface text: tokens <syntax> { … }, the syntax the token classes come from (§10.2). |
with |
In surface text: check with <source>. |
| Keyword | Documentation |
|---|---|
| `binding` | `binding <name> [family <family>] { … }`: how the tool type's model is read from and written to a format, an FBL binding written in ATD (§11). |
| `block` | In a binding of the `blocks` family: `block <name> line "<regex>" { … }`, a statement that opens a block and produces nothing (FBL §4.7). |
| `body` | In a binding: `body { … }`, the body's kind, family and folder settings (FBL §3.2). |
| `claims` | In a binding: `claims { … }` or `claims files "<glob>", …`, which files the binding takes (FBL §12). |
| `family` | In a binding: `family <family>` (`yaml`, `json`, `xml`, `lines`, `blocks`, `bullets`, `grammar`) or `family capability <name>` (§11.1). |
| `grammar` | In a binding of the `grammar` family: `grammar { … }`, the LALR(1) grammar that reads the body, in ATD grammar notation, or `grammar from "<file>.lark"`, the same in a file beside the description (§11.9, FBL §4.9). |
| `header` | In a binding: `header { … }`, the version or identity mark the body starts with (FBL §5.6). |
| `id` | In a binding rule: `id from <slot>` or `id { … }`, where an element's id is stored (FBL §5.3). |
| `insert` | In a binding rule: `insert { … }`, how a new entry is written (FBL §6.2). |
| `parent` | In a binding rule: `parent <rules> [slot <name>]`, the rules whose entries contain this one's (FBL §5.5). |
| `references` | In an attribute binding: `references <rules> by <attribute|id>`, the value names an entry of those rules (FBL §5.7). |
| `registration` | In a binding: `registration { … }`, what the binding adds to the `.adp` registration (FBL §8). |
| `remove` | In a binding rule: `remove { … }`, how an entry is removed (FBL §6.2). |
| `within` | In a binding rule: `within <names>`, the blocks or sections it matches in (FBL §4.7, §4.8). |Shown as written in the source.
| Keyword | Documentation |
|---|---|
in |
In create: the parent. In for: what the loop iterates. In CEL: membership. A CEL reserved word. |