diff options
author | crupest <crupest@outlook.com> | 2021-12-14 21:34:59 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-12-14 21:34:59 +0800 |
commit | fa3794469430b4ddfe0b0ca62850e9911c99b558 (patch) | |
tree | 2cd038280f9fa21ae5c64b82730624d801208292 /include/cru/parse | |
parent | 72abeb9c86d768a5c6a9a2d28dab037b145b7390 (diff) | |
download | cru-fa3794469430b4ddfe0b0ca62850e9911c99b558.tar.gz cru-fa3794469430b4ddfe0b0ca62850e9911c99b558.tar.bz2 cru-fa3794469430b4ddfe0b0ca62850e9911c99b558.zip |
...
Diffstat (limited to 'include/cru/parse')
-rw-r--r-- | include/cru/parse/Grammar.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
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<Terminal*> terminals_; std::vector<Nonterminal*> nonterminals_; std::vector<Symbol*> symbols_; |