S1->AB | aaB
A ->a |Aa
B ->b
and the production rules of a
grammar G2 as
S2->aS2|bS2| bS2|aS2|
λ
Which of the following is correct
statement ?
(A) G1 is ambiguous and G2 is not
ambiguous.
(B) G1 is ambiguous and G2 is
ambiguous.
(C) G1 is not ambiguous and G2 is
ambiguous.
(D) G1 is not ambiguous and G2 is
not ambiguous.
Answer B
No comments:
Post a Comment
Note: only a member of this blog may post a comment.