To deal with this, I have
new English grammar link). This grammar contains examples of the constructions that you will need for Assignment 5's grammar, but that we haven't seen in other Prolog examples.
np(S/VP)Naturally a complete parse should not only find a sentence, but should exhaust the scanner. This is why, in the difference list grammar presented in class, the only way that the
parse(S,P)s(S/[],P)
The second hint deals with what you might try if you still can't get difference lists to work. My recommendation is that you don't start with the program predicate or the block predicate, but with the predicates corresponding to symbols on the right-hand side of the block rule. For example, even in an inefficient approach that doesn't use difference lists, you might be able to get a relatively quick successful answer to a query like
declarations(['declare', 'x', 'int', '3', ';',
'declare', 'y', 'real', '4', ';']).declaration(['declare', 'x', 'int', '3', ';']).
A third hint is that if you do try to proceed without using difference lists, you might try moving any append subgoals ahead of some of the other subgoals.
The new grading policy is simply that I will give generous partial credit if you can find partial parses of the sort mentioned in the second hint. And although I can't simply ignore anyone's grade on this assignment, I will be more forgiving that I might have been if your grade on this assignment is one of a few low scores.