{
  "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
  "name": "dot",
  "word": "identifier",
  "rules": {
    "source_file": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "ALIAS",
              "content": {
                "type": "PATTERN",
                "value": "[sS][tT][rR][iI][cC][tT]"
              },
              "named": false,
              "value": "strict"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "ALIAS",
              "content": {
                "type": "PATTERN",
                "value": "[gG][rR][aA][pP][hH]"
              },
              "named": false,
              "value": "graph"
            },
            {
              "type": "ALIAS",
              "content": {
                "type": "PATTERN",
                "value": "[dD][iI][gG][rR][aA][pP][hH]"
              },
              "named": false,
              "value": "digraph"
            }
          ]
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "FIELD",
              "name": "id",
              "content": {
                "type": "SYMBOL",
                "name": "id"
              }
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "FIELD",
          "name": "block",
          "content": {
            "type": "SYMBOL",
            "name": "block"
          }
        }
      ]
    },
    "block": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "stmt_list"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "stmt_list": {
      "type": "REPEAT1",
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "_stmt"
          },
          {
            "type": "CHOICE",
            "members": [
              {
                "type": "STRING",
                "value": ";"
              },
              {
                "type": "BLANK"
              }
            ]
          }
        ]
      }
    },
    "_stmt": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "subgraph"
        },
        {
          "type": "SYMBOL",
          "name": "node_stmt"
        },
        {
          "type": "SYMBOL",
          "name": "edge_stmt"
        },
        {
          "type": "SYMBOL",
          "name": "attr_stmt"
        },
        {
          "type": "SYMBOL",
          "name": "attribute"
        }
      ]
    },
    "subgraph": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SEQ",
              "members": [
                {
                  "type": "ALIAS",
                  "content": {
                    "type": "PATTERN",
                    "value": "[sS][uU][bB][gG][rR][aA][pP][hH]"
                  },
                  "named": false,
                  "value": "subgraph"
                },
                {
                  "type": "CHOICE",
                  "members": [
                    {
                      "type": "FIELD",
                      "name": "id",
                      "content": {
                        "type": "SYMBOL",
                        "name": "id"
                      }
                    },
                    {
                      "type": "BLANK"
                    }
                  ]
                }
              ]
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "FIELD",
          "name": "block",
          "content": {
            "type": "SYMBOL",
            "name": "block"
          }
        }
      ]
    },
    "node_stmt": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "node_id"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "attr_list"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "edge_stmt": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "node_id"
            },
            {
              "type": "SYMBOL",
              "name": "subgraph"
            }
          ]
        },
        {
          "type": "REPEAT1",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "edgeop"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "SYMBOL",
                    "name": "node_id"
                  },
                  {
                    "type": "SYMBOL",
                    "name": "subgraph"
                  }
                ]
              }
            ]
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "attr_list"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "attr_stmt": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "ALIAS",
              "content": {
                "type": "PATTERN",
                "value": "[gG][rR][aA][pP][hH]"
              },
              "named": false,
              "value": "graph"
            },
            {
              "type": "ALIAS",
              "content": {
                "type": "PATTERN",
                "value": "[nN][oO][dD][eE]"
              },
              "named": false,
              "value": "node"
            },
            {
              "type": "ALIAS",
              "content": {
                "type": "PATTERN",
                "value": "[eE][dD][gG][eE]"
              },
              "named": false,
              "value": "edge"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "attr_list"
        }
      ]
    },
    "node_id": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "id"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "port"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "port": {
      "type": "SEQ",
      "members": [
        {
          "type": "ALIAS",
          "content": {
            "type": "STRING",
            "value": ":"
          },
          "named": true,
          "value": "operator"
        },
        {
          "type": "SYMBOL",
          "name": "id"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SEQ",
              "members": [
                {
                  "type": "ALIAS",
                  "content": {
                    "type": "STRING",
                    "value": ":"
                  },
                  "named": true,
                  "value": "operator"
                },
                {
                  "type": "SYMBOL",
                  "name": "id"
                }
              ]
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "attr_list": {
      "type": "REPEAT1",
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "STRING",
            "value": "["
          },
          {
            "type": "CHOICE",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_a_list"
              },
              {
                "type": "BLANK"
              }
            ]
          },
          {
            "type": "STRING",
            "value": "]"
          }
        ]
      }
    },
    "_a_list": {
      "type": "REPEAT1",
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "attribute"
          },
          {
            "type": "CHOICE",
            "members": [
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": ";"
                  },
                  {
                    "type": "STRING",
                    "value": ","
                  }
                ]
              },
              {
                "type": "BLANK"
              }
            ]
          }
        ]
      }
    },
    "attribute": {
      "type": "SEQ",
      "members": [
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "id"
          }
        },
        {
          "type": "ALIAS",
          "content": {
            "type": "STRING",
            "value": "="
          },
          "named": true,
          "value": "operator"
        },
        {
          "type": "FIELD",
          "name": "value",
          "content": {
            "type": "SYMBOL",
            "name": "id"
          }
        }
      ]
    },
    "id": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "SYMBOL",
          "name": "number_literal"
        },
        {
          "type": "SYMBOL",
          "name": "html_string"
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "string_literal"
            },
            {
              "type": "REPEAT",
              "content": {
                "type": "SEQ",
                "members": [
                  {
                    "type": "ALIAS",
                    "content": {
                      "type": "STRING",
                      "value": "+"
                    },
                    "named": true,
                    "value": "operator"
                  },
                  {
                    "type": "SYMBOL",
                    "name": "string_literal"
                  }
                ]
              }
            }
          ]
        }
      ]
    },
    "identifier": {
      "type": "PATTERN",
      "value": "[_\\p{XID_Start}][_\\p{XID_Continue}]*"
    },
    "number_literal": {
      "type": "PATTERN",
      "value": "-?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)"
    },
    "string_literal": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "\""
        },
        {
          "type": "PATTERN",
          "value": "([^\"\\\\]+|\\\\.)*\""
        }
      ]
    },
    "html_string": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "<"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "ALIAS",
              "content": {
                "type": "SYMBOL",
                "name": "_html_internal"
              },
              "named": true,
              "value": "html_internal"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": ">"
        }
      ]
    },
    "_html_internal": {
      "type": "REPEAT1",
      "content": {
        "type": "CHOICE",
        "members": [
          {
            "type": "PATTERN",
            "value": "[^<>]+"
          },
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "<"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "SYMBOL",
                    "name": "_html_internal"
                  },
                  {
                    "type": "BLANK"
                  }
                ]
              },
              {
                "type": "STRING",
                "value": ">"
              }
            ]
          }
        ]
      }
    },
    "edgeop": {
      "type": "CHOICE",
      "members": [
        {
          "type": "STRING",
          "value": "->"
        },
        {
          "type": "STRING",
          "value": "--"
        }
      ]
    },
    "comment": {
      "type": "TOKEN",
      "content": {
        "type": "CHOICE",
        "members": [
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "//"
              },
              {
                "type": "PATTERN",
                "value": ".*"
              }
            ]
          },
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "/*"
              },
              {
                "type": "PATTERN",
                "value": "[^*]*\\*+([^/*][^*]*\\*+)*"
              },
              {
                "type": "STRING",
                "value": "/"
              }
            ]
          }
        ]
      }
    },
    "preproc": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "#"
        },
        {
          "type": "PATTERN",
          "value": ".*"
        }
      ]
    }
  },
  "extras": [
    {
      "type": "PATTERN",
      "value": "\\s|\\r?\\n"
    },
    {
      "type": "SYMBOL",
      "name": "comment"
    },
    {
      "type": "SYMBOL",
      "name": "preproc"
    }
  ],
  "conflicts": [],
  "precedences": [],
  "externals": [],
  "inline": [],
  "supertypes": [],
  "reserved": {}
}