mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
LR0: Cleaned up ::initialize
This commit is contained in:
parent
2e54201edd
commit
f27d66b8c7
1 changed files with 3 additions and 3 deletions
|
@ -67,14 +67,14 @@ void LR0::initialize (const Grammar& grammar)
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Add all items from augmented grammar, in initial state:
|
// TODO Expand this single interation into a loop that ends when there is no
|
||||||
// A --> . B ....
|
// more expanѕion.
|
||||||
Item item0 {augmented[0]};
|
Item item0 {augmented[0]};
|
||||||
std::cout << item0.dump () << "\n";
|
|
||||||
auto closure = getClosure (item0, augmented);
|
auto closure = getClosure (item0, augmented);
|
||||||
|
|
||||||
States states;
|
States states;
|
||||||
states.push_back (closure);
|
states.push_back (closure);
|
||||||
|
std::cout << states.dump () << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue