Why the need for terminals? Is my solution sufficient enough?
I'm trying to get my head around context free grammars and I think I'm close. What is baffling me is this one question (I'm doing practise questions as I have an exam in a month's time): I've come up with this language but I believe it's wrong. S --> aSb | A | B A --> aA | Σ B --> bB | Σ Apparently this is the correct solution: S --> aSb | aA | bB A --> aA | Σ B --> bB | Σ What I don't quite understand is why we have S --> aSb | aA | bB and not just S --> aSb | A | B . What is the need for the terminals? Can't I just call A instead and grab my terminals that way? Testing to see if I can