From fa3794469430b4ddfe0b0ca62850e9911c99b558 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 14 Dec 2021 21:34:59 +0800 Subject: ... --- include/cru/parse/Grammar.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/cru/parse') diff --git a/include/cru/parse/Grammar.hpp b/include/cru/parse/Grammar.hpp index 659c4302..606fcc33 100644 --- a/include/cru/parse/Grammar.hpp +++ b/include/cru/parse/Grammar.hpp @@ -49,8 +49,11 @@ class Grammar : public Object { // Algorithm 4.21 void LeftFactor(); + public: + String ProductionsToString() const; + private: - Nonterminal* start_symbol_; + Nonterminal* start_symbol_ = nullptr; std::vector terminals_; std::vector nonterminals_; std::vector symbols_; -- cgit v1.2.3