-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContext.h
More file actions
40 lines (23 loc) · 713 Bytes
/
Copy pathContext.h
File metadata and controls
40 lines (23 loc) · 713 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
#ifndef EXPRESSION_CALCULATOR_CONTEXT_H
#define EXPRESSION_CALCULATOR_CONTEXT_H
#include <stack>
#include <string>
#include <vector>
class Symbol;
class Context
{
public:
Context (std::vector<std::string> * tokens);
~Context (void);
std::stack<Symbol *> & getSymbols (void) const;
const std::string & getToken (void) const;
void nextToken (void);
bool hasNextToken (void) const;
bool is_numeric (const std::string & token) const;
private:
std::vector<std::string> * tokens_;
std::stack<Symbol *> * symbols_;
std::vector<std::string>::const_iterator begin_;
std::vector<std::string>::const_iterator end_;
};
#endif //EXPRESSION_CALCULATOR_CONTEXT_H