diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-03-31 18:46:49 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-03-31 18:46:49 +0200 |
commit | cd6c436cb70c4323c7d14ebd74f89bb0914649f2 (patch) | |
tree | 1bdb2a8409b2b370bcaa5e1b6cf091c0c8e1f779 /bnf.h | |
parent | bed46a062c442656b1bc16d965e12405297029d3 (diff) |
Optimization: Replace head recursion by tail recursion in matching
Diffstat (limited to 'bnf.h')
-rw-r--r-- | bnf.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |