Context Free Grammar (CFG) is given as follows:
S → ABA
A → aA | ε
B → bBc | ε
First check above CFG contains ε-productions, unit productions and useless symbols
or not. If yes, then eliminate such productions.
Step 1) Eliminate ε-productions
Step 2) Eliminate unit productions
Step 3) Eliminate useless symbols
Step 4) After eliminating ε-productions, unit productions and useless symbols from
the above grammar, convert it into Chomsky Normal Form (CNF).