#define XERR
#include "scenario.ih"

void Scenario::setDeath()
{
    bool ok = true;

    string cumDeath;
    if (cumDeath = Options::instance().cumDeathFile(); not cumDeath.empty())
        readCumDeath(cumDeath);
    else
    {
        d_base.back() = "death:";

        Parser::Lines lines = Parser::any(d_base);

        if (lines.size() == 1)
            readCumDeath(cumDeath = lines.get()->tail);
        else
        {
            cumDeath = "analysis specification";
            lines.get();                        // skip the first (empty) line
            while (LineInfo const *ptr = lines.get())
                ok = appendCumDeath(ptr->tail) and ok;
        }
    }

    if (ok)
        checkCumDeath(cumDeath);
}





