aboutsummaryrefslogtreecommitdiff
path: root/include/cru/parse/Grammar.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-09-11 16:52:25 +0800
committercrupest <crupest@outlook.com>2021-09-11 16:52:25 +0800
commite6eef2bda79dcf2abde080943cb8f9808941e331 (patch)
tree84d7d0faaaa6f6a9fd1eb9a401e979ca25271c7f /include/cru/parse/Grammar.hpp
parent4511eab66574b8047376a1f612e84e57d2040a95 (diff)
downloadcru-e6eef2bda79dcf2abde080943cb8f9808941e331.tar.gz
cru-e6eef2bda79dcf2abde080943cb8f9808941e331.tar.bz2
cru-e6eef2bda79dcf2abde080943cb8f9808941e331.zip
...
Diffstat (limited to 'include/cru/parse/Grammar.hpp')
-rw-r--r--include/cru/parse/Grammar.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cru/parse/Grammar.hpp b/include/cru/parse/Grammar.hpp
index 5935e703..42649c30 100644
--- a/include/cru/parse/Grammar.hpp
+++ b/include/cru/parse/Grammar.hpp
@@ -35,6 +35,11 @@ class Grammar : public Object {
return productions_;
}
+ Grammar* Clone() const;
+
+ public: // Algorithms
+ void EliminateLeftRecursions();
+
private:
Nonterminal* start_symbol_;
std::vector<Terminal*> terminals_;