createcompiler.bash &> /dev/null
rm -f TestPrograms/*/{interp.out,program.err,program.print,sim.err,sim.out,usercode.user.s}
rm -f StudentPrograms/*/{interp.out,program.err,program.print,sim.err,sim.out,usercode.user.s}

runCheck.bash TestPrograms/a1.index.checkType &> /dev/null
runBoth.bash TestPrograms/a2.index.int &> /dev/null
runBoth.bash TestPrograms/a3.index.char &> /dev/null
runCheck.bash TestPrograms/b1.ptr.checkType &> /dev/null
runBoth.bash TestPrograms/b2.char &> /dev/null
runBoth.bash TestPrograms/b3.int &> /dev/null
runBoth.bash TestPrograms/b4.ptr.char &> /dev/null
runBoth.bash TestPrograms/b5.ptr.int &> /dev/null
runCheck.bash TestPrograms/c1.member.checkType &> /dev/null
runBoth.bash TestPrograms/c2.member.invoke &> /dev/null
runBoth.bash TestPrograms/d1.class.init &> /dev/null
runBoth.bash TestPrograms/d2.array.init &> /dev/null
runBoth.bash TestPrograms/d3.array.class.init &> /dev/null

runSim.bash TestPrograms/a2.index.int &> /dev/null
runSim.bash TestPrograms/a3.index.char &> /dev/null
runSim.bash TestPrograms/b2.char &> /dev/null
runSim.bash TestPrograms/b3.int &> /dev/null
runSim.bash TestPrograms/b4.ptr.char &> /dev/null
runSim.bash TestPrograms/b5.ptr.int &> /dev/null
runSim.bash TestPrograms/c2.member.invoke &> /dev/null
runSim.bash TestPrograms/d1.class.init &> /dev/null
runSim.bash TestPrograms/d2.array.init &> /dev/null
runSim.bash TestPrograms/d3.array.class.init &> /dev/null

runallBoth.bash StudentPrograms
runallSim.bash StudentPrograms

rm -f Summary.txt
append.bash jflex.error
append.bash parser.cup.error
append.bash javac.error
for DIR in TestPrograms/* StudentPrograms/*
do
	if [ -e "$DIR" ]
	then
		catProgramResult.bash "$DIR"
	fi
done
