Library

DPDA · Deterministic context-free

Bracket matcher ( ) [ ] { }

Balanced-bracket checking — what your editor does on every keystroke. One state; the stack does all the work. Accepts by empty stack.

track
The machine as drawn — 1 state, 6 transitions.

The author’s examples, run

([]{}) → accept{[()()]} → accept() → accept([)] → reject((( → reject