diff options
author | crupest <crupest@outlook.com> | 2021-12-29 21:57:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-12-29 21:57:33 +0800 |
commit | aa923364615b77e152d532b021fe1536fcf96a50 (patch) | |
tree | 9f4a949315d0a5e53f51caee0c937d49e764f661 /src/parse/RecursiveDescentAlgorithm.cpp | |
parent | 63b39863b9d567068480f9c1d59177c92a8c6169 (diff) | |
download | cru-aa923364615b77e152d532b021fe1536fcf96a50.tar.gz cru-aa923364615b77e152d532b021fe1536fcf96a50.tar.bz2 cru-aa923364615b77e152d532b021fe1536fcf96a50.zip |
...
Diffstat (limited to 'src/parse/RecursiveDescentAlgorithm.cpp')
-rw-r--r-- | src/parse/RecursiveDescentAlgorithm.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 |