mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
LR0: Made more methods const
This commit is contained in:
parent
c0a7a203cf
commit
27f71d810f
2 changed files with 4 additions and 4 deletions
|
@ -94,7 +94,7 @@ void LR0::initialize (const Grammar& grammar)
|
||||||
// until no more items can be added to J;
|
// until no more items can be added to J;
|
||||||
// return J
|
// return J
|
||||||
// end
|
// end
|
||||||
LR0::Closure LR0::getClosure (const Closure& items)
|
LR0::Closure LR0::getClosure (const Closure& items) const
|
||||||
{
|
{
|
||||||
LR0::Closure closure;
|
LR0::Closure closure;
|
||||||
for (auto& item : items)
|
for (auto& item : items)
|
||||||
|
@ -116,7 +116,7 @@ LR0::Closure LR0::getClosure (const Closure& items)
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Collect a unique set of expected symbols from the closure.
|
// Collect a unique set of expected symbols from the closure.
|
||||||
std::set <std::string> LR0::getExpected (const Closure& closure)
|
std::set <std::string> LR0::getExpected (const Closure& closure) const
|
||||||
{
|
{
|
||||||
std::set <std::string> expected;
|
std::set <std::string> expected;
|
||||||
for (auto& item : closure)
|
for (auto& item : closure)
|
||||||
|
|
|
@ -68,8 +68,8 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Closure getClosure (const Closure&);
|
Closure getClosure (const Closure&) const;
|
||||||
std::set <std::string> getExpected (const Closure&);
|
std::set <std::string> getExpected (const Closure&) const;
|
||||||
Closure expand (const Closure&) const;
|
Closure expand (const Closure&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue