{
  "kind": "sequence",
  "doc": "A UML sequence diagram (UML 2.5.1, chapter 17): lifelines from left to right in source order, messages and fragments from top to bottom. Fragments nest by indentation.",
  "header": [
    {
      "name": "subtitle",
      "doc": "Second line below the title.",
      "type": "text",
      "expected": "a text in double quotes like `\"Order service\"`"
    },
    {
      "name": "look",
      "doc": "`plain` (default) draws the UML notation, `cards` toned cards.",
      "type": "oneOf",
      "expected": "one of `plain`, `cards`",
      "choices": [
        "plain",
        "cards"
      ]
    },
    {
      "name": "locale",
      "doc": "Language of the texts Diagrist adds to the picture and of the description: `en` (default) or `de`.",
      "type": "oneOf",
      "expected": "one of `en`, `de`",
      "choices": [
        "en",
        "de"
      ]
    }
  ],
  "statements": [
    {
      "keyword": "participant",
      "doc": "A lifeline drawn as a box, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.",
      "examples": [
        "participant api \"api-service\" stereotype=\"service\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id that messages, `activate`, `note` and `ref` use for this lifeline.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "label",
          "doc": "Name shown in the head.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "stereotype",
          "doc": "Stereotype above the name, written without guillemets: `service` shows `«service»`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        },
        {
          "name": "tone",
          "doc": "Colour of the head and its bars in `look=cards`; without it the head is slate.",
          "type": "oneOf",
          "expected": "one of `blue`, `indigo`, `purple`, `maroon`, `green`, `teal`, `slate`, `red`, `orange`, `peach`, `sky`",
          "choices": [
            "blue",
            "indigo",
            "purple",
            "maroon",
            "green",
            "teal",
            "slate",
            "red",
            "orange",
            "peach",
            "sky"
          ]
        }
      ],
      "flags": [
        {
          "name": "external",
          "doc": "Draws the head dashed: the system is outside the scope of the diagram."
        }
      ],
      "children": []
    },
    {
      "keyword": "actor",
      "doc": "A lifeline drawn as a stick figure, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.",
      "examples": [
        "actor customer \"Customer\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id that messages, `activate`, `note` and `ref` use for this lifeline.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "label",
          "doc": "Name shown in the head.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "stereotype",
          "doc": "Stereotype above the name, written without guillemets: `service` shows `«service»`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        },
        {
          "name": "tone",
          "doc": "Colour of the head and its bars in `look=cards`; without it the head is slate.",
          "type": "oneOf",
          "expected": "one of `blue`, `indigo`, `purple`, `maroon`, `green`, `teal`, `slate`, `red`, `orange`, `peach`, `sky`",
          "choices": [
            "blue",
            "indigo",
            "purple",
            "maroon",
            "green",
            "teal",
            "slate",
            "red",
            "orange",
            "peach",
            "sky"
          ]
        }
      ],
      "flags": [
        {
          "name": "external",
          "doc": "Draws the head dashed: the system is outside the scope of the diagram."
        }
      ],
      "children": []
    },
    {
      "keyword": "database",
      "doc": "A lifeline drawn as a cylinder, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.",
      "examples": [
        "database db \"Orders DB\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id that messages, `activate`, `note` and `ref` use for this lifeline.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "label",
          "doc": "Name shown in the head.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "stereotype",
          "doc": "Stereotype above the name, written without guillemets: `service` shows `«service»`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        },
        {
          "name": "tone",
          "doc": "Colour of the head and its bars in `look=cards`; without it the head is slate.",
          "type": "oneOf",
          "expected": "one of `blue`, `indigo`, `purple`, `maroon`, `green`, `teal`, `slate`, `red`, `orange`, `peach`, `sky`",
          "choices": [
            "blue",
            "indigo",
            "purple",
            "maroon",
            "green",
            "teal",
            "slate",
            "red",
            "orange",
            "peach",
            "sky"
          ]
        }
      ],
      "flags": [
        {
          "name": "external",
          "doc": "Draws the head dashed: the system is outside the scope of the diagram."
        }
      ],
      "children": []
    },
    {
      "keyword": "queue",
      "doc": "A lifeline drawn as a horizontal tube, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.",
      "examples": [
        "queue broker \"Kafka\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id that messages, `activate`, `note` and `ref` use for this lifeline.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "label",
          "doc": "Name shown in the head.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "stereotype",
          "doc": "Stereotype above the name, written without guillemets: `service` shows `«service»`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        },
        {
          "name": "tone",
          "doc": "Colour of the head and its bars in `look=cards`; without it the head is slate.",
          "type": "oneOf",
          "expected": "one of `blue`, `indigo`, `purple`, `maroon`, `green`, `teal`, `slate`, `red`, `orange`, `peach`, `sky`",
          "choices": [
            "blue",
            "indigo",
            "purple",
            "maroon",
            "green",
            "teal",
            "slate",
            "red",
            "orange",
            "peach",
            "sky"
          ]
        }
      ],
      "flags": [
        {
          "name": "external",
          "doc": "Draws the head dashed: the system is outside the scope of the diagram."
        }
      ],
      "children": []
    },
    {
      "keyword": "boundary",
      "doc": "A lifeline drawn as the boundary symbol of robustness analysis, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.",
      "examples": [
        "boundary form \"Order form\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id that messages, `activate`, `note` and `ref` use for this lifeline.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "label",
          "doc": "Name shown in the head.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "stereotype",
          "doc": "Stereotype above the name, written without guillemets: `service` shows `«service»`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        },
        {
          "name": "tone",
          "doc": "Colour of the head and its bars in `look=cards`; without it the head is slate.",
          "type": "oneOf",
          "expected": "one of `blue`, `indigo`, `purple`, `maroon`, `green`, `teal`, `slate`, `red`, `orange`, `peach`, `sky`",
          "choices": [
            "blue",
            "indigo",
            "purple",
            "maroon",
            "green",
            "teal",
            "slate",
            "red",
            "orange",
            "peach",
            "sky"
          ]
        }
      ],
      "flags": [
        {
          "name": "external",
          "doc": "Draws the head dashed: the system is outside the scope of the diagram."
        }
      ],
      "children": []
    },
    {
      "keyword": "control",
      "doc": "A lifeline drawn as the control symbol of robustness analysis, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.",
      "examples": [
        "control checkout \"Checkout\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id that messages, `activate`, `note` and `ref` use for this lifeline.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "label",
          "doc": "Name shown in the head.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "stereotype",
          "doc": "Stereotype above the name, written without guillemets: `service` shows `«service»`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        },
        {
          "name": "tone",
          "doc": "Colour of the head and its bars in `look=cards`; without it the head is slate.",
          "type": "oneOf",
          "expected": "one of `blue`, `indigo`, `purple`, `maroon`, `green`, `teal`, `slate`, `red`, `orange`, `peach`, `sky`",
          "choices": [
            "blue",
            "indigo",
            "purple",
            "maroon",
            "green",
            "teal",
            "slate",
            "red",
            "orange",
            "peach",
            "sky"
          ]
        }
      ],
      "flags": [
        {
          "name": "external",
          "doc": "Draws the head dashed: the system is outside the scope of the diagram."
        }
      ],
      "children": []
    },
    {
      "keyword": "entity",
      "doc": "A lifeline drawn as the entity symbol of robustness analysis, from left to right in source order. Messages, notes and references name it by its id. UML 2.5.1: 17.3.3.1 Lifeline.",
      "examples": [
        "entity order \"Order\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id that messages, `activate`, `note` and `ref` use for this lifeline.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "label",
          "doc": "Name shown in the head.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "stereotype",
          "doc": "Stereotype above the name, written without guillemets: `service` shows `«service»`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        },
        {
          "name": "tone",
          "doc": "Colour of the head and its bars in `look=cards`; without it the head is slate.",
          "type": "oneOf",
          "expected": "one of `blue`, `indigo`, `purple`, `maroon`, `green`, `teal`, `slate`, `red`, `orange`, `peach`, `sky`",
          "choices": [
            "blue",
            "indigo",
            "purple",
            "maroon",
            "green",
            "teal",
            "slate",
            "red",
            "orange",
            "peach",
            "sky"
          ]
        }
      ],
      "flags": [
        {
          "name": "external",
          "doc": "Draws the head dashed: the system is outside the scope of the diagram."
        }
      ],
      "children": []
    },
    {
      "keyword": "autonumber",
      "doc": "Numbers all messages in source order (1, 2, 3 ...), across fragments; the number stands before the label.",
      "examples": [
        "autonumber"
      ],
      "arguments": [],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "frame",
      "doc": "A frame around the whole interaction with `sd Name` in its tag. Without a name it shows the title. Gates (`gate` in `msg`) draw the frame without this line too. UML 2.5.1: 17.2.3.1 Interaction, drawn as a frame.",
      "examples": [
        "frame \"OAuth callback\""
      ],
      "arguments": [
        {
          "name": "label",
          "doc": "Name of the interaction in the tag; defaults to the title.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "msg",
      "doc": "A message in source order; its arrow says what kind. Sender equal to receiver is a self call. Calls and replies activate the receiver by themselves. `found` as sender and `lost` as receiver are found and lost messages; `gate` is a gate on the frame of the interaction (`gate -> a` comes in from the left, `a --> gate` replies to the left, `a -> gate` leaves to the right), `gate.name` names it. The `id=` of a `ref` or fragment as an end leads the message to its edge. UML 2.5.1: 17.4.3.1 Message.",
      "examples": [
        "msg client -> api \"GET /orders\" id=request",
        "msg api --> client \"200 OK\"",
        "msg gate.order -> api \"place(order)\" emph"
      ],
      "arguments": [
        {
          "name": "from",
          "doc": "Sender: a lifeline, `found`, `gate`, or a frame with `id=`. UML 2.5.1: `found` 17.4.3.1 Found message, without sender; `gate` 17.4.3.5 Gate on the frame of the interaction.",
          "type": "end",
          "expected": "a lifeline id like `api`, `found`, `lost`, `gate`, `gate.name`, or the `id=` of a `ref` or fragment, optionally with `.name`",
          "optional": false
        },
        {
          "name": "arrow",
          "doc": "The kind of message, which also decides how it is drawn. UML 2.5.1: `->` 17.4.3.1 Synchronous call; `~>` 17.4.3.1 Asynchronous call or signal; `-->` 17.4.3.1 Reply to a call.",
          "type": "arrow",
          "expected": "one of the arrows `->` synchronous call (filled head), `~>` asynchronous message (open head), `-->` reply (dashed, open head)",
          "choices": [
            "->",
            "~>",
            "-->"
          ],
          "meanings": {
            "->": "synchronous call (filled head)",
            "~>": "asynchronous message (open head)",
            "-->": "reply (dashed, open head)"
          },
          "optional": false
        },
        {
          "name": "to",
          "doc": "Receiver: a lifeline, `lost`, `gate`, or a frame with `id=`. UML 2.5.1: `lost` 17.4.3.1 Lost message, without receiver; `gate` 17.4.3.5 Gate on the frame of the interaction.",
          "type": "end",
          "expected": "a lifeline id like `api`, `found`, `lost`, `gate`, `gate.name`, or the `id=` of a `ref` or fragment, optionally with `.name`",
          "optional": false
        },
        {
          "name": "label",
          "doc": "What is sent; without it the arrow has no label.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the message that `duration` and `time` refer to.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        },
        {
          "name": "mark",
          "doc": "Id of a decision of the decision bar, such as `E1`; the mark is drawn after the label.",
          "type": "ref",
          "expected": "the id of an `adr` declared in this diagram",
          "refersTo": [
            "adr"
          ]
        },
        {
          "name": "duration",
          "doc": "Duration of the transmission: the arrow slopes down and shows the text in `{...}`. UML 2.5.1: 8.5.3.2 Duration constraint.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        }
      ],
      "flags": [
        {
          "name": "emph",
          "doc": "Highlights the message in the accent colour."
        }
      ],
      "children": []
    },
    {
      "keyword": "create",
      "doc": "A creation message: dashed with an open head, and the head of the receiver stands at its height. Before it the lifeline does not exist. UML 2.5.1: 17.4.3.1 Message that creates a lifeline.",
      "examples": [
        "create client -> meter \"new MeterData()\""
      ],
      "arguments": [
        {
          "name": "from",
          "doc": "The lifeline that creates.",
          "type": "ref",
          "expected": "the id of a `participant`, `actor`, `database`, `queue`, `boundary`, `control` or `entity` declared in this diagram",
          "refersTo": [
            "participant",
            "actor",
            "database",
            "queue",
            "boundary",
            "control",
            "entity"
          ],
          "optional": false
        },
        {
          "name": "arrow",
          "doc": "Always `->`.",
          "type": "arrow",
          "expected": "one of the arrows `->`",
          "choices": [
            "->"
          ],
          "optional": false
        },
        {
          "name": "to",
          "doc": "The lifeline that is created.",
          "type": "ref",
          "expected": "the id of a `participant`, `actor`, `database`, `queue`, `boundary`, `control` or `entity` declared in this diagram",
          "refersTo": [
            "participant",
            "actor",
            "database",
            "queue",
            "boundary",
            "control",
            "entity"
          ],
          "optional": false
        },
        {
          "name": "label",
          "doc": "The constructor call; without it the arrow has no label.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the message that `duration` and `time` refer to.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        },
        {
          "name": "mark",
          "doc": "Id of a decision of the decision bar, such as `E1`; the mark is drawn after the label.",
          "type": "ref",
          "expected": "the id of an `adr` declared in this diagram",
          "refersTo": [
            "adr"
          ]
        },
        {
          "name": "duration",
          "doc": "Duration of the transmission: the arrow slopes down and shows the text in `{...}`. UML 2.5.1: 8.5.3.2 Duration constraint.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        }
      ],
      "flags": [
        {
          "name": "emph",
          "doc": "Highlights the message in the accent colour."
        }
      ],
      "children": []
    },
    {
      "keyword": "destroy",
      "doc": "Destruction: the lifeline ends here with an X. No message reaches it afterwards. UML 2.5.1: 17.4.3.4 End of a lifeline (destruction).",
      "examples": [
        "destroy session"
      ],
      "arguments": [
        {
          "name": "target",
          "doc": "The lifeline that ends.",
          "type": "ref",
          "expected": "the id of a `participant`, `actor`, `database`, `queue`, `boundary`, `control` or `entity` declared in this diagram",
          "refersTo": [
            "participant",
            "actor",
            "database",
            "queue",
            "boundary",
            "control",
            "entity"
          ],
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "activate",
      "doc": "Starts an activation bar by hand, for processing after an asynchronous message. Calls and replies need none, their bars appear by themselves. Ends with `deactivate`. UML 2.5.1: 17.2.3.4 Execution on a lifeline (activation bar).",
      "examples": [
        "activate worker"
      ],
      "arguments": [
        {
          "name": "target",
          "doc": "The lifeline whose bar starts at the last message.",
          "type": "ref",
          "expected": "the id of a `participant`, `actor`, `database`, `queue`, `boundary`, `control` or `entity` declared in this diagram",
          "refersTo": [
            "participant",
            "actor",
            "database",
            "queue",
            "boundary",
            "control",
            "entity"
          ],
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "deactivate",
      "doc": "Ends the bar the last `activate` of this lifeline started. UML 2.5.1: 17.2.3.4 Execution on a lifeline (activation bar).",
      "examples": [
        "deactivate worker"
      ],
      "arguments": [
        {
          "name": "target",
          "doc": "The lifeline whose bar ends at the last message.",
          "type": "ref",
          "expected": "the id of a `participant`, `actor`, `database`, `queue`, `boundary`, `control` or `entity` declared in this diagram",
          "refersTo": [
            "participant",
            "actor",
            "database",
            "queue",
            "boundary",
            "control",
            "entity"
          ],
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "note",
      "doc": "A note at this point of the time axis, over the lifelines of `over=`. Long texts wrap. UML 2.5.1: 7.2.3.2 Comment (note).",
      "examples": [
        "note \"Idempotency key = order number\" over=api,db"
      ],
      "arguments": [
        {
          "name": "text",
          "doc": "What the note says.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "over",
          "doc": "Lifelines it spans, comma separated without spaces, like `over=auftrag,lager`. Required.",
          "type": "lifelines",
          "expected": "lifeline ids separated by commas without spaces, like `auftrag,lager`"
        }
      ],
      "flags": [],
      "children": []
    },
    {
      "keyword": "ref",
      "doc": "A reference to another interaction (interaction use): a frame tagged `ref` over the lifelines of `over=`. With `id=r` the messages right after it that name `r` as an end run to its edge (actual gates, `r.name` names them), and the frame grows to hold them. UML 2.5.1: 17.7.3.1 Use of another interaction (`ref`).",
      "examples": [
        "ref \"Authorize payment\" over=payment,psp id=pay file=\"authorize-payment.dgr\""
      ],
      "arguments": [
        {
          "name": "label",
          "doc": "Name of the referenced interaction.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "over",
          "doc": "Lifelines it spans, comma separated without spaces, like `over=auftrag,lager`. Required.",
          "type": "lifelines",
          "expected": "lifeline ids separated by commas without spaces, like `auftrag,lager`"
        },
        {
          "name": "id",
          "doc": "Name of the frame, for messages that start or end at its edge. UML 2.5.1: 17.4.3.5 Gate on an interaction use.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        },
        {
          "name": "file",
          "doc": "File of the referenced sequence diagram, relative to this one; named in the description.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        }
      ],
      "flags": [],
      "children": []
    },
    {
      "keyword": "invariant",
      "doc": "A state invariant at this point on the lifeline `on=`: a condition in `{...}`, or with `state` a state in a rounded box. UML 2.5.1: 17.2.3.5 State invariant.",
      "examples": [
        "invariant \"logged in\" on=bff state"
      ],
      "arguments": [
        {
          "name": "text",
          "doc": "The condition or state, without braces.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "on",
          "doc": "The lifeline the invariant holds on. Required.",
          "type": "ref",
          "expected": "the id of a `participant`, `actor`, `database`, `queue`, `boundary`, `control` or `entity` declared in this diagram",
          "refersTo": [
            "participant",
            "actor",
            "database",
            "queue",
            "boundary",
            "control",
            "entity"
          ]
        }
      ],
      "flags": [
        {
          "name": "state",
          "doc": "Draws a state in a rounded box instead of a condition in braces."
        }
      ],
      "children": []
    },
    {
      "keyword": "divider",
      "doc": "A divider on the time axis: a double line across all lifelines with the text in a box in the middle. Only at the top level, not inside a fragment.",
      "examples": [
        "divider \"Accept the webhook\""
      ],
      "arguments": [
        {
          "name": "label",
          "doc": "Name of the section that starts here.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "coregion",
      "doc": "A coregion on the lifeline: the order of the indented events is arbitrary, drawn as square brackets on the lifeline. Only messages from or to it, `activate`, `deactivate` and `note` may stand in it. UML 2.5.1: 17.6.4.10 Coregion, unordered events on one lifeline.",
      "examples": [
        "coregion notify"
      ],
      "arguments": [
        {
          "name": "on",
          "doc": "The lifeline whose events are unordered.",
          "type": "ref",
          "expected": "the id of a `participant`, `actor`, `database`, `queue`, `boundary`, `control` or `entity` declared in this diagram",
          "refersTo": [
            "participant",
            "actor",
            "database",
            "queue",
            "boundary",
            "control",
            "entity"
          ],
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        }
      ]
    },
    {
      "keyword": "alt",
      "doc": "Alternatives: the first operand whose guard holds is taken; further operands start with `else`. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.7 Alternatives (`alt`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "alt \"token valid\""
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        },
        {
          "keyword": "else",
          "doc": "The next operand of `alt`, written inside `alt` with its statements indented below it. Without a guard it shows `[else]`. A dashed line separates the operands. UML 2.5.1: 17.6.3.1 Operand of a combined fragment.",
          "examples": [
            "else \"invalid token\""
          ],
          "arguments": [
            {
              "name": "guard",
              "doc": "Condition of this operand, without brackets. UML 2.5.1: 17.6.3.2 Guard of an operand.",
              "type": "text",
              "expected": "a text in double quotes like `\"Order service\"`",
              "optional": true
            }
          ],
          "clauses": [],
          "attributes": [],
          "flags": [],
          "children": [
            {
              "keyword": "msg",
              "ref": "/statements/9"
            },
            {
              "keyword": "create",
              "ref": "/statements/10"
            },
            {
              "keyword": "destroy",
              "ref": "/statements/11"
            },
            {
              "keyword": "activate",
              "ref": "/statements/12"
            },
            {
              "keyword": "deactivate",
              "ref": "/statements/13"
            },
            {
              "keyword": "note",
              "ref": "/statements/14"
            },
            {
              "keyword": "ref",
              "ref": "/statements/15"
            },
            {
              "keyword": "invariant",
              "ref": "/statements/16"
            },
            {
              "keyword": "coregion",
              "ref": "/statements/18"
            },
            {
              "keyword": "alt",
              "ref": "/statements/19"
            },
            {
              "keyword": "opt",
              "ref": "/statements/20"
            },
            {
              "keyword": "loop",
              "ref": "/statements/21"
            },
            {
              "keyword": "par",
              "ref": "/statements/22"
            },
            {
              "keyword": "break",
              "ref": "/statements/23"
            },
            {
              "keyword": "critical",
              "ref": "/statements/24"
            },
            {
              "keyword": "seq",
              "ref": "/statements/25"
            },
            {
              "keyword": "strict",
              "ref": "/statements/26"
            },
            {
              "keyword": "neg",
              "ref": "/statements/27"
            },
            {
              "keyword": "assert",
              "ref": "/statements/28"
            },
            {
              "keyword": "ignore",
              "ref": "/statements/29"
            },
            {
              "keyword": "consider",
              "ref": "/statements/30"
            }
          ]
        }
      ]
    },
    {
      "keyword": "opt",
      "doc": "An optional part, taken when its guard holds. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.8 Option (`opt`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "opt \"3-D Secure required\""
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "loop",
      "doc": "A repetition while the guard holds. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.17 Loop (`loop`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "loop \"at most 3 times\" id=retry"
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "par",
      "doc": "Parallel operands, separated by `and`; their events interleave freely. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.10 Parallel (`par`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "par"
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        },
        {
          "keyword": "and",
          "doc": "The next operand of `par`, `seq` or `strict`, written inside the fragment with its statements indented below it. UML 2.5.1: 17.6.3.1 Operand of a combined fragment.",
          "examples": [
            "and"
          ],
          "arguments": [
            {
              "name": "guard",
              "doc": "Condition of this operand, without brackets. UML 2.5.1: 17.6.3.2 Guard of an operand.",
              "type": "text",
              "expected": "a text in double quotes like `\"Order service\"`",
              "optional": true
            }
          ],
          "clauses": [],
          "attributes": [],
          "flags": [],
          "children": [
            {
              "keyword": "msg",
              "ref": "/statements/9"
            },
            {
              "keyword": "create",
              "ref": "/statements/10"
            },
            {
              "keyword": "destroy",
              "ref": "/statements/11"
            },
            {
              "keyword": "activate",
              "ref": "/statements/12"
            },
            {
              "keyword": "deactivate",
              "ref": "/statements/13"
            },
            {
              "keyword": "note",
              "ref": "/statements/14"
            },
            {
              "keyword": "ref",
              "ref": "/statements/15"
            },
            {
              "keyword": "invariant",
              "ref": "/statements/16"
            },
            {
              "keyword": "coregion",
              "ref": "/statements/18"
            },
            {
              "keyword": "alt",
              "ref": "/statements/19"
            },
            {
              "keyword": "opt",
              "ref": "/statements/20"
            },
            {
              "keyword": "loop",
              "ref": "/statements/21"
            },
            {
              "keyword": "par",
              "ref": "/statements/22"
            },
            {
              "keyword": "break",
              "ref": "/statements/23"
            },
            {
              "keyword": "critical",
              "ref": "/statements/24"
            },
            {
              "keyword": "seq",
              "ref": "/statements/25"
            },
            {
              "keyword": "strict",
              "ref": "/statements/26"
            },
            {
              "keyword": "neg",
              "ref": "/statements/27"
            },
            {
              "keyword": "assert",
              "ref": "/statements/28"
            },
            {
              "keyword": "ignore",
              "ref": "/statements/29"
            },
            {
              "keyword": "consider",
              "ref": "/statements/30"
            }
          ]
        }
      ]
    },
    {
      "keyword": "break",
      "doc": "Ends the enclosing interaction when the guard holds. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.9 Break (`break`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "break \"timeout\""
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "critical",
      "doc": "A critical region: its events are not interleaved. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.14 Critical region (`critical`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "critical"
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "seq",
      "doc": "Weak sequencing of operands, separated by `and`. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.11 Weak sequencing (`seq`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "seq"
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        },
        {
          "keyword": "and",
          "ref": "/statements/22/children/21"
        }
      ]
    },
    {
      "keyword": "strict",
      "doc": "Strict sequencing of operands, separated by `and`. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.12 Strict sequencing (`strict`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "strict"
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        },
        {
          "keyword": "and",
          "ref": "/statements/22/children/21"
        }
      ]
    },
    {
      "keyword": "neg",
      "doc": "An invalid trace: what must not happen. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.13 Invalid traces (`neg`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "neg"
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "assert",
      "doc": "The only valid trace at this point. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.16 Assertion (`assert`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "assert"
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`. UML 2.5.1: 17.6.3.2 Guard of an operand.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "ignore",
      "doc": "Messages that may appear anywhere and are ignored; the guard lists their names and shows as `ignore {...}`. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.15 Ignored messages (`ignore`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "ignore \"ping, status\""
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "consider",
      "doc": "Only the listed messages are considered; the guard lists their names and shows as `consider {...}`. The statements indented below it belong to the fragment; fragments nest. UML 2.5.1: 17.6.3.3 Combined fragment, 17.6.3.15 Considered messages (`consider`), 17.6.3.1 Operand of a combined fragment.",
      "examples": [
        "consider \"order, pay\""
      ],
      "arguments": [
        {
          "name": "guard",
          "doc": "Condition of the first operand, without brackets; Diagrist adds `[...]`.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "id",
          "doc": "Name of the frame: a message with this name as an end starts or ends at its edge (a gate of the fragment, `f.name` names it). UML 2.5.1: 17.4.3.5 Gate on a combined fragment.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)"
        }
      ],
      "flags": [],
      "children": [
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        }
      ]
    },
    {
      "keyword": "duration",
      "doc": "A duration constraint between two messages with `id=`: a bracket from the first to the second, left of the lifeline both touch when there is room, otherwise mirrored to the right or at the left edge. The text is written without braces; Diagrist adds `{...}`. UML 2.5.1: 8.5.3.2 Duration constraint.",
      "examples": [
        "duration request response \"≤ 300 ms\""
      ],
      "arguments": [
        {
          "name": "from",
          "doc": "The earlier message.",
          "type": "ref",
          "expected": "the id of a `msg` or `create` declared in this diagram",
          "refersTo": [
            "msg",
            "create"
          ],
          "optional": false
        },
        {
          "name": "to",
          "doc": "The later message.",
          "type": "ref",
          "expected": "the id of a `msg` or `create` declared in this diagram",
          "refersTo": [
            "msg",
            "create"
          ],
          "optional": false
        },
        {
          "name": "text",
          "doc": "The constraint, without braces.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "time",
      "doc": "A time constraint of one message with `id=`: a tick at its height left of its lifeline or at the left edge, the text in `{...}`. UML 2.5.1: 8.5.3.2 Time constraint.",
      "examples": [
        "time request \"t = now\""
      ],
      "arguments": [
        {
          "name": "at",
          "doc": "The message.",
          "type": "ref",
          "expected": "the id of a `msg` or `create` declared in this diagram",
          "refersTo": [
            "msg",
            "create"
          ],
          "optional": false
        },
        {
          "name": "text",
          "doc": "The constraint, without braces.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "adr",
      "doc": "An architecture decision in the bar below the picture: question, the chosen option after `=`, and the consequence after `=>`. `mark=` with its id puts the mark into the picture.",
      "examples": [
        "adr E1 \"How do the services coordinate?\" = \"Events over Kafka\" => \"No central coordinator\""
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id of the decision, such as `E1`; `mark=E1` refers to it.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "question",
          "doc": "The question that was decided.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        },
        {
          "name": "equals",
          "doc": "Separates the question from the choice.",
          "type": "arrow",
          "expected": "one of the arrows `=`",
          "choices": [
            "="
          ],
          "optional": false
        },
        {
          "name": "choice",
          "doc": "The chosen option.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        },
        {
          "name": "then",
          "doc": "Introduces the consequence.",
          "type": "arrow",
          "expected": "one of the arrows `=>`",
          "choices": [
            "=>"
          ],
          "optional": true
        },
        {
          "name": "consequence",
          "doc": "What follows from the choice.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": true
        }
      ],
      "clauses": [],
      "attributes": [
        {
          "name": "open",
          "doc": "Who still decides an open question; the card is drawn dashed.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        }
      ],
      "flags": [],
      "children": []
    },
    {
      "keyword": "use",
      "doc": "Puts the statements and variants of another `.dgr` file of the same kind before this file's own, as if they were written here, so a variant may build on them. The other file's header is not taken. `use` lines stand directly after the header.",
      "examples": [
        "use \"radverleih.dgr\""
      ],
      "arguments": [
        {
          "name": "file",
          "doc": "Path of the file relative to this one. It stays inside the folder `dgr` runs in and names no hidden file or folder.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [],
      "attributes": [],
      "flags": [],
      "children": []
    },
    {
      "keyword": "variant",
      "doc": "One more picture from the same base, written as the lines that differ: a statement of the kind adds a line, `set` changes one and `drop` removes one. A new line goes before the next line of its keyword the variant declares again, else after the last line of its keyword, so lines keep the order they are written in. `dgr build` writes it as `<file>.<id>.svg`.",
      "examples": [
        "variant target \"Target 2027\" subtitle=\"For review\" diff",
        "variant a \"Option A: stream through the backend\" from target"
      ],
      "arguments": [
        {
          "name": "id",
          "doc": "Id of the variant, part of the file name of its picture.",
          "type": "id",
          "expected": "an identifier like `api` (letters, digits, `_` and `-`, starting with a letter)",
          "optional": false
        },
        {
          "name": "title",
          "doc": "Title of its picture, in place of the title of the header.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`",
          "optional": false
        }
      ],
      "clauses": [
        {
          "name": "from",
          "doc": "A variant declared above to build on; without it the variant builds on the base.",
          "type": "ref",
          "expected": "the id of a `variant` declared in this diagram",
          "refersTo": [
            "variant"
          ]
        }
      ],
      "attributes": [
        {
          "name": "subtitle",
          "doc": "Subtitle of its picture, in place of the one of the header.",
          "type": "text",
          "expected": "a text in double quotes like `\"Order service\"`"
        }
      ],
      "flags": [
        {
          "name": "diff",
          "doc": "Draws the picture as a comparison with what it builds on: added, removed and changed lines marked, with a legend. Kinds that cannot draw it report K103."
        }
      ],
      "children": [
        {
          "keyword": "participant",
          "ref": "/statements/0"
        },
        {
          "keyword": "actor",
          "ref": "/statements/1"
        },
        {
          "keyword": "database",
          "ref": "/statements/2"
        },
        {
          "keyword": "queue",
          "ref": "/statements/3"
        },
        {
          "keyword": "boundary",
          "ref": "/statements/4"
        },
        {
          "keyword": "control",
          "ref": "/statements/5"
        },
        {
          "keyword": "entity",
          "ref": "/statements/6"
        },
        {
          "keyword": "autonumber",
          "ref": "/statements/7"
        },
        {
          "keyword": "frame",
          "ref": "/statements/8"
        },
        {
          "keyword": "msg",
          "ref": "/statements/9"
        },
        {
          "keyword": "create",
          "ref": "/statements/10"
        },
        {
          "keyword": "destroy",
          "ref": "/statements/11"
        },
        {
          "keyword": "activate",
          "ref": "/statements/12"
        },
        {
          "keyword": "deactivate",
          "ref": "/statements/13"
        },
        {
          "keyword": "note",
          "ref": "/statements/14"
        },
        {
          "keyword": "ref",
          "ref": "/statements/15"
        },
        {
          "keyword": "invariant",
          "ref": "/statements/16"
        },
        {
          "keyword": "divider",
          "ref": "/statements/17"
        },
        {
          "keyword": "coregion",
          "ref": "/statements/18"
        },
        {
          "keyword": "alt",
          "ref": "/statements/19"
        },
        {
          "keyword": "opt",
          "ref": "/statements/20"
        },
        {
          "keyword": "loop",
          "ref": "/statements/21"
        },
        {
          "keyword": "par",
          "ref": "/statements/22"
        },
        {
          "keyword": "break",
          "ref": "/statements/23"
        },
        {
          "keyword": "critical",
          "ref": "/statements/24"
        },
        {
          "keyword": "seq",
          "ref": "/statements/25"
        },
        {
          "keyword": "strict",
          "ref": "/statements/26"
        },
        {
          "keyword": "neg",
          "ref": "/statements/27"
        },
        {
          "keyword": "assert",
          "ref": "/statements/28"
        },
        {
          "keyword": "ignore",
          "ref": "/statements/29"
        },
        {
          "keyword": "consider",
          "ref": "/statements/30"
        },
        {
          "keyword": "duration",
          "ref": "/statements/31"
        },
        {
          "keyword": "time",
          "ref": "/statements/32"
        },
        {
          "keyword": "adr",
          "ref": "/statements/33"
        },
        {
          "keyword": "set",
          "doc": "Changes the line that declares `id`, where it stands. What follows the id is checked against that line's own table: a clause or attribute written again replaces its value, a flag written turns it on. Arguments such as the label cannot be set: drop the line and declare it again.",
          "examples": [
            "set db tech=\"PostgreSQL 17\"",
            "set portal status=deprecated"
          ],
          "arguments": [
            {
              "name": "id",
              "doc": "The id of the line to change.",
              "type": "ref",
              "expected": "the id a line at the top level of the picture declares, such as `db`",
              "optional": false
            }
          ],
          "clauses": [],
          "attributes": [],
          "flags": [],
          "children": []
        },
        {
          "keyword": "drop",
          "doc": "Removes one line of the picture: its keyword and as many of its first arguments as make it unique, matched from the left. It must match exactly one line, and no line left may refer to an id it removes. A line declared again after its `drop` takes its place. Lines inside a block are not dropped singly: drop the block and declare it again.",
          "examples": [
            "drop node portal",
            "drop edge backend -> portal",
            "drop grid rows"
          ],
          "arguments": [
            {
              "name": "keyword",
              "doc": "The keyword of the line, such as `node`.",
              "type": "word",
              "expected": "a single word without quotes",
              "optional": false
            },
            {
              "name": "arguments",
              "doc": "Its first arguments as written, as many as make it unique.",
              "type": "tokens",
              "expected": "the first words, texts and operators of the line as written, such as `backend -> portal`",
              "optional": true
            }
          ],
          "clauses": [],
          "attributes": [],
          "flags": [],
          "children": []
        }
      ]
    }
  ]
}
