a) Considering a grammar of this type:
S --> ABA | ABB | BB
A --> aB | BB
B --> bB
a.1) Can I define a single variable C --> a and substitute it in both productions, or do I need to define two variables C --> a and D --> a for the two different productions?
If I already have a variable C --> a in the grammar, can I use that?
a.2) In the breakdown of the production S --> ABA, I create a variable K --> AB. Can I use K in the production S --> ABB, making it S --> KB, or do I need to use another variable, for example, L --> BB?