1. What is a derivation? Illustrate with an example, the leftmost derivation and rightmost derivation 2. What is a parse tree? Show the generated parse tree for an input ‘m = n + p –q;’ while checking...


1. What is a derivation? Illustrate with an example, the leftmost derivation and rightmost derivation


2. What is a parse tree? Show the generated parse tree for an input ‘m = n + p –q;’ while checking for conformance with the grammar given in Q. 3.4. From the parse tree, identify each of the replacement of the productions in the derivation.


3. Give an example of an ambiguous grammar. What are the techniques to disambiguate grammars?



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here