LR0: Added ::Item::done

This commit is contained in:
Paul Beckingham 2016-01-02 13:54:11 -05:00
parent fbcb79006e
commit 29130e9d4c
2 changed files with 7 additions and 0 deletions

View file

@ -185,6 +185,12 @@ bool LR0::Item::advance ()
return true;
}
////////////////////////////////////////////////////////////////////////////////
bool LR0::Item::done () const
{
return _cursor >= _rule.size ();
}
////////////////////////////////////////////////////////////////////////////////
std::string LR0::Item::dump () const
{

View file

@ -46,6 +46,7 @@ public:
Item (const std::vector <std::string>&);
void setGrammarRuleIndex (const int);
bool advance ();
bool done () const;
std::string dump () const;
private: