Write your own DCG parser
If you haven't done so already, do yesterday's "Write your own DCG" erxercise.
Then turn this DCG into a parser by adding an extra argument for constructing the parse tree, as we have done for the English grammar in the lecture.