From 74bb9cd27242b9320f99ff4d2b50c3051576cc14 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 8 Feb 2022 16:53:51 +0800 Subject: ... --- .../cru/parse/RecursiveDescentAlgorithmContext.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/cru/parse/RecursiveDescentAlgorithmContext.h (limited to 'include/cru/parse/RecursiveDescentAlgorithmContext.h') diff --git a/include/cru/parse/RecursiveDescentAlgorithmContext.h b/include/cru/parse/RecursiveDescentAlgorithmContext.h new file mode 100644 index 00000000..00acf479 --- /dev/null +++ b/include/cru/parse/RecursiveDescentAlgorithmContext.h @@ -0,0 +1,22 @@ +#pragma once + +#include "ParsingAlgorithmContext.h" +#include "cru/parse/ParsingTreeNode.h" +#include "cru/parse/RecursiveDescentAlgorithm.h" +#include "cru/parse/Terminal.h" + +namespace cru::parse { +class CRU_PARSE_API 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& input) override; +}; +} // namespace cru::parse -- cgit v1.2.3