It is now possible to evaluate the program and print it to the output file. The factor chars still needs to be double instead of chars.