Listing 1: The parser's original error handling function that terminates program execution


void parser::error(const string &why)
    {
    output << "error: " << why << '\n';
    exit(EXIT_FAILURE);
    }