The construction of the parse tree relies on the following principles.
Remark 6
A left-recursive grammar can cause an infinite loop:
when we try to expand the nonterminal A
we may be led to expand A without having
consumed any input.
Fortunetely, any left-recursive grammar G
can be replaced by a grammar without left-recursion
and generating the same language as G.
However avoiding backtraking requires more
advanced techniques to be described in the
next section.