# Is it possible to eliminate the unit rules in this?

S -> aA | bC | CC | a | b | C
A -> B
B -> S
C -> A | S


It looks like its going to loop so it would be endless replacing the unit rule....

• We prefer that you do research to try to answer your own question, before asking. Doing a websearch on "context-free grammar eliminate unit rules" turns up resources that describe how to eliminate unit rules, including en.wikipedia.org/wiki/…. If your question is answered in standard resources (e.g., Wikipedia) and can be found through websearch, you probably haven't done enough research before asking here -- there's little point in us repeating information that's already readily available in standard sources.
– D.W.
Dec 13 '16 at 23:18