Difference between Left Factoring and Left Recursion
Left factoring is removing the common left factor that appears in two productions of the same non-terminal. It is done to avoid back-tracing by the parser. Suppose the parser has a look-ahead, consider this example: A -> qB | qC where A, B and C are non-terminals and q is a sentence. In this case, … Read more