Question 45
S → Aa | b A → Ac | Sd | εConstruct an equivalent grammar with no left recursion and with minimum number of production rules.
Question 46
S1 → aS1b S1 → aBb S1 → aAb B → Bb A → aA B → b A → aWhat is L(G1)? b. Use the grammar in part(a) to give a CFG for L2 = {ai bj ak bl | i, j, k, l ≥ 1, i= j or k=l} by adding not more than 5 production rule. c. Is L2 inherently ambiguous?
Question 47
Program → begin d semi X end X → d semi X | s Y Y → semi s Y | ε
Question 48
Question 49
X :: = X ⊕ Y / Y Y :: = Z * Y / Z Z :: = idWhich of the following is true? a. \'⊕\' is left associative while \'*\' is right associative b. Both \'⊕\' and \'*\' are left associative c. \'⊕\' is right associative while \'*\' is left associative d. None of the above
Question 50
There are 85 questions to complete.