Skip to content

structurizr.fbl

Example document structurizr.fbl

Views generated from the file

This view is drawn by this site from structurizr.fbl itself. It shows the data in the document, not the notation the diagram draws.

Bindings of structurizr.fbl. Flowchart of the bindings in structurizr.fbl: 1 binding(s) (workspace) as boxes with the files they claim and their body's format family, and 18 element rule(s) and 0 relation rule(s) as rounded boxes with the type each produces.
Generated from structurizr.fbl at 46e5f91
Diagram as text (Mermaid)
flowchart LR
  accTitle: Bindings of structurizr.fbl
  accDescr: Flowchart of the bindings in structurizr.fbl: 1 binding(s) (workspace) as boxes with the files they claim and their body's format family, and 18 element rule(s) and 0 relation rule(s) as rounded boxes with the type each produces.
  b_workspace["Structurizr DSL workspace<br/>workspace<br/>.dsl, grammar family"]
  e_workspace_workspace("workspace<br/>Workspace")
  b_workspace -->|element| e_workspace_workspace
  e_workspace_person("person<br/>Person")
  b_workspace -->|element| e_workspace_person
  e_workspace_softwareSystem("softwareSystem<br/>SoftwareSystem")
  b_workspace -->|element| e_workspace_softwareSystem
  e_workspace_container("container<br/>Container")
  b_workspace -->|element| e_workspace_container
  e_workspace_component("component<br/>Component")
  b_workspace -->|element| e_workspace_component
  e_workspace_deploymentNode("deploymentNode<br/>DeploymentNode")
  b_workspace -->|element| e_workspace_deploymentNode
  e_workspace_infrastructureNode("infrastructureNode<br/>InfrastructureNode")
  b_workspace -->|element| e_workspace_infrastructureNode
  e_workspace_containerInstance("containerInstance<br/>ContainerInstance")
  b_workspace -->|element| e_workspace_containerInstance
  e_workspace_softwareSystemInstance("softwareSystemInstance<br/>SoftwareSystemInstance")
  b_workspace -->|element| e_workspace_softwareSystemInstance
  e_workspace_relationship("relationship<br/>Relationship")
  b_workspace -->|element| e_workspace_relationship
  e_workspace_viewInclude("viewInclude<br/>ViewInclude")
  b_workspace -->|element| e_workspace_viewInclude
  e_workspace_viewExclude("viewExclude<br/>ViewInclude")
  b_workspace -->|element| e_workspace_viewExclude
  e_workspace_viewTitle("viewTitle<br/>ViewInclude")
  b_workspace -->|element| e_workspace_viewTitle
  e_workspace_viewAutoLayout("viewAutoLayout<br/>ViewInclude")
  b_workspace -->|element| e_workspace_viewAutoLayout
  e_workspace_viewScope("viewScope<br/>ViewInclude")
  b_workspace -->|element| e_workspace_viewScope
  e_workspace_viewEnvironment("viewEnvironment<br/>ViewInclude")
  b_workspace -->|element| e_workspace_viewEnvironment
  e_workspace_interaction("interaction<br/>Interaction")
  b_workspace -->|element| e_workspace_interaction
  e_workspace_include("include<br/>IncludedFile")
  b_workspace -->|element| e_workspace_include

The file

Download structurizr.fbl (37,206 bytes, unchanged from the source).

{
  "$schema": "https://etalii.net/adp/fbl/schema/0.1/fbl.schema.json#/$defs/Document",
  "fbl": "0.15",
  "doc": "A Structurizr DSL workspace (definitions/diagrams/c4-*.dis, c4-container.md), read by the grammar structurizr.lark beside this document: FBL 0.11's grammar family (section 4.9), one binding shared by six readings. Every C4 specification names 'structurizr.fbl#workspace' as its binding, so a host opens one model and one history per .dsl file however many C4 views of it are open (section 9). Comments are owned and kept wherever they stand; a statement that does not parse is skipped to its line's end, inside blocks too, and a block that is never closed ends at the end of the body (recover). Elements, relationships and the declaration's positional arguments are read by name, quoted or bare, with their escapes; a tags argument holds the tags its text is cut into at its commas (FBL 0.13, split), as Structurizr reads it; an absent argument is written in its place, padded with empty ones. Each view kind is a view of the body, which a reading of any tool type shows (spec 067, FR-015), and the selected view's include, exclude, title and autoLayout statements, its scope and environment, which the tool types map onto the diagram's attributes, and its interactions are read for it alone. Which elements a view shows, and relationships lifted to the nearest drawn ancestor, are the viewpoint's and DISL's. An !include is read as the file it names and never followed; !script and the other directives, styles and properties are unbound statements: kept byte for byte, never followed.",
  "bindings": {
    "workspace": {
      "title": "Structurizr DSL workspace",
      "claims": {
        "extensions": [
          ".dsl"
        ],
        "origins": [
          "c4/context",
          "c4/container",
          "c4/component",
          "c4/deployment",
          "c4/dynamic",
          "c4/system-landscape"
        ]
      },
      "body": {
        "kind": "file",
        "family": "grammar",
        "grammar": {
          "file": "structurizr.lark"
        },
        "recover": {
          "unit": "unit",
          "sync": [
            "_NL"
          ],
          "nested": {
            "open": "{",
            "close": "}"
          },
          "unclosed": {
            "BLOCK_COMMENT": "*/"
          }
        }
      },
      "reader": "declared",
      "text": {
        "newline": "lf",
        "indent": 4,
        "finalNewline": true
      },
      "registration": {
        "legacyLayout": "{base}.layout.json",
        "createOnFirstPlacement": true
      },
      "blocks": [
        {
          "name": "systemLandscapeView",
          "at": "/workspace/views/system_landscape_view",
          "view": {
            "node": "key",
            "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
            "escape": {
              "with": "\\",
              "quote": "\""
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/views",
            "emit": "systemLandscape \"{key}\" {\n    include *\n    autoLayout lr\n}"
          }
        },
        {
          "name": "systemLandscapeViewWithoutKey",
          "at": "/workspace/views/system_landscape_view_default",
          "view": {
            "value": "'landscape'"
          }
        },
        {
          "name": "systemContextView",
          "at": "/workspace/views/system_context_view",
          "view": {
            "node": "key",
            "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
            "escape": {
              "with": "\\",
              "quote": "\""
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/views",
            "emit": "systemContext {scope} \"{key}\" {\n    include *\n    autoLayout lr\n}"
          }
        },
        {
          "name": "systemContextViewWithoutKey",
          "at": "/workspace/views/system_context_view_default",
          "view": {
            "value": "'systemcontext'"
          }
        },
        {
          "name": "containerView",
          "at": "/workspace/views/container_view",
          "view": {
            "node": "key",
            "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
            "escape": {
              "with": "\\",
              "quote": "\""
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/views",
            "emit": "container {scope} \"{key}\" {\n    include *\n    autoLayout lr\n}"
          }
        },
        {
          "name": "containerViewWithoutKey",
          "at": "/workspace/views/container_view_default",
          "view": {
            "value": "'container'"
          }
        },
        {
          "name": "componentView",
          "at": "/workspace/views/component_view",
          "view": {
            "node": "key",
            "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
            "escape": {
              "with": "\\",
              "quote": "\""
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/views",
            "emit": "component {scope} \"{key}\" {\n    include *\n    autoLayout lr\n}"
          }
        },
        {
          "name": "componentViewWithoutKey",
          "at": "/workspace/views/component_view_default",
          "view": {
            "value": "'component'"
          }
        },
        {
          "name": "dynamicView",
          "at": "/workspace/views/dynamic_view",
          "view": {
            "node": "key",
            "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
            "escape": {
              "with": "\\",
              "quote": "\""
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/views",
            "emit": "dynamic {scope} \"{key}\" {\n    include *\n    autoLayout lr\n}"
          }
        },
        {
          "name": "dynamicViewWithoutKey",
          "at": "/workspace/views/dynamic_view_default",
          "view": {
            "value": "'dynamic'"
          }
        },
        {
          "name": "deploymentView",
          "at": "/workspace/views/deployment_view",
          "view": {
            "node": "key",
            "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
            "escape": {
              "with": "\\",
              "quote": "\""
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/views",
            "emit": "deployment {scope} \"{environment}\" \"{key}\" {\n    include *\n    autoLayout lr\n}"
          }
        },
        {
          "name": "deploymentViewWithoutKey",
          "at": "/workspace/views/deployment_view_default",
          "view": {
            "node": "environment",
            "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
            "escape": {
              "with": "\\",
              "quote": "\""
            }
          }
        }
      ],
      "elements": [
        {
          "name": "workspace",
          "type": "Workspace",
          "doc": "The workspace's name, which the tool types map onto the diagram's workspaceName.",
          "at": "/workspace",
          "attributes": {
            "name": {
              "node": "name",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "person",
          "type": "Person",
          "at": "/workspace/model/**/person",
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "name": {
              "node": "name",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep"
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "name"
                ],
                "pad": true
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/model",
            "emit": "{id} = person \"{name}\" \"{description}\""
          },
          "remove": {
            "cascade": [
              "relationship"
            ]
          }
        },
        {
          "name": "softwareSystem",
          "type": "SoftwareSystem",
          "at": "/workspace/model/**/software_system",
          "opens": {
            "open": " {",
            "close": "}"
          },
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "name": {
              "node": "name",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep"
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "name"
                ],
                "pad": true
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/model",
            "emit": "{id} = softwareSystem \"{name}\" \"{description}\""
          },
          "remove": {
            "cascade": [
              "container",
              "relationship"
            ]
          }
        },
        {
          "name": "container",
          "type": "Container",
          "at": "/workspace/model/**/container",
          "opens": {
            "open": " {",
            "close": "}"
          },
          "parent": {
            "rules": [
              "softwareSystem",
              "person",
              "container",
              "component",
              "deploymentNode",
              "infrastructureNode",
              "containerInstance",
              "softwareSystemInstance"
            ],
            "slot": "containers"
          },
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "name": {
              "node": "name",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep"
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "name"
                ],
                "pad": true
              }
            },
            "technology": {
              "node": "technology",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "description",
                  "name"
                ],
                "pad": true
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "insert": {
            "place": "last-child",
            "emit": "{id} = container \"{name}\" \"{description}\" \"{technology}\""
          },
          "remove": {
            "cascade": [
              "component",
              "relationship"
            ]
          }
        },
        {
          "name": "component",
          "type": "Component",
          "at": "/workspace/model/**/component",
          "opens": {
            "open": " {",
            "close": "}"
          },
          "parent": {
            "rules": [
              "container",
              "softwareSystem",
              "person",
              "component",
              "deploymentNode",
              "infrastructureNode",
              "containerInstance",
              "softwareSystemInstance"
            ]
          },
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "name": {
              "node": "name",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep"
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "name"
                ],
                "pad": true
              }
            },
            "technology": {
              "node": "technology",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "description",
                  "name"
                ],
                "pad": true
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "insert": {
            "place": "last-child",
            "emit": "{id} = component \"{name}\" \"{description}\" \"{technology}\""
          },
          "remove": {
            "cascade": [
              "relationship"
            ]
          }
        },
        {
          "name": "deploymentNode",
          "type": "DeploymentNode",
          "at": "/workspace/model/**/deployment_node",
          "opens": {
            "open": " {",
            "close": "}"
          },
          "parent": {
            "rules": [
              "deploymentNode"
            ]
          },
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "name": {
              "node": "name",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep"
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "name"
                ],
                "pad": true
              }
            },
            "technology": {
              "node": "technology",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "description",
                  "name"
                ],
                "pad": true
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "remove": {
            "cascade": [
              "relationship"
            ]
          }
        },
        {
          "name": "infrastructureNode",
          "type": "InfrastructureNode",
          "at": "/workspace/model/**/infrastructure_node",
          "parent": {
            "rules": [
              "deploymentNode"
            ]
          },
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "name": {
              "node": "name",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep"
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "name"
                ],
                "pad": true
              }
            },
            "technology": {
              "node": "technology",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "description",
                  "name"
                ],
                "pad": true
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "remove": {
            "cascade": [
              "relationship"
            ]
          }
        },
        {
          "name": "containerInstance",
          "type": "ContainerInstance",
          "at": "/workspace/model/**/container_instance",
          "parent": {
            "rules": [
              "deploymentNode"
            ]
          },
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "container": {
              "node": "instance_of",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "reference": {
                "to": [
                  "container"
                ],
                "by": "id"
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "remove": {
            "cascade": [
              "relationship"
            ]
          }
        },
        {
          "name": "softwareSystemInstance",
          "type": "SoftwareSystemInstance",
          "at": "/workspace/model/**/software_system_instance",
          "parent": {
            "rules": [
              "deploymentNode"
            ]
          },
          "id": {
            "from": {
              "node": "identifier"
            }
          },
          "attributes": {
            "softwareSystem": {
              "node": "instance_of",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "reference": {
                "to": [
                  "softwareSystem"
                ],
                "by": "id"
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "remove": {
            "cascade": [
              "relationship"
            ]
          }
        },
        {
          "name": "relationship",
          "type": "Relationship",
          "doc": "A relationship is read as an entry with two reference attributes, which the tool types map onto a relation, so that an end that names nothing is kept with that end unset. A relationship written without a source inside an element's block has that element as its source, as Structurizr reads it: `from` reads the statement's own source, or else (FBL 0.15, `or`) the identifier of the declaration whose block holds the statement, `../identifier`, so that `-> s` in the block of `u = person …` is read from `u`. A set of `from` on such a relationship writes that identifier, as a further slot writes (FBL section 4.9), so a tool type offers no gesture that sets it; a rename of the element rewrites the identifier once. A declaration without an identifier gives no source, and the relationship is kept with `from` unset.",
          "at": "/workspace/model/**/relationship",
          "attributes": {
            "from": {
              "node": "source",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "or": [
                {
                  "node": "../identifier",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  }
                }
              ],
              "reference": {
                "to": [
                  "person",
                  "softwareSystem",
                  "container",
                  "component",
                  "deploymentNode",
                  "infrastructureNode",
                  "containerInstance",
                  "softwareSystemInstance"
                ],
                "by": "id"
              }
            },
            "to": {
              "node": "destination",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "reference": {
                "to": [
                  "person",
                  "softwareSystem",
                  "container",
                  "component",
                  "deploymentNode",
                  "infrastructureNode",
                  "containerInstance",
                  "softwareSystemInstance"
                ],
                "by": "id"
              }
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "to"
                ],
                "pad": true
              }
            },
            "technology": {
              "node": "technology",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\"",
                "requote": "\""
              },
              "empty": "keep",
              "create": {
                "emit": " \"{value}\"",
                "after": [
                  "description",
                  "to"
                ],
                "pad": true
              }
            },
            "tags": {
              "node": "tags",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "split": ",",
              "gather": [
                {
                  "node": "tags_statement/tag",
                  "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
                  "escape": {
                    "with": "\\",
                    "quote": "\""
                  },
                  "split": ","
                }
              ],
              "readOnly": true
            }
          },
          "insert": {
            "place": "end",
            "container": "/workspace/model",
            "emit": "{from} -> {to} \"{description}\""
          },
          "remove": {}
        },
        {
          "name": "viewInclude",
          "type": "ViewInclude",
          "doc": "The selected view's include statements, which the tool types map onto the diagram's includes.",
          "at": "/workspace/views/*/include_statement",
          "selectedView": true,
          "attributes": {
            "members": {
              "node": "member",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "viewExclude",
          "type": "ViewInclude",
          "at": "/workspace/views/*/exclude_statement",
          "selectedView": true,
          "attributes": {
            "excludes": {
              "node": "member",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "viewTitle",
          "type": "ViewInclude",
          "at": "/workspace/views/*/title_statement",
          "selectedView": true,
          "attributes": {
            "title": {
              "node": "title",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "viewAutoLayout",
          "type": "ViewInclude",
          "doc": "autoLayout with no direction lays out top to bottom.",
          "at": "/workspace/views/*/auto_layout_statement",
          "selectedView": true,
          "attributes": {
            "autoLayout": {
              "node": "direction",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "default": "tb",
              "readOnly": true
            },
            "rankSeparation": {
              "node": "rank_separation",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            },
            "nodeSeparation": {
              "node": "node_separation",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "viewScope",
          "type": "ViewInclude",
          "at": "/workspace/views/*/scope",
          "selectedView": true,
          "attributes": {
            "scope": {
              "node": ".",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "viewEnvironment",
          "type": "ViewInclude",
          "at": "/workspace/views/*/environment",
          "selectedView": true,
          "attributes": {
            "environment": {
              "node": ".",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "interaction",
          "type": "Interaction",
          "doc": "A dynamic view's interactions, read for the selected view only.",
          "at": "/workspace/views/*/interaction",
          "selectedView": true,
          "attributes": {
            "from": {
              "node": "source",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "reference": {
                "to": [
                  "person",
                  "softwareSystem",
                  "container",
                  "component",
                  "deploymentNode",
                  "infrastructureNode",
                  "containerInstance",
                  "softwareSystemInstance"
                ],
                "by": "id"
              }
            },
            "to": {
              "node": "destination",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "reference": {
                "to": [
                  "person",
                  "softwareSystem",
                  "container",
                  "component",
                  "deploymentNode",
                  "infrastructureNode",
                  "containerInstance",
                  "softwareSystemInstance"
                ],
                "by": "id"
              }
            },
            "description": {
              "node": "description",
              "match": "\"?(?<value>(?:[^\"\\\\]|\\\\.)*)\"?",
              "escape": {
                "with": "\\",
                "quote": "\""
              },
              "readOnly": true
            }
          }
        },
        {
          "name": "include",
          "type": "IncludedFile",
          "doc": "An !include directive, in any case and at any depth, is read as the file it names and never followed, so that the tool types report it (c4.include-not-followed); IncludedFile is a type no viewpoint draws. Its path is the directive's first argument, without the quotes of a quoted one.",
          "at": "/**/directive",
          "when": "entry.children[0].text.lowerAscii() == '!include'",
          "readOnly": true,
          "attributes": {
            "path": {
              "value": "entry.children.size() < 2 || entry.children[1] == null ? '' : entry.children[1].type == 'STRING' ? entry.children[1].text.substring(1, entry.children[1].text.size() - 1) : entry.children[1].text"
            }
          }
        }
      ],
      "template": {
        "text": "workspace \"{base}\" {\n    model {\n        {key} = softwareSystem \"{base}\" \"Describe {base}.\"\n    }\n    views {\n        container {key} \"containers\" {\n            include *\n            autoLayout lr\n        }\n    }\n}\n",
        "byOrigin": {
          "c4/context": "workspace \"{base}\" {\n    model {\n        {key} = softwareSystem \"{base}\" \"Describe {base}.\"\n    }\n    views {\n        systemContext {key} \"context\" {\n            include *\n            autoLayout lr\n        }\n    }\n}\n",
          "c4/system-landscape": "workspace \"{base}\" {\n    model {\n        {key} = softwareSystem \"{base}\" \"Describe {base}.\"\n    }\n    views {\n        systemLandscape \"landscape\" {\n            include *\n            autoLayout lr\n        }\n    }\n}\n"
        }
      }
    }
  }
}

In an IDE

No IDE host runs this example yet.