What is meant by left recursion

A grammar is left recursive if it has a nonterminal A such that there is a derivation A ==> A α for some string α . Top down parsing methods cannot handle left-recursion grammars, so a transformation that eliminates left recursion in needed.
Ex:-
E ->E +T | T
T ->T * F | F
F ->(E) | id

Leave a Reply