Hello fellow stack over flow members.
I'm studying for compiler class. I did understand Top-Down Parser should avoid left-recursion, and transform into right-recursion way.
Questions are,
a) am I understanding right Top-Down Parser is equal to LL and Bottom-Up Parser is equal to LR ?
b) I've found out left-recursion is Rule that calls itself ex) Expr :== Expr '+' Term | Term which can cause infinite loop to find Expr. But anyhow, any example code of consider input in C or Java? ( I don't want the parser or scanner code ) what I need is case code example with sentential form that occur infinite loop by left recursion.
c) What actually makes difference in a way using Right Recursion in Top-Down Parser?
ANS c) Eliminating the need to backtrack. but something else?
ANS b) x - 2 * y
but also something else? because this one works with backtrack way of parsing.
Case example that I have found out the both non-left recursion and left recursion.
Left Recursion Grammar
A -> Ax
Non-Left Recursion Grammar
A -> Bx
B -> Ay
Both are getting into infinite loop.
Thank you and appreciated for all your expert.