LR0: Renamed ::expand to ::getClosure

This commit is contained in:
Paul Beckingham 2016-01-03 16:40:21 -05:00
parent a0d9df5edd
commit 40b7357b71
2 changed files with 3 additions and 3 deletions

View file

@ -75,7 +75,7 @@ void LR0::initialize (const Grammar& grammar)
Closure items;
items.push_back (item0);
for (auto& expected : getExpectedSymbols (items))
for (auto& item : expand (expected))
for (auto& item : getClosure (expected))
items.push_back (item);
States states;
@ -99,7 +99,7 @@ std::set <std::string> LR0::getExpectedSymbols (const Closure& closure) const
////////////////////////////////////////////////////////////////////////////////
// Add all items to the result set matching the production rule for symbol.
LR0::Closure LR0::expand (const std::string& symbol) const
LR0::Closure LR0::getClosure (const std::string& symbol) const
{
std::set <std::string> seen;

View file

@ -69,7 +69,7 @@ public:
private:
std::set <std::string> getExpectedSymbols (const Closure&) const;
Closure expand (const std::string&) const;
Closure getClosure (const std::string&) const;
private:
// Copy of the augmented grammar.