Paull's Algorithm (Eliminating the Left Recursion
no vote
Assign an ordering A1;:::;An to the nonterminals of the grammar.
for i := 1 to n do begin for j := 1 to i 1 do begin for each production of the form Ai ! Aj do begin remove Ai ! Aj from the grammar for each production of the form Aj ! do begin add Ai ! to the grammar end end end transform the Ai-productions to eliminate direct left recursion end