From aa923364615b77e152d532b021fe1536fcf96a50 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 29 Dec 2021 21:57:33 +0800 Subject: ... --- src/parse/RecursiveDescentAlgorithm.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/parse/RecursiveDescentAlgorithm.cpp (limited to 'src/parse/RecursiveDescentAlgorithm.cpp') diff --git a/src/parse/RecursiveDescentAlgorithm.cpp b/src/parse/RecursiveDescentAlgorithm.cpp new file mode 100644 index 00000000..a6549f8a --- /dev/null +++ b/src/parse/RecursiveDescentAlgorithm.cpp @@ -0,0 +1,14 @@ +#include "cru/parse/RecursiveDescentAlgorithm.hpp" +#include "cru/parse/ParsingAlgorithmContext.hpp" +#include "cru/parse/RecursiveDescentAlgorithmContext.hpp" + +namespace cru::parse { +bool RecursiveDescentAlgorithm::CanHandle(Grammar *grammar) const { + return true; +} + +ParsingAlgorithmContext *RecursiveDescentAlgorithm::CreateContext( + Grammar *grammar) const { + return new RecursiveDescentAlgorithmContext(grammar, this); +} +} // namespace cru::parse -- cgit v1.2.3