{
  "machine": "PDA",
  "sigma": [
    "(",
    ")",
    "[",
    "]",
    "{",
    "}"
  ],
  "stackAlpha": [
    "(",
    "[",
    "{"
  ],
  "states": [
    {
      "id": "s1",
      "x": 300,
      "y": 280,
      "name": "track"
    }
  ],
  "startId": "s1",
  "accepts": [],
  "transitions": [
    {
      "id": "t1",
      "from": "s1",
      "to": "s1",
      "symbol": "(",
      "pop": "ε",
      "push": "("
    },
    {
      "id": "t2",
      "from": "s1",
      "to": "s1",
      "symbol": "[",
      "pop": "ε",
      "push": "["
    },
    {
      "id": "t3",
      "from": "s1",
      "to": "s1",
      "symbol": "{",
      "pop": "ε",
      "push": "{"
    },
    {
      "id": "t4",
      "from": "s1",
      "to": "s1",
      "symbol": ")",
      "pop": "(",
      "push": "ε"
    },
    {
      "id": "t5",
      "from": "s1",
      "to": "s1",
      "symbol": "]",
      "pop": "[",
      "push": "ε"
    },
    {
      "id": "t6",
      "from": "s1",
      "to": "s1",
      "symbol": "}",
      "pop": "{",
      "push": "ε"
    }
  ],
  "notes": [
    {
      "id": "n1",
      "x": 480,
      "y": 130,
      "color": "blue",
      "anchorStates": [],
      "anchorTransitions": [],
      "text": "Your editor's bracket matcher, as one state and a stack. Every opener is pushed; every closer must match the top of the stack. Acceptance by empty stack: balanced ⇔ nothing left over."
    },
    {
      "id": "n2",
      "x": 480,
      "y": 300,
      "color": "green",
      "anchorStates": [],
      "anchorTransitions": [],
      "text": "Try ([)] — it fails exactly where regular expressions fail: interleaved nesting needs memory. Keep the Stack panel in view during playback; the stack is the whole story here."
    }
  ],
  "config": {
    "pdaParadigm": "empty"
  },
  "meta": {
    "title": "Bracket matcher ( ) [ ] { }",
    "blurb": "Balanced-bracket checking — what your editor does on every keystroke. One state; the stack does all the work. Accepts by empty stack.",
    "inputs": [
      {
        "w": "([]{})",
        "expect": "accept"
      },
      {
        "w": "{[()()]}",
        "expect": "accept"
      },
      {
        "w": "()",
        "expect": "accept"
      },
      {
        "w": "([)]",
        "expect": "reject",
        "label": "interleaved!"
      },
      {
        "w": "(((",
        "expect": "reject",
        "label": "left open"
      }
    ],
    "library": {
      "author": {
        "login": "thethinkmachine"
      },
      "license": "CC-BY-4.0",
      "tags": [
        "showcase",
        "dpda"
      ],
      "difficulty": "intermediate"
    }
  },
  "format": "automata-studio/workspace",
  "schema": 1,
  "app": "dev"
}
