...
- a Scheme program in the file
boolsimp.ss
equivalent to the Java program that you are required to write; - a Java "stub" file
boolSimp.dj1
that defines a composite hierarchy of "abstract syntax" tree classes rooted in the classForm
representing boolean expresssionsexpressions; - a Java library file
Parser.java
contain a classParser
with- a
read()
method that reads a boolean expression represented in "Scheme form" and returns the corresponsing JavaForm
abstract syntax tree and - a (commented out)
simplify()
method that composes the visitors you must write inboolSimp.dj1
to simplify whatever formula theParser
instance contains.
- a
- a Java "stub" test file
boolSimpTest.java
that includes some rudimentary tests of the code in theboolSimp.dj1
stub file.
...
The file Parser.java
includes two Parser constructors parseParser(File file)
and parseParser(String form)
for building parsers to parse the boolean expression (in external text form) in the specified File
or String
, respectively. To construct a Parser
for the formula in a file {{}} you must invoke
...