From 9bc202a2e1664df3e3c148abfe90a90501bc1650 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 13 Sep 2021 15:51:02 +0800 Subject: ... --- include/cru/parse/Grammar.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/cru/parse') 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 terminals_; -- cgit v1.2.3