How to create a grammar that would imitate all the strings from the from the set {(,)}*, and in which (lines) all the parantheses would hava a correct place?
I just do not know how to start, I am a bit newbie in grammars :/
How to create a grammar that would imitate all the strings from the from the set {(,)}*, and in which (lines) all the parantheses would hava a correct place?
I just do not know how to start, I am a bit newbie in grammars :/
Something like $$\begin{align}S&\to \epsilon\mid\texttt{(}S\texttt{)}S\end{align} $$ perhaps?