What is meant by left factoring

Left factoring is a grammar transformation that is useful for producing a grammar suitable for predictive parsing. The basic idea is that when it is not clear which of two alternative productions to use to expand a non terminal A, we may be able to rewrite the A production to defer the decision until we have seen enough of the input to make the right choice.

 

Leave a Reply