Parsing
◮ Parsing involves:
◮ determining if a string belongs to a language, and ◮ constructing structure of string if it belongs to language.
◮ Two approaches to constructing parsers:
- 1. Top down parsing: Our focus is on table-driven predictive
parsing. Perform a left most derivation of string.
- 2. Bottom up: SLR(1), Canonical LR(1), and LALR(1).
Perform a right-most derivation in reverse.
◮ Common theme: Finite state controller for stack automaton.
In top down parsing, the states were implicit. In LR parsing the states are all explicit.
1 / 18