...
- the boolean constants
true
andfalse
; - boolean variables (represented by symbols other than
true
,false
,not
,and
,or
,implies
, andif
) that can be bound to eithertrue
orfalse
. - the unary operator
not
. - the binary operators
and
,or
, andimplies
, and - the ternary operator
if
.
foo
The course staff is providing functionparse
andunparse
(in the file parser.ss that convert boolean expressions in Scheme notation to a simple inductively defined type calledboolExp
and vice-versa. The coding ofparse
andunparse
is not difficult, but it is tedious (like most parsing) so the course staff is providing this code rather than asking students to write it.
These parsing functions rely on the following Scheme data definitions:
...