Write a
non-ambiguous CFG generating the language
of the well-parenthesized words over
{(,)}.
For example,
()(()) and
(((()()))) are well-parenthesized
words, whereas
)( and
(() are not.
One way to define more precisely this language is to describe it
as the set of words that can be reduced to the empty word by
successive applications of the rewrite rule
()→λ.