{
  "name": "storybook",
  "word": "identifier",
  "rules": {
    "source_file": {
      "type": "REPEAT",
      "content": {
        "type": "SYMBOL",
        "name": "declaration"
      }
    },
    "line_comment": {
      "type": "TOKEN",
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "STRING",
            "value": "//"
          },
          {
            "type": "PATTERN",
            "value": ".*"
          }
        ]
      }
    },
    "block_comment": {
      "type": "TOKEN",
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "STRING",
            "value": "/*"
          },
          {
            "type": "PATTERN",
            "value": "[^*]*\\*+([^/*][^*]*\\*+)*"
          },
          {
            "type": "STRING",
            "value": "/"
          }
        ]
      }
    },
    "declaration": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "use_declaration"
        },
        {
          "type": "SYMBOL",
          "name": "character"
        },
        {
          "type": "SYMBOL",
          "name": "template"
        },
        {
          "type": "SYMBOL",
          "name": "life_arc"
        },
        {
          "type": "SYMBOL",
          "name": "schedule"
        },
        {
          "type": "SYMBOL",
          "name": "behavior"
        },
        {
          "type": "SYMBOL",
          "name": "institution"
        },
        {
          "type": "SYMBOL",
          "name": "relationship"
        },
        {
          "type": "SYMBOL",
          "name": "location"
        },
        {
          "type": "SYMBOL",
          "name": "species"
        },
        {
          "type": "SYMBOL",
          "name": "enum_declaration"
        },
        {
          "type": "SYMBOL",
          "name": "concept_declaration"
        },
        {
          "type": "SYMBOL",
          "name": "sub_concept"
        },
        {
          "type": "SYMBOL",
          "name": "concept_comparison"
        }
      ]
    },
    "use_declaration": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "use"
        },
        {
          "type": "SYMBOL",
          "name": "path_segments"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "CHOICE",
              "members": [
                {
                  "type": "SEQ",
                  "members": [
                    {
                      "type": "STRING",
                      "value": "::"
                    },
                    {
                      "type": "STRING",
                      "value": "{"
                    },
                    {
                      "type": "SEQ",
                      "members": [
                        {
                          "type": "SYMBOL",
                          "name": "identifier"
                        },
                        {
                          "type": "REPEAT",
                          "content": {
                            "type": "SEQ",
                            "members": [
                              {
                                "type": "STRING",
                                "value": ","
                              },
                              {
                                "type": "SYMBOL",
                                "name": "identifier"
                              }
                            ]
                          }
                        },
                        {
                          "type": "CHOICE",
                          "members": [
                            {
                              "type": "STRING",
                              "value": ","
                            },
                            {
                              "type": "BLANK"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "type": "STRING",
                      "value": "}"
                    }
                  ]
                },
                {
                  "type": "SEQ",
                  "members": [
                    {
                      "type": "STRING",
                      "value": "::"
                    },
                    {
                      "type": "STRING",
                      "value": "*"
                    }
                  ]
                }
              ]
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": ";"
        }
      ]
    },
    "path": {
      "type": "SYMBOL",
      "name": "path_segments"
    },
    "path_segments": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "TOKEN",
                "content": {
                  "type": "STRING",
                  "value": "::"
                }
              },
              {
                "type": "SYMBOL",
                "name": "identifier"
              }
            ]
          }
        }
      ]
    },
    "character": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "character"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SEQ",
              "members": [
                {
                  "type": "STRING",
                  "value": ":"
                },
                {
                  "type": "FIELD",
                  "name": "species",
                  "content": {
                    "type": "SYMBOL",
                    "name": "identifier"
                  }
                }
              ]
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "FIELD",
              "name": "template",
              "content": {
                "type": "SYMBOL",
                "name": "template_clause"
              }
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "FIELD",
          "name": "body",
          "content": {
            "type": "SYMBOL",
            "name": "block"
          }
        }
      ]
    },
    "template_clause": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "from"
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "identifier"
            },
            {
              "type": "REPEAT",
              "content": {
                "type": "SEQ",
                "members": [
                  {
                    "type": "STRING",
                    "value": ","
                  },
                  {
                    "type": "SYMBOL",
                    "name": "identifier"
                  }
                ]
              }
            },
            {
              "type": "CHOICE",
              "members": [
                {
                  "type": "STRING",
                  "value": ","
                },
                {
                  "type": "BLANK"
                }
              ]
            }
          ]
        }
      ]
    },
    "template": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "template"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SEQ",
              "members": [
                {
                  "type": "STRING",
                  "value": ":"
                },
                {
                  "type": "FIELD",
                  "name": "species",
                  "content": {
                    "type": "SYMBOL",
                    "name": "identifier"
                  }
                }
              ]
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "STRING",
              "value": "strict"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "include"
          }
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "include": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "include"
        },
        {
          "type": "SYMBOL",
          "name": "identifier"
        }
      ]
    },
    "field": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SEQ",
          "members": [
            {
              "type": "FIELD",
              "name": "name",
              "content": {
                "type": "SYMBOL",
                "name": "dotted_path"
              }
            },
            {
              "type": "STRING",
              "value": ":"
            },
            {
              "type": "FIELD",
              "name": "value",
              "content": {
                "type": "SYMBOL",
                "name": "value"
              }
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "prose_block"
        }
      ]
    },
    "dotted_path": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "."
              },
              {
                "type": "SYMBOL",
                "name": "identifier"
              }
            ]
          }
        }
      ]
    },
    "value": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "integer"
        },
        {
          "type": "SYMBOL",
          "name": "float"
        },
        {
          "type": "SYMBOL",
          "name": "string"
        },
        {
          "type": "SYMBOL",
          "name": "boolean"
        },
        {
          "type": "SYMBOL",
          "name": "range"
        },
        {
          "type": "SYMBOL",
          "name": "time"
        },
        {
          "type": "SYMBOL",
          "name": "duration"
        },
        {
          "type": "SYMBOL",
          "name": "path"
        },
        {
          "type": "SYMBOL",
          "name": "prose_block"
        },
        {
          "type": "SYMBOL",
          "name": "list"
        },
        {
          "type": "SYMBOL",
          "name": "object"
        },
        {
          "type": "SYMBOL",
          "name": "override"
        }
      ]
    },
    "integer": {
      "type": "PATTERN",
      "value": "-?[0-9]+"
    },
    "float": {
      "type": "PATTERN",
      "value": "-?[0-9]+\\.[0-9]+"
    },
    "string": {
      "type": "PATTERN",
      "value": "\"([^\"\\\\]|\\\\.)*\""
    },
    "boolean": {
      "type": "CHOICE",
      "members": [
        {
          "type": "STRING",
          "value": "true"
        },
        {
          "type": "STRING",
          "value": "false"
        }
      ]
    },
    "range": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "integer"
            },
            {
              "type": "STRING",
              "value": ".."
            },
            {
              "type": "SYMBOL",
              "name": "integer"
            }
          ]
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "float"
            },
            {
              "type": "STRING",
              "value": ".."
            },
            {
              "type": "SYMBOL",
              "name": "float"
            }
          ]
        }
      ]
    },
    "time": {
      "type": "PATTERN",
      "value": "[0-9]{2}:[0-9]{2}(:[0-9]{2})?"
    },
    "duration": {
      "type": "PATTERN",
      "value": "[0-9]+[dhms]([0-9]+[dhms])*"
    },
    "list": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "["
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SEQ",
              "members": [
                {
                  "type": "SYMBOL",
                  "name": "value"
                },
                {
                  "type": "REPEAT",
                  "content": {
                    "type": "SEQ",
                    "members": [
                      {
                        "type": "STRING",
                        "value": ","
                      },
                      {
                        "type": "SYMBOL",
                        "name": "value"
                      }
                    ]
                  }
                },
                {
                  "type": "CHOICE",
                  "members": [
                    {
                      "type": "STRING",
                      "value": ","
                    },
                    {
                      "type": "BLANK"
                    }
                  ]
                }
              ]
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "]"
        }
      ]
    },
    "object": {
      "type": "SYMBOL",
      "name": "block"
    },
    "block": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "override": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "@"
        },
        {
          "type": "SYMBOL",
          "name": "path"
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "override_op"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "override_op": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SEQ",
          "members": [
            {
              "type": "STRING",
              "value": "remove"
            },
            {
              "type": "SYMBOL",
              "name": "identifier"
            }
          ]
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "STRING",
              "value": "append"
            },
            {
              "type": "SYMBOL",
              "name": "field"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "field"
        }
      ]
    },
    "prose_block": {
      "type": "SEQ",
      "members": [
        {
          "type": "FIELD",
          "name": "marker",
          "content": {
            "type": "SYMBOL",
            "name": "prose_marker"
          }
        },
        {
          "type": "FIELD",
          "name": "tag",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "PATTERN",
              "value": "[^\\n]*"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "FIELD",
          "name": "content",
          "content": {
            "type": "SYMBOL",
            "name": "prose_content"
          }
        },
        {
          "type": "FIELD",
          "name": "end",
          "content": {
            "type": "SYMBOL",
            "name": "prose_marker"
          }
        }
      ]
    },
    "prose_marker": {
      "type": "STRING",
      "value": "---"
    },
    "prose_content": {
      "type": "TOKEN",
      "content": {
        "type": "PREC",
        "value": -1,
        "content": {
          "type": "REPEAT1",
          "content": {
            "type": "CHOICE",
            "members": [
              {
                "type": "PATTERN",
                "value": "[^\\-]+"
              },
              {
                "type": "PATTERN",
                "value": "-[^\\-]"
              },
              {
                "type": "PATTERN",
                "value": "-\\-[^\\-]"
              }
            ]
          }
        }
      }
    },
    "life_arc": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "life_arc"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "arc_state"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "arc_state": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "state"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "on_enter"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "transition"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "on_enter": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "on"
        },
        {
          "type": "STRING",
          "value": "enter"
        },
        {
          "type": "SYMBOL",
          "name": "block"
        }
      ]
    },
    "transition": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "on"
        },
        {
          "type": "FIELD",
          "name": "condition",
          "content": {
            "type": "SYMBOL",
            "name": "expression"
          }
        },
        {
          "type": "STRING",
          "value": "->"
        },
        {
          "type": "FIELD",
          "name": "target",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        }
      ]
    },
    "schedule": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "schedule"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "schedule_block"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "schedule_block": {
      "type": "SEQ",
      "members": [
        {
          "type": "FIELD",
          "name": "start",
          "content": {
            "type": "SYMBOL",
            "name": "time"
          }
        },
        {
          "type": "STRING",
          "value": "->"
        },
        {
          "type": "FIELD",
          "name": "end",
          "content": {
            "type": "SYMBOL",
            "name": "time"
          }
        },
        {
          "type": "STRING",
          "value": ":"
        },
        {
          "type": "FIELD",
          "name": "activity",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "SYMBOL",
          "name": "block"
        }
      ]
    },
    "behavior": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "behavior"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "FIELD",
          "name": "root",
          "content": {
            "type": "SYMBOL",
            "name": "behavior_node"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "behavior_node": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "selector_node"
        },
        {
          "type": "SYMBOL",
          "name": "sequence_node"
        },
        {
          "type": "SYMBOL",
          "name": "condition_node"
        },
        {
          "type": "SYMBOL",
          "name": "if_decorator_node"
        },
        {
          "type": "SYMBOL",
          "name": "decorator_node"
        },
        {
          "type": "SYMBOL",
          "name": "action_node"
        },
        {
          "type": "SYMBOL",
          "name": "subtree_node"
        }
      ]
    },
    "selector_node": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "choose"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "FIELD",
              "name": "label",
              "content": {
                "type": "SYMBOL",
                "name": "identifier"
              }
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT1",
          "content": {
            "type": "SYMBOL",
            "name": "behavior_node"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "sequence_node": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "then"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "FIELD",
              "name": "label",
              "content": {
                "type": "SYMBOL",
                "name": "identifier"
              }
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT1",
          "content": {
            "type": "SYMBOL",
            "name": "behavior_node"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "condition_node": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "STRING",
              "value": "if"
            },
            {
              "type": "STRING",
              "value": "when"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "("
        },
        {
          "type": "FIELD",
          "name": "condition",
          "content": {
            "type": "SYMBOL",
            "name": "expression"
          }
        },
        {
          "type": "STRING",
          "value": ")"
        }
      ]
    },
    "if_decorator_node": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "if"
        },
        {
          "type": "STRING",
          "value": "("
        },
        {
          "type": "FIELD",
          "name": "condition",
          "content": {
            "type": "SYMBOL",
            "name": "expression"
          }
        },
        {
          "type": "STRING",
          "value": ")"
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "FIELD",
          "name": "child",
          "content": {
            "type": "SYMBOL",
            "name": "behavior_node"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "decorator_node": {
      "type": "SEQ",
      "members": [
        {
          "type": "FIELD",
          "name": "decorator",
          "content": {
            "type": "SYMBOL",
            "name": "decorator_keyword"
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "FIELD",
              "name": "params",
              "content": {
                "type": "SYMBOL",
                "name": "decorator_params"
              }
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "FIELD",
          "name": "child",
          "content": {
            "type": "SYMBOL",
            "name": "behavior_node"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "decorator_keyword": {
      "type": "CHOICE",
      "members": [
        {
          "type": "STRING",
          "value": "repeat"
        },
        {
          "type": "STRING",
          "value": "invert"
        },
        {
          "type": "STRING",
          "value": "retry"
        },
        {
          "type": "STRING",
          "value": "timeout"
        },
        {
          "type": "STRING",
          "value": "cooldown"
        },
        {
          "type": "STRING",
          "value": "succeed_always"
        },
        {
          "type": "STRING",
          "value": "fail_always"
        }
      ]
    },
    "decorator_params": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "("
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SEQ",
              "members": [
                {
                  "type": "SYMBOL",
                  "name": "integer"
                },
                {
                  "type": "STRING",
                  "value": ".."
                },
                {
                  "type": "SYMBOL",
                  "name": "integer"
                }
              ]
            },
            {
              "type": "SYMBOL",
              "name": "integer"
            },
            {
              "type": "SYMBOL",
              "name": "duration"
            }
          ]
        },
        {
          "type": "STRING",
          "value": ")"
        }
      ]
    },
    "action_node": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "identifier"
            },
            {
              "type": "STRING",
              "value": "("
            },
            {
              "type": "CHOICE",
              "members": [
                {
                  "type": "SEQ",
                  "members": [
                    {
                      "type": "SYMBOL",
                      "name": "action_param"
                    },
                    {
                      "type": "REPEAT",
                      "content": {
                        "type": "SEQ",
                        "members": [
                          {
                            "type": "STRING",
                            "value": ","
                          },
                          {
                            "type": "SYMBOL",
                            "name": "action_param"
                          }
                        ]
                      }
                    },
                    {
                      "type": "CHOICE",
                      "members": [
                        {
                          "type": "STRING",
                          "value": ","
                        },
                        {
                          "type": "BLANK"
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "BLANK"
                }
              ]
            },
            {
              "type": "STRING",
              "value": ")"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "identifier"
        }
      ]
    },
    "action_param": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "dotted_path"
            },
            {
              "type": "STRING",
              "value": ":"
            },
            {
              "type": "SYMBOL",
              "name": "value"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "value"
        }
      ]
    },
    "subtree_node": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "include"
        },
        {
          "type": "SYMBOL",
          "name": "path"
        }
      ]
    },
    "institution": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "institution"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "SYMBOL",
          "name": "block"
        }
      ]
    },
    "relationship": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "relationship"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT1",
          "content": {
            "type": "SYMBOL",
            "name": "participant"
          }
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "participant": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "path"
            },
            {
              "type": "STRING",
              "value": "as"
            },
            {
              "type": "SYMBOL",
              "name": "identifier"
            },
            {
              "type": "SYMBOL",
              "name": "block"
            }
          ]
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "path"
            },
            {
              "type": "SYMBOL",
              "name": "block"
            }
          ]
        }
      ]
    },
    "location": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "location"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "SYMBOL",
          "name": "block"
        }
      ]
    },
    "species": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "species"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "include"
          }
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "field"
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "enum_declaration": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "enum"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "identifier"
            },
            {
              "type": "REPEAT",
              "content": {
                "type": "SEQ",
                "members": [
                  {
                    "type": "STRING",
                    "value": ","
                  },
                  {
                    "type": "SYMBOL",
                    "name": "identifier"
                  }
                ]
              }
            },
            {
              "type": "CHOICE",
              "members": [
                {
                  "type": "STRING",
                  "value": ","
                },
                {
                  "type": "BLANK"
                }
              ]
            }
          ]
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "concept_declaration": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "concept"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": ";"
        }
      ]
    },
    "sub_concept": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "sub_concept"
        },
        {
          "type": "FIELD",
          "name": "parent",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "."
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "FIELD",
          "name": "body",
          "content": {
            "type": "CHOICE",
            "members": [
              {
                "type": "SYMBOL",
                "name": "sub_concept_record_body"
              },
              {
                "type": "SYMBOL",
                "name": "sub_concept_enum_body"
              }
            ]
          }
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "sub_concept_enum_body": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": ","
              },
              {
                "type": "SYMBOL",
                "name": "identifier"
              }
            ]
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "STRING",
              "value": ","
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "sub_concept_record_body": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "sub_concept_field"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": ","
              },
              {
                "type": "SYMBOL",
                "name": "sub_concept_field"
              }
            ]
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "STRING",
              "value": ","
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "sub_concept_field": {
      "type": "SEQ",
      "members": [
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": ":"
        },
        {
          "type": "FIELD",
          "name": "type",
          "content": {
            "type": "CHOICE",
            "members": [
              {
                "type": "SYMBOL",
                "name": "identifier"
              },
              {
                "type": "SYMBOL",
                "name": "any_type"
              }
            ]
          }
        }
      ]
    },
    "any_type": {
      "type": "STRING",
      "value": "any"
    },
    "concept_comparison": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "concept_comparison"
        },
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "variant_pattern"
            },
            {
              "type": "REPEAT",
              "content": {
                "type": "SEQ",
                "members": [
                  {
                    "type": "STRING",
                    "value": ","
                  },
                  {
                    "type": "SYMBOL",
                    "name": "variant_pattern"
                  }
                ]
              }
            },
            {
              "type": "CHOICE",
              "members": [
                {
                  "type": "STRING",
                  "value": ","
                },
                {
                  "type": "BLANK"
                }
              ]
            }
          ]
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "variant_pattern": {
      "type": "SEQ",
      "members": [
        {
          "type": "FIELD",
          "name": "name",
          "content": {
            "type": "SYMBOL",
            "name": "identifier"
          }
        },
        {
          "type": "STRING",
          "value": ":"
        },
        {
          "type": "STRING",
          "value": "{"
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "field_condition"
            },
            {
              "type": "REPEAT",
              "content": {
                "type": "SEQ",
                "members": [
                  {
                    "type": "STRING",
                    "value": ","
                  },
                  {
                    "type": "SYMBOL",
                    "name": "field_condition"
                  }
                ]
              }
            },
            {
              "type": "CHOICE",
              "members": [
                {
                  "type": "STRING",
                  "value": ","
                },
                {
                  "type": "BLANK"
                }
              ]
            }
          ]
        },
        {
          "type": "STRING",
          "value": "}"
        }
      ]
    },
    "field_condition": {
      "type": "SEQ",
      "members": [
        {
          "type": "FIELD",
          "name": "sub_concept",
          "content": {
            "type": "SYMBOL",
            "name": "dotted_path"
          }
        },
        {
          "type": "STRING",
          "value": ":"
        },
        {
          "type": "FIELD",
          "name": "condition",
          "content": {
            "type": "SYMBOL",
            "name": "condition_expr"
          }
        }
      ]
    },
    "condition_expr": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "any_type"
        },
        {
          "type": "SYMBOL",
          "name": "is_condition"
        }
      ]
    },
    "is_condition": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "dotted_path"
        },
        {
          "type": "STRING",
          "value": "is"
        },
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "or"
              },
              {
                "type": "SYMBOL",
                "name": "dotted_path"
              },
              {
                "type": "STRING",
                "value": "is"
              },
              {
                "type": "SYMBOL",
                "name": "identifier"
              }
            ]
          }
        }
      ]
    },
    "expression": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "or_expression"
        },
        {
          "type": "SYMBOL",
          "name": "and_expression"
        },
        {
          "type": "SYMBOL",
          "name": "not_expression"
        },
        {
          "type": "SYMBOL",
          "name": "comparison"
        },
        {
          "type": "SYMBOL",
          "name": "field_access"
        },
        {
          "type": "SYMBOL",
          "name": "primary_expression"
        }
      ]
    },
    "or_expression": {
      "type": "PREC_LEFT",
      "value": 1,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "expression"
          },
          {
            "type": "STRING",
            "value": "or"
          },
          {
            "type": "SYMBOL",
            "name": "expression"
          }
        ]
      }
    },
    "and_expression": {
      "type": "PREC_LEFT",
      "value": 2,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "expression"
          },
          {
            "type": "STRING",
            "value": "and"
          },
          {
            "type": "SYMBOL",
            "name": "expression"
          }
        ]
      }
    },
    "not_expression": {
      "type": "PREC",
      "value": 3,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "STRING",
            "value": "not"
          },
          {
            "type": "SYMBOL",
            "name": "expression"
          }
        ]
      }
    },
    "comparison": {
      "type": "PREC_LEFT",
      "value": 4,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "expression"
          },
          {
            "type": "FIELD",
            "name": "operator",
            "content": {
              "type": "CHOICE",
              "members": [
                {
                  "type": "STRING",
                  "value": "is"
                },
                {
                  "type": "STRING",
                  "value": ">"
                },
                {
                  "type": "STRING",
                  "value": ">="
                },
                {
                  "type": "STRING",
                  "value": "<"
                },
                {
                  "type": "STRING",
                  "value": "<="
                }
              ]
            }
          },
          {
            "type": "SYMBOL",
            "name": "expression"
          }
        ]
      }
    },
    "field_access": {
      "type": "PREC_LEFT",
      "value": 5,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "expression"
          },
          {
            "type": "STRING",
            "value": "."
          },
          {
            "type": "SYMBOL",
            "name": "identifier"
          }
        ]
      }
    },
    "primary_expression": {
      "type": "CHOICE",
      "members": [
        {
          "type": "STRING",
          "value": "self"
        },
        {
          "type": "STRING",
          "value": "other"
        },
        {
          "type": "SYMBOL",
          "name": "integer"
        },
        {
          "type": "SYMBOL",
          "name": "float"
        },
        {
          "type": "SYMBOL",
          "name": "string"
        },
        {
          "type": "SYMBOL",
          "name": "boolean"
        },
        {
          "type": "SYMBOL",
          "name": "path"
        }
      ]
    },
    "identifier": {
      "type": "PATTERN",
      "value": "[a-zA-Z_][a-zA-Z0-9_]*"
    }
  },
  "extras": [
    {
      "type": "PATTERN",
      "value": "\\s"
    },
    {
      "type": "SYMBOL",
      "name": "line_comment"
    },
    {
      "type": "SYMBOL",
      "name": "block_comment"
    }
  ],
  "conflicts": [
    [
      "path_segments"
    ],
    [
      "sub_concept_enum_body",
      "sub_concept_record_body"
    ]
  ],
  "precedences": [],
  "externals": [],
  "inline": [],
  "supertypes": []
}

