LR0: Stubbed expanѕion of non-terminals

This commit is contained in:
Paul Beckingham 2015-12-26 23:08:17 -05:00
parent 53d8500000
commit d347303e6e
2 changed files with 16 additions and 0 deletions

View file

@ -53,9 +53,22 @@ void LR0::createParseTables (const Grammar& grammar)
}
}
// TODO Add all items from augmented grammar.
std::vector <std::pair <int, int>> items;
// TODO Add augmented grammar to items.
// TODO Add new states.
while (expandNonTerminals ())
;
}
////////////////////////////////////////////////////////////////////////////////
bool LR0::expandNonTerminals ()
{
return false;
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -40,6 +40,9 @@ public:
void debug (bool);
std::string dump () const;
private:
bool expandNonTerminals ();
private:
// state column result
// | | |