<< Prev | - Up - | Next >> |
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
ortopdown_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?
<< Prev | - Up - | Next >> |