blob: da611c7facf942daff3851497f99b2e82d180789 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef PARSER_SRC_NODE_H_
#define PARSER_SRC_NODE_H_
#include <vector>
#include <string>
#include <memory>
#include "nodes.h"
namespace SimpleParser {
class Tree {
public:
void setRoot(Node*);
double solve();
Node* addOperand(Node**, double);
Node* addOperator(Node**, char);
std::string print(std::string);
private:
Node* root_node_;
std::vector<std::unique_ptr<Node>> node_collection_;
};
}
#endif // PARSER_SRC_NODE_H_
|