From cd6c436cb70c4323c7d14ebd74f89bb0914649f2 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Tue, 31 Mar 2020 18:46:49 +0200 Subject: Optimization: Replace head recursion by tail recursion in matching --- bnf.h | 1 + 1 file changed, 1 insertion(+) (limited to 'bnf.h') diff --git a/bnf.h b/bnf.h index e5c62ed..4ad782a 100644 --- a/bnf.h +++ b/bnf.h @@ -15,6 +15,7 @@ std::unordered_map> Reverse(const B std::unordered_map> reverseFirst(const BNF& bnf); BNF SubBNF(const BNF& bnf, const std::string& top); +BNF removeHeadRecursion(const BNF& bnf); bool isTerminal(const BNF& bnf, const std::string& symbol); std::unordered_set getTerminals(const BNF& bnf); -- cgit v1.2.3