Plot Script
interpreter.hpp
Go to the documentation of this file.
1 
7 #ifndef INTERPRETER_HPP
8 #define INTERPRETER_HPP
9 
10 // system includes
11 #include <istream>
12 #include <string>
13 
14 // module includes
15 #include "environment.hpp"
16 #include "expression.hpp"
17 
25 class Interpreter {
26 public:
27 
32  bool parseStream(std::istream &expression) noexcept;
33 
39 
40 private:
41 
42  // the environment
43  Environment env;
44 
45  // the AST
46  Expression ast;
47 };
48 
49 #endif
An expression is a tree of Atoms.
Definition: expression.hpp:22
bool parseStream(std::istream &expression) noexcept
Definition: interpreter.cpp:13
Expression evaluate()
Definition: interpreter.cpp:23
A class representing the interpreter environment.
Definition: environment.hpp:40
Class to parse and evaluate an expression (program)
Definition: interpreter.hpp:25