Next: Error Recovery for Top-Down
Up: No Title
Previous: Left Factoring
- Definition: A simple BNF grammar is LL(1) if for all
if X appears on the left-hand side of two productions
X=E1. and X=E2. then
- first(E1) first(E2) = .
- either (neither E1 nor E2 is nullable)
or (exactly one, say E1 is nullable and
first(X) follow(E2) = .
- LL(1) stands for "left-to-right-parse, leftmost derivation,
1 symbol lookahead".
- Recursive descent parsers work only for LL(1) grammars.
- Elimination of left recursion and left-factoring
work often, but not always.