LR0: ::expandNonTerminals now accepts a set of items and states

This commit is contained in:
Paul Beckingham 2015-12-27 09:58:40 -05:00
parent d3353aba24
commit 90fbdaa08b
2 changed files with 3 additions and 3 deletions

View file

@ -58,12 +58,12 @@ void LR0::createParseTables (const Grammar& grammar)
// TODO Add augmented grammar to items.
// TODO Add new states.
while (expandNonTerminals ())
while (expandNonTerminals (items))
;
}
////////////////////////////////////////////////////////////////////////////////
bool LR0::expandNonTerminals ()
bool LR0::expandNonTerminals (std::vector <std::pair <int, int>>& items)
{

View file

@ -41,7 +41,7 @@ public:
std::string dump () const;
private:
bool expandNonTerminals ();
bool expandNonTerminals (std::vector <std::pair <int, int>>&);
private:
// state column result