summaryrefslogtreecommitdiffhomepage
path: root/bnf.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-03-31 18:46:49 +0200
committerRoland Reichwein <mail@reichwein.it>2020-03-31 18:46:49 +0200
commitcd6c436cb70c4323c7d14ebd74f89bb0914649f2 (patch)
tree1bdb2a8409b2b370bcaa5e1b6cf091c0c8e1f779 /bnf.h
parentbed46a062c442656b1bc16d965e12405297029d3 (diff)
Optimization: Replace head recursion by tail recursion in matching
Diffstat (limited to 'bnf.h')
-rw-r--r--bnf.h1
1 files changed, 1 insertions, 0 deletions
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<std::string, std::unordered_set<std::string>> Reverse(const B
std::unordered_map<std::string, std::unordered_set<std::string>> 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<std::string> getTerminals(const BNF& bnf);