Next: LR(1) Parsing
Up: No Title
Previous: SLR Parsing
- Sometimes, in specific states not all terminals from
follow(X) can really occur.
- Idea: Propagate state-specific follow symbols.
- Reduce only if the symbol is in the state specific follow symbols.
- The resulting parser is called LALR(1) for Look-Ahead-LR.
- The number of states is the same as in LR(0) and SLR.
- This is, what JavaCUP uses (also yacc, bison).
- If an LALR(1) parser generator gives a conflict, then for all
practical purposes it cannot know, what to do in certain
situations.
Christoph Zenger
4/6/2000