6 Parsing: Bottom-Up and Top-Down

This lecture has two parts. In the first part, we

  1. explain the basic idea underlying naive bottom-up parsing strategies for CFGs.

  2. give a simple Prolog implementation of a naive bottom-up parser.

  3. discuss the limits of this work, both implementational, and algorithmic.

In the second part, we

  1. introduce two naive top-down parsing/recognition algorithms, one depth-first, the other breadth-first.

  2. give the top-down depth-first recognition algorithm an efficient implementation in Prolog.

  3. extend this recognizer to a parser.

Bottom-up and top-down parsing are in a way the most basic parsing strategies on the market. The more elaborate algorithms we will see later in this course can all be seen as improved versions of one of them (or a combination of both). Therefore you should make sure that you really understand how the algorithms to be presented now work. Although we sometimes stress their naivite.



Kristina Striegnitz, Patrick Blackburn, Katrin Erk, Stephan Walter, Aljoscha Burchardt and Dimitra Tsovaltzi
Version 1.2.5 (20030212)