DFA · Regular
Parentheses nested at most three deep
Balanced parentheses need a stack in general. With the depth capped at three, the depth itself is the state: a bounded counter is a finite automaton.
The author’s examples, run
ε → accept(()) → accept(()()) → accept((()()())) → accept( → reject)()) → reject)()()) → reject)(()()())) → reject