An accepted string:
((this dog saw the cat) (s)) ((this dog saw the cat) (np vp)) ((this dog saw the cat) (det n vp)) ((this dog saw the cat) (this n vp)) ((dog saw the cat) (n vp)) ((dog saw the cat) (dog vp)) ((saw the cat) (vp)) ((saw the cat) (v np)) ((saw the cat) (saw np)) ((the cat) (np)) ((the cat) (det n)) ((the cat) (this n)) ((the cat) (the n)) ((cat) (n)) ((cat) (dog)) ((cat) (cat)) (() ()) #t
A rejected string:
(this dog saw the rat) (s)) ((this dog saw the rat) (np vp)) ((this dog saw the rat) (det n vp)) ((this dog saw the rat) (this n vp)) ((dog saw the rat) (n vp)) ((dog saw the rat) (dog vp)) ((saw the rat) (vp)) ((saw the rat) (v np)) ((saw the rat) (saw np)) ((the rat) (np)) ((the rat) (det n)) ((the rat) (this n)) ((the rat) (the n)) ((rat) (n)) ((rat) (dog)) ((rat) (cat)) ((the rat) (n)) ((the rat) (dog)) ((the rat) (cat)) ((saw the rat) (met np)) ((saw the rat) (v)) ((saw the rat) (saw)) ((the rat) ()) ((saw the rat) (met)) ((dog saw the rat) (cat vp)) ((this dog saw the rat) (the n vp)) ((this dog saw the rat) (n vp)) ((this dog saw the rat) (dog vp)) ((this dog saw the rat) (cat vp)) #f