Question: Consider the two context - free grammars: G 1 : num - > 1 1 | 1 0 0 1 | 1 0 1 0
Consider the two contextfree grammars:
G: num num num num
G: num num num num num
num num num e
A Prove that all strings generated by the two grammars G and
G form unsigned binary numbers that are multiples of and
examine whether these grammars produce all strings of nonzeros
of multiples of starting with
B Prove that the two grammars G and G are ambiguous and transform them into equivalent nonambiguous grammars.
C Consider whether the two can be converted into equivalent LL grammars by eliminating the features
that make them nonLL and then checking for collisions
FIRSTFIRST and FIRSTFOLLOW
D For either of the two final grammars in the previous question is not LL
see if by looking at a second input symbol you can resolve its conflicts so that the grammar is LL
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
