Let G b the following CFG (Where S is the start symbol):
S→aB|aDc B→bBc|c D→bc|c
(a) Show that G is ambiguous.
(b) Show that G is not an LR(1) grammar.
(c) Modify G into an equivalent grammar G′ that is LR(1). Explain why G′ is an LR(1) grammar and why G and G′ are equivalent.
My current answers:
(a) I showed that there exists two left derivation trees for string abcc - therefore it is ambiguous.
(b) I simply stated that an LR(1) grammar is not ambiguous by definition, and since (a) shows it is ambigious it follows that G is not an LR(1) grammar.
I removed the nonterminal D, which makes it unambiguous.
Is there a more suiting answer for (b)?
How do I explain why G' is an LR(1) grammar in (c)?