Commit 5a1dbb82 authored by Florent Jacquemard's avatar Florent Jacquemard
Browse files

debug new Run classes

parent e31a4cff
......@@ -64,7 +64,9 @@ _state(k._state)
KeyS::~KeyS()
{ }
{
TRACE("delete KeyS");
}
KeyS& KeyS::operator= (const KeyS& k)
......
......@@ -189,6 +189,7 @@ _interval(k._interval)
KeySI::~KeySI()
{
TRACE("delete KeySI");
// interval tree is deleted with the Parsing Env.
}
......
......@@ -182,7 +182,9 @@ _post(post)
KeySIP::~KeySIP()
{ }
{
TRACE("delete KeySIP");
}
KeySIP& KeySIP::operator= (const KeySIP& p)
......
......@@ -134,6 +134,12 @@ _pre(head._pre)
}
KeySIR::~KeySIR()
{
TRACE("delete KeySIR");
}
size_t KeySIR::size() const
{
assert(_interval);
......
......@@ -125,6 +125,9 @@ public:
label_t a,
const ParsingEnv& env);
/// destructor
virtual ~KeySIR();
protected:
/// @brief constructor for internal use
......
......@@ -31,6 +31,7 @@ _nb_best_rejected(0)
template<class K>
Record<K>::~Record()
{
TRACE("delete Record");
if (_fail)
delete _fail;
}
......
......@@ -14,7 +14,9 @@ namespace Parsing{
Recordo::~Recordo()
{ }
{
TRACE("delete Recordo");
}
} // end namespace Parsing
......@@ -77,8 +77,8 @@ _origin(r._origin)
//template<class K>
Run::~Run()
{
// TRACE("delete Run {}", *this);
// delete weight;
TRACE("delete Run <ABS> {}", *this);
// delete weight;
}
......@@ -177,7 +177,6 @@ void Run::print(std::ostream& o) const
{
SymbLabel::print(_label, o);
o << " : " << _weight;
o << " ( " << (filtered()?"filtered":"unfiltered") << " )";
}
......
......@@ -280,8 +280,8 @@ size_t TableParse<K,R,H>::add(const K& k, R* rec)
for (; (! st.empty()); st.pop())
{
std::pair<const K*, RunTerm*> p = st.top();
assert(p.first);
const K& kc = *(p.first);
assert(k.complete() || p.first);
const K& kc = (p.first == nullptr)?k:*(p.first);
assert(kc.complete());
assert(kc.instance(k)); // k == kc if k complete
RunTerm* rc = p.second;
......@@ -739,7 +739,7 @@ const RunTerm* TableParse<K,R,H>::failRun(const K& k) const
const RunTerm* failrun = k.failRun(env);
assert(failrun);
assert(failrun->fail()); // recognized as fail run
assert(failrun->weight().one()); // weight is one
assert(failrun->weight().zero()); // weight is one
return failrun;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment