throws IOException
{
//System.err.println( "loadLispSource '"+name+"' --> "+f );
FileReader fr;
LispParser parser;
PushbackReader pbr;
LispValue codeFragment, result;
boolean verbose = classPrefs.getBoolean( KEY_VERBOSE, false );
fr = new FileReader( f ); // throws FileNotFoundException
try {
pbr = new PushbackReader( fr, 32 );
initJatha(); // XXX we should remove all user variables and functions
prefsHash.setf_gethash( jatha.makeString( "BASEDIRECTORY" ),
jatha.makeString( f.getParent() ));
//System.err.println( "initJatha() done." );
parser = jatha.PARSER; // XXX ? Jatha.getParser();
parser.setInputReader( pbr );
parser.setCaseSensitivity( LispParser.UPCASE );
try {
while( true ) {
//System.err.println( "reading a line from the file..." );
codeFragment = parser.read(); // consecutively parse all expressions in the file
//System.err.println( "evaluating..." );
result = jatha.eval( codeFragment );
if( verbose ) {
System.out.println( result );
}