6.10.2 Top-Down

Ex.

Exercises for top-down parsing.

Exercise 6.4

Using the ourEng.pl grammar, give a detailed top-down depth-first analysis of Marsellus knew Vincent loved Mia. That is, start with:

and then show all the steps of your work, including the backtracking.

Exercise 6.5

Using the ourEng.pl grammar, give a detailed top-down breadth-first analysis of Marsellus knew Vincent loved Mia. That is, start with:

and then show all the steps of your work.

Exercise 6.6

Can topdown_recognizer.pl or topdown_parser.pl handle the following grammar (leftrec.pl )?

s ---> [left,right].
left ---> [left,x].
left ---> [x].
right ---> [right,y].
right ---> [y].
 
lex(a,x).
lex(b,y).

If you are not sure try it. Why does it not work? How can it be fixed?


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