aboutsummaryrefslogtreecommitdiff
path: root/include/cru/parse/Grammar.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/parse/Grammar.hpp')
-rw-r--r--include/cru/parse/Grammar.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cru/parse/Grammar.hpp b/include/cru/parse/Grammar.hpp
index 42649c30..98bed1b1 100644
--- a/include/cru/parse/Grammar.hpp
+++ b/include/cru/parse/Grammar.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "Production.hpp"
+#include <unordered_map>
#include <vector>
namespace cru::parse {
@@ -38,6 +39,9 @@ class Grammar : public Object {
Grammar* Clone() const;
public: // Algorithms
+ std::unordered_map<Nonterminal*, std::vector<Production*>>
+ GenerateLeftProductionMap() const;
+
void EliminateLeftRecursions();
private: