Fix?
This commit is contained in:
parent
f765196417
commit
83b982015a
|
@ -1,10 +1,21 @@
|
|||
#include "Parsodus/lrtables/LR0Itemset.h"
|
||||
|
||||
#include <iostream> ///TODO remove me
|
||||
|
||||
namespace pds {
|
||||
namespace lr {
|
||||
|
||||
void LR0Itemset::print() const {
|
||||
for (auto& item : m_items) {
|
||||
std::cout << item.rule->head << " -> ";
|
||||
for (std::size_t i = 0; i < item.rule->tail.size(); i++) {
|
||||
if (i == item.dotIdx)
|
||||
std::cout << " ·";
|
||||
std::cout << " " << item.rule->tail[i];
|
||||
}
|
||||
if (item.dotIdx == item.rule->tail.size())
|
||||
std::cout << " ·";
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue