Context Free Grammars 1) Consider the following Grammar over alphabet: E= {a, +, x, (, )} E E+T|T T Tx F|F F (E)a a) Give derivations for the following strings: a, a+a, (a) b) Give parse trees for the...

Computer science questionContext Free Grammars<br>1) Consider the following Grammar over alphabet: E= {a, +, x, (, )}<br>E E+T|T<br>T Tx F|F<br>F (E)a<br>a) Give derivations for the following strings: a, a+a, (a)<br>b) Give parse trees for the following string:<br>a + a xa<br>2) Consider the grammar<br>S- as | aSbS |e<br>Show that the grammar is ambiguous by finding 2 different parse trees for the string<br>aab<br>

Extracted text: Context Free Grammars 1) Consider the following Grammar over alphabet: E= {a, +, x, (, )} E E+T|T T Tx F|F F (E)a a) Give derivations for the following strings: a, a+a, (a) b) Give parse trees for the following string: a + a xa 2) Consider the grammar S- as | aSbS |e Show that the grammar is ambiguous by finding 2 different parse trees for the string aab

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here