Currently, the evaluator simply prints the final result of the program.
eg. "// Amb-Eval value:" 3
With this PR, the final result is kept track of in a global variable (final_result) thereby allowing it to be accessible after running parse_and_run. The final result is also returned upon invoking parse_and_run and try_again. These simplify the writing of test programs.
Currently, the evaluator simply prints the final result of the program.
eg.
"// Amb-Eval value:" 3
With this PR, the final result is kept track of in a global variable (
final_result
) thereby allowing it to be accessible after runningparse_and_run
. The final result is also returned upon invokingparse_and_run
andtry_again
. These simplify the writing of test programs.