aboutsummaryrefslogtreecommitdiff
path: root/include/cru/parse/Production.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/parse/Production.hpp')
-rw-r--r--include/cru/parse/Production.hpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/include/cru/parse/Production.hpp b/include/cru/parse/Production.hpp
deleted file mode 100644
index cb3c79c0..00000000
--- a/include/cru/parse/Production.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#pragma once
-#include "cru/common/String.hpp"
-
-#include "Nonterminal.hpp"
-#include "Terminal.hpp"
-
-#include <vector>
-
-namespace cru::parse {
-class CRU_PARSE_API Production : public Object {
- public:
- Production(Grammar* grammar, String name, Nonterminal* left,
- std::vector<Symbol*> right);
-
- CRU_DELETE_COPY(Production)
- CRU_DELETE_MOVE(Production)
-
- ~Production() override;
-
- public:
- Grammar* GetGrammar() const { return grammar_; }
-
- String GetName() const { return name_; }
- void SetName(String name) { name_ = std::move(name); }
-
- Nonterminal* GetLeft() const { return left_; }
- void SetLeft(Nonterminal* left);
-
- const std::vector<Symbol*>& GetRight() const { return right_; }
- void SetRight(std::vector<Symbol*> right);
-
- bool IsLeftRecursion() const {
- return !right_.empty() && left_ == right_.front();
- }
-
- private:
- Grammar* grammar_;
- String name_;
-
- Nonterminal* left_;
- std::vector<Symbol*> right_;
-};
-} // namespace cru::parse