Question: 2. This question is about syntactic analysis. (a) For a CFG (= context free grammar) G = (A, V, S, R), recall that a one-

2. This question is about syntactic analysis. (a) For a CFG (= context free grammar) G = (A, V, S, R), recall that a one- a step reduction si Sit1 is a transformation of a string si over alphabet characters and variables, in which a variable symbol X in siis replaced by a string s such that X + s is a reduction in R. i. Define parse trees, by answering the following questions: (10 marks] What is the root of the tree? How is the tree constructed? What property do the leaves in the tree have? How does the parse tree represent a string in lang(G)? ii. Briefly define an ambiguous grammar. [2 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
