diff options
author | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
commit | 74bb9cd27242b9320f99ff4d2b50c3051576cc14 (patch) | |
tree | 744bac5799c593d1d6f81e7b09581bea626f2cde /include/cru/parse/ParsingContext.h | |
parent | b90c398de829d1ba5329651d75bae82f5e4085fe (diff) | |
download | cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.gz cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.bz2 cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.zip |
...
Diffstat (limited to 'include/cru/parse/ParsingContext.h')
-rw-r--r-- | include/cru/parse/ParsingContext.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/cru/parse/ParsingContext.h b/include/cru/parse/ParsingContext.h new file mode 100644 index 00000000..02dc4c9c --- /dev/null +++ b/include/cru/parse/ParsingContext.h @@ -0,0 +1,22 @@ +#pragma once +#include "ParsingAlgorithmContext.h" +#include "cru/parse/ParsingTreeNode.h" + +namespace cru::parse { +// A parsing context contains all info that a program needs to know when parsing +// a input sequence of terminals. +class CRU_PARSE_API ParsingContext { + public: + ParsingContext(const ParsingAlgorithmContext* parsing_algorithm_context, + std::vector<Terminal*> input); + + CRU_DELETE_COPY(ParsingContext) + CRU_DELETE_MOVE(ParsingContext) + + ~ParsingContext(); + + private: + const ParsingAlgorithmContext* parsing_algorithm_context_; + std::vector<Terminal*> input_; +}; +} // namespace cru::parse |