Removal of Left Recursion
Given:
Replace productions by:
,
where is given by:
Example:
becomes:
E -> T E' E' -> + T E' | e T -> F T' T' -> * F T' | e F -> ( E ) | id
Removal of left-recursion from precedence cascade grammar.
Left Factoring
Top-Down Parsing
LL(1) Grammars
FIRST & FOLLOW
Example Grammar
Recursive Descent
Recursive Descent Calculator: Fig4.1.c