From 90fbdaa08b803eff9ce889c5f4cdef978628cce9 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 27 Dec 2015 09:58:40 -0500 Subject: [PATCH] LR0: ::expandNonTerminals now accepts a set of items and states --- src/LR0.cpp | 4 ++-- src/LR0.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LR0.cpp b/src/LR0.cpp index 6bc660a7..4d2f0280 100644 --- a/src/LR0.cpp +++ b/src/LR0.cpp @@ -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 >& items) { diff --git a/src/LR0.h b/src/LR0.h index 97106c3d..0963e2da 100644 --- a/src/LR0.h +++ b/src/LR0.h @@ -41,7 +41,7 @@ public: std::string dump () const; private: - bool expandNonTerminals (); + bool expandNonTerminals (std::vector >&); private: // state column result