left-recursion removal
If a habit always starts with 'do this thing first, then more of it', you can flip it to 'do it once, then optionally repeat' — same outcome, but now there is a clear first step instead of an infinite stall. Left-recursion removal flips a grammar this way: it rewrites a rule that recurses on the left into one that recurses on the right, so a top-down parser always makes progress.
For direct left recursion, group the rules for A into the left-recursive ones A -> A alpha1 | A alpha2 | ... and the others A -> beta1 | beta2 | .... Introduce a fresh helper variable A'. Replace them with A -> beta1 A' | beta2 A' | ... and A' -> alpha1 A' | alpha2 A' | ... | epsilon. The idea: A now starts with one of the non-recursive beta pieces and then A' tacks on any number of the alpha tails on the right. Indirect left recursion is handled by first ordering the variables and substituting earlier variables' rules into later ones until all indirect cases become direct, then applying the direct fix.
This transformation preserves the language exactly but, crucially, it CHANGES the parse trees: a left-leaning tree (good for left-associative operators) becomes a right-leaning one. That means any semantic action or associativity that depended on the original shape must be reattached, often by computing associativity explicitly in the parser rather than reading it off the tree. Left-recursion removal, together with left factoring, is what makes a grammar suitable for top-down LL or recursive-descent parsing, and it is also a sub-step of Greibach normal form conversion.
Remove direct left recursion from E -> E + T | T. Here alpha = +T, beta = T. Introduce E': E -> T E', E' -> + T E' | epsilon. Now E starts with T (real progress) and E' repeats '+T' to the right. The language is identical, but the tree now leans right.
Left recursion becomes right recursion via a helper variable A'; the language is preserved, the tree is reshaped.
Removing left recursion preserves the language but flips parse-tree shape from left-leaning to right-leaning, which can break left-associativity. You must reconstruct associativity in the parser's actions, not assume the tree still encodes it.