LR0: Added Item::next

This commit is contained in:
Paul Beckingham 2016-01-02 14:09:13 -05:00
parent b207039464
commit d8096d2fa8
2 changed files with 7 additions and 0 deletions

View file

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

View file

@ -47,6 +47,7 @@ public:
void setGrammarRuleIndex (const int); void setGrammarRuleIndex (const int);
bool advance (); bool advance ();
bool done () const; bool done () const;
std::string next () const;
std::string dump () const; std::string dump () const;
private: private: