...
The stub file BoolSimp.dj
also includes comments showing you exactly what code you have to write to complete writing your simplifier. Of course, you also need to write corresponding tests and add them to the file BoolSimpTest.java
.
The file Parser.java
is provided to enable you to test your solution on large inputs stored in files. Parser.java
includes two Parser
constructors Parser(File file)
and Parser(String form)
for building parsers to parse the boolean expression (in external text form) in the specified File
or String
, respectively. Since the library class File
is defined in the package java.io
, you need to insert either import java.io.*;
or more specifically import java.io.File;} at the head of a test file that uses the {{Parser
class on the contents of a file.
To construct a Parser
for the formula in a file {{}} <fileName>
you must invoke
Code Block |
---|
new Parser(new File("<fileName>")); |
...