Automata Theory
I've given my answer to 3d. Is it correct? If not, please correct it. Thanks
3d)
E --> EE | LER | ε
L --> (
R --> )
EE is used to produce parenthesis side by side.
LER is used to produce recursive parenthesis.
symbol L is used to produce left parenthesis.
symbol R is used to produce right parenthesis.
ε - empty string.
Automata Theory I've given my answer to 3d. Is it correct? If not, please correct it. Thanks
Define Context-free grammar Matching syntactic entities (e.g., parentheses, brackets, or braces) is an important aspect of many programming languages. Define a context-free grammar in BNF capable of generating only balanced strings of (nested or flat) matched parentheses. The empty string is not in this language. For instance, the strings (), ()(), (()), (()())(), and ((()())()) are sentences in this language, while the strings )(, )(), )()(, (()(), ())((, and ((()()) are not. Note that not all strings with the same...