From 66504d5dfcfd981f8994d339cfe8aa378c407b09 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 27 Dec 2015 12:02:00 -0500 Subject: [PATCH] LR0: Made Item a public class, for testing --- src/LR0.cpp | 2 +- src/LR0.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LR0.cpp b/src/LR0.cpp index db1a73d9..a1a77174 100644 --- a/src/LR0.cpp +++ b/src/LR0.cpp @@ -158,7 +158,7 @@ std::string LR0::dump (std::vector >& augmented, State */ //////////////////////////////////////////////////////////////////////////////// -LR0::Item::Item (std::vector & rule) +LR0::Item::Item (const std::vector & rule) : _rule (rule) , _cursor (2) { diff --git a/src/LR0.h b/src/LR0.h index 46224bbd..1172bdcd 100644 --- a/src/LR0.h +++ b/src/LR0.h @@ -40,11 +40,10 @@ public: void debug (bool); std::string dump () const; -protected: class Item { public: - Item (std::vector &); + Item (const std::vector &); bool advance (); private: