[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Perform the weekly set up instructions for project 1, homework c.
Report (a) all the lisp functions you’ve written and (b) a file containing your deftest
s
and (c)
‘repl.txt’ coming from you
saving the REPL showing these all running.
Write code to find the list of left-hand-side symbols in the rules
(deftest !lefties () (test '(sentence noun-phrase verb-phrase ; you fill in the rest (lefties *grammar1*))))
Write code to find the list of right-hand-side symbols in the rules
(deftest !righties () (test '(Article Adj* Noun ; you fill in the rest (righties *grammar1*))))
Write a deftest
that reports the terminals of a grammar (terminals are righties that are not lefties).
Write a deftest
showing code that reports lefties that are never righties (this is an error: exception,
each grammar has one top-most start symbol. So we will say that the first lefty is the start symbol
and exempt from this check).
Note that, to test this code, you’ll have to invent a grammar that has these problems.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 19, 2011 using texi2html 5.0.