diff options
author | crupest <crupest@outlook.com> | 2021-09-13 15:51:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-09-13 15:51:02 +0800 |
commit | 9bc202a2e1664df3e3c148abfe90a90501bc1650 (patch) | |
tree | edb3f908ab30b0a6df498d47a38d9e1cefd7a7b1 /include/cru/parse | |
parent | fe45ee2dde28c995f1aa16a9cdc3119e00a26a8a (diff) | |
download | cru-9bc202a2e1664df3e3c148abfe90a90501bc1650.tar.gz cru-9bc202a2e1664df3e3c148abfe90a90501bc1650.tar.bz2 cru-9bc202a2e1664df3e3c148abfe90a90501bc1650.zip |
...
Diffstat (limited to 'include/cru/parse')
-rw-r--r-- | include/cru/parse/Grammar.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/cru/parse/Grammar.hpp b/include/cru/parse/Grammar.hpp index 5b37ceba..659c4302 100644 --- a/include/cru/parse/Grammar.hpp +++ b/include/cru/parse/Grammar.hpp @@ -46,6 +46,9 @@ class Grammar : public Object { // Require grammar has no cycles or empty-productions. void EliminateLeftRecursions(); + // Algorithm 4.21 + void LeftFactor(); + private: Nonterminal* start_symbol_; std::vector<Terminal*> terminals_; |