2.7 Using the following grammar

ExprExpr + Term | Expr * Term|Term

Term0 |… | 9 | (Expr)

Draw a parse tree for each of the following:

(a) 5 + 4 * 3

(b) 5 * 4 + 3

2.8 Using the following grammar:

ExprExpr + Term | Term

Term Term + Factor |Factor

Factor 0 | … | 9 | (Expr)

Draw a parse tree for each of the following:

(a) 5 + 4 * 3

(b) 5 * 4 + 3

2.11 Argue convincingly that the parse tree given in Figure 2.2 for the expression 5 – 4 + 3 is the only possible parse tree. Hint: Enumerate the other possibilities and show that they do not work.

#### Top Answer

Dear Student, I think Production rule in question 2 is wrong. It must be either Expr -->... View the full answer