Normalize return values of parse_program()
Add test for non-integers in input.
Move error formatting to main().