1,068 views
0 votes
0 votes
S-> SS | Aa

A->Sb | a

(a) prove that the grammar is ambiguous.

(b) find the follow for the grammar

(c) then remove the left recursion from the grammar.

1 Answer

0 votes
0 votes
(c) then remove the left recursion from the grammar.

After removing the left recursion the grammar is as below :-

S→ aaX

X→ SX / baX / epsilon

Related questions

0 votes
0 votes
3 answers
1
jayanth asked Jun 16, 2022
3,288 views
Compute the FIRST and FOLLOW for the postfix grammar after removing the left recursion:$ S → S S+/ S S* /a$
2 votes
2 votes
3 answers
2
4 votes
4 votes
1 answer
4