From 26e0a472acc910f089f845a0768dec8d64614090 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 27 Dec 2015 11:17:39 -0500 Subject: [PATCH] LR0: Created data strcuture to represent intermediate parsing table --- src/LR0.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/LR0.h b/src/LR0.h index 17160d6e..4371e37d 100644 --- a/src/LR0.h +++ b/src/LR0.h @@ -40,6 +40,24 @@ public: void debug (bool); std::string dump () const; +protected: + class Item + { + public: + Item (int rule, int cursor) : _rule (rule), _cursor (cursor) {} + + int _rule; + int _cursor; + }; + + class Closure : public std::vector + { + }; + + class States : public std::vector + { + }; + private: bool expandNonTerminals (std::vector >&, std::vector >&);