aboutsummaryrefslogtreecommitdiff
path: root/include/cru/parse/ParsingContext.hpp
blob: cfb850b93eb90979e69d1932c6ea6bc6ecc6ac52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "ParsingAlgorithmContext.hpp"
#include "cru/parse/ParsingTreeNode.hpp"

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