Consider the words
w1 = "(",
w2 = "((",
...,
wn = "("n,
...
(w
n is n open braces). Then, using the notation of the
Myhill / Nerode theorem, S(w
n) is different for each n: it contains "
)"
n, but no other string of only close braces). Thus there are
infinitely many types for S(w), so by the
Myhill / Nerode Theorem the
balanced braces language is not a
regular language.