...
Question 10140 – Theory-of-Computation
December 6, 2023
Question 10154 – Theory-of-Computation
December 6, 2023
Question 10140 – Theory-of-Computation
December 6, 2023
Question 10154 – Theory-of-Computation
December 6, 2023

Question 10141 – Theory-of-Computation

The grammar whose productions are

  → if id then 
  → if id then   else 
  → id := id 

is ambiguous because

Correct Answer: D

Question 16 Explanation: 
We have to generate
“if a then if b then c:=d else c:=f”.
Parse tree 1:

Parse tree 2:
A
the sentence
if a then if b then c:=d
B
the left most and right most derivations of the sentence
if a then if b then c:=d
give rise top different parse trees
C
the sentence
if a then if b then c:=d else c:=f
has more than two parse trees
D
the sentence
if a then if then c:=d else c:=f
has two parse trees
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!