aboutsummaryrefslogtreecommitdiff
path: root/include/cru/parse/RecursiveDescentAlgorithmContext.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-12-29 21:57:33 +0800
committercrupest <crupest@outlook.com>2021-12-29 21:57:33 +0800
commitaa923364615b77e152d532b021fe1536fcf96a50 (patch)
tree9f4a949315d0a5e53f51caee0c937d49e764f661 /include/cru/parse/RecursiveDescentAlgorithmContext.hpp
parent63b39863b9d567068480f9c1d59177c92a8c6169 (diff)
downloadcru-aa923364615b77e152d532b021fe1536fcf96a50.tar.gz
cru-aa923364615b77e152d532b021fe1536fcf96a50.tar.bz2
cru-aa923364615b77e152d532b021fe1536fcf96a50.zip
...
Diffstat (limited to 'include/cru/parse/RecursiveDescentAlgorithmContext.hpp')
-rw-r--r--include/cru/parse/RecursiveDescentAlgorithmContext.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/cru/parse/RecursiveDescentAlgorithmContext.hpp b/include/cru/parse/RecursiveDescentAlgorithmContext.hpp
new file mode 100644
index 00000000..1b888da9
--- /dev/null
+++ b/include/cru/parse/RecursiveDescentAlgorithmContext.hpp
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "ParsingAlgorithmContext.hpp"
+#include "cru/parse/ParsingTreeNode.hpp"
+#include "cru/parse/RecursiveDescentAlgorithm.hpp"
+#include "cru/parse/Terminal.hpp"
+
+namespace cru::parse {
+class RecursiveDescentAlgorithmContext : public ParsingAlgorithmContext {
+ public:
+ RecursiveDescentAlgorithmContext(Grammar* grammar,
+ const RecursiveDescentAlgorithm* algorithm);
+
+ CRU_DELETE_COPY(RecursiveDescentAlgorithmContext)
+ CRU_DELETE_MOVE(RecursiveDescentAlgorithmContext)
+
+ ~RecursiveDescentAlgorithmContext() override;
+
+ public:
+ ParsingTreeNode* Parse(const std::vector<Terminal*>& input) override;
+};
+} // namespace cru::parse