1 #ifndef BOOLEANEVALUATOR_H_
2 #define BOOLEANEVALUATOR_H_
11 using ValueFunction = std::function<bool(const std::string &)>;
12 using CompareFunction = std::function<bool(const std::string &, const std::string *)>;
17 std::vector<std::string> var_stack;
18 std::vector<unsigned char> value_stack;
19 std::vector<char> op_stack;
23 BooleanEvaluator(const ValueFunction &);
24 BooleanEvaluator(const CompareFunction &);
26 bool evaluate(const std::string &);
30 void collapse(unsigned);
31 unsigned precedence(char);