InterviewSolution
Saved Bookmarks
| 1. |
The grammar whose productions are <stmt> → if id then <stmt> <stmt> → if id then <stmt> else <stmt> <stmt> → id := idis ambiguous becausea) the sentenceif a then if b then c:= d has two parse treesb) the left most and right most derivations of the sentenceif a then if b then c:= d give rise to different parse treesc) the sentenceif a then if b then c:= d else c:= f has more than two parse treesd) the sentenceif a then if b then c:= d else c:= f has two parse trees(A) a(B) b(C) c(D) d |
| Answer» | |