{
  "repo": "pingcap/sqlgram",
  "binary": "sg",
  "binary_path": "tools/sg/sg.go",
  "dependencies": {
    "CLI sg bnf": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "When reading parser.y input and writing generated BNF files"
          ],
          "operations": [
            {
              "operation": "READ / WRITE FILES",
              "trigger": "Load parser grammar input and emit generated .bnf output files",
              "conditions": [
                "The bnf subcommand is executed"
              ],
              "implementation": "runBnf uses preprocess, extract.GenerateBNF, and write helpers"
            }
          ]
        },
        "http": {
          "conditions": [
            "Only when --addr or --spec points to remote HTTP resources"
          ],
          "operations": [
            {
              "operation": "HTTP GET",
              "trigger": "Fetch parser.y or spec.json from a remote URL",
              "conditions": [
                "The input address is an HTTP endpoint"
              ],
              "implementation": "preprocess and loadSpec read remote inputs through net/http"
            }
          ]
        }
      },
      "services": []
    },
    "CLI sg svg": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "Always, because the command reads .bnf files and writes SVG outputs"
          ],
          "operations": [
            {
              "operation": "READ / WRITE FILES",
              "trigger": "Traverse generated BNF files and emit SVG or HTML snippet artifacts",
              "conditions": [
                "The svg subcommand is executed"
              ],
              "implementation": "runSVG scans *.bnf files and writes diagram outputs"
            }
          ]
        }
      },
      "services": []
    }
  }
}
