mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
LR0: Removed ::dump for states, there is a better way
This commit is contained in:
parent
7205cfe1f1
commit
82cfd73b1e
2 changed files with 0 additions and 39 deletions
38
src/LR0.cpp
38
src/LR0.cpp
|
@ -119,44 +119,6 @@ std::string LR0::dump () const
|
||||||
return out.str ();
|
return out.str ();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/*
|
|
||||||
std::string LR0::dump (std::vector <std::vector <std::string>>& augmented, States& states) const
|
|
||||||
{
|
|
||||||
std::stringstream out;
|
|
||||||
|
|
||||||
for (unsigned int c = 0; c < states.size (); ++c)
|
|
||||||
{
|
|
||||||
out << " [" << c << "] ";
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < states[c].size (); ++i)
|
|
||||||
{
|
|
||||||
if (i)
|
|
||||||
out << " ";
|
|
||||||
|
|
||||||
out << augmented[states[c][i]._rule][0]
|
|
||||||
<< " "
|
|
||||||
<< augmented[states[c][i]._rule][1];
|
|
||||||
|
|
||||||
for (unsigned int t = 2; t < augmented[states[c][i]._rule].size (); t++)
|
|
||||||
{
|
|
||||||
if ((int)t - 2 == states[c][i]._cursor)
|
|
||||||
out << " .";
|
|
||||||
|
|
||||||
out << " " << augmented[states[c][i]._rule][t];
|
|
||||||
}
|
|
||||||
|
|
||||||
out << "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
out << "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
out << "\n";
|
|
||||||
return out.str ();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
LR0::Item::Item (const std::vector <std::string>& rule)
|
LR0::Item::Item (const std::vector <std::string>& rule)
|
||||||
: _rule (rule)
|
: _rule (rule)
|
||||||
|
|
|
@ -62,7 +62,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// bool expandNonTerminals (std::vector <std::vector <std::string>>&, States&, int);
|
// bool expandNonTerminals (std::vector <std::vector <std::string>>&, States&, int);
|
||||||
// std::string dump (std::vector <std::vector <std::string>>&, States&) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// state column result
|
// state column result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue