mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
LR0: Expansion of non-terminals also needs a reference to the augmented grammar
This commit is contained in:
parent
b56e8fb226
commit
08457be4a0
2 changed files with 5 additions and 5 deletions
|
@ -60,16 +60,16 @@ void LR0::createParseTables (const Grammar& grammar)
|
|||
items.push_back (std::pair <int, int> (i, 0));
|
||||
|
||||
// TODO Add new states.
|
||||
while (expandNonTerminals (items))
|
||||
while (expandNonTerminals (augmented, items))
|
||||
;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool LR0::expandNonTerminals (std::vector <std::pair <int, int>>& items)
|
||||
bool LR0::expandNonTerminals (
|
||||
std::vector <std::vector <std::string>>& augmented,
|
||||
std::vector <std::pair <int, int>>& items)
|
||||
{
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
std::string dump () const;
|
||||
|
||||
private:
|
||||
bool expandNonTerminals (std::vector <std::pair <int, int>>&);
|
||||
bool expandNonTerminals (std::vector <std::vector <std::string>>&, std::vector <std::pair <int, int>>&);
|
||||
|
||||
private:
|
||||
// state column result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue