28 void print(std::ostream& stream,
int indent)
const;
36 void save(std::ostream& stream)
const;
39 static std::shared_ptr<node_impl>
read_node(std::istream& stream);
44 virtual void print_node(std::ostream& stream,
int indent)
const = 0;
48 virtual void save_node(std::ostream& stream)
const = 0;
59 virtual void print_node(std::ostream& stream,
int indent)
const override;
62 virtual void save_node(std::ostream& stream)
const override;
74 virtual void print_node(std::ostream& stream,
int indent)
const override;
76 virtual void save_node(std::ostream& stream)
const override;
88 std::string
const&
name()
const;
90 virtual void print_node(std::ostream& stream,
int indent)
const override;
93 virtual void save_node(std::ostream& stream)
const override;
108 virtual void print_node(std::ostream& stream,
int indent)
const override;
111 virtual void save_node(std::ostream& stream)
const override;
122 std::string
name()
const;
125 virtual void print_node(std::ostream& stream,
int indent)
const override;
127 virtual void save_node(std::ostream& stream)
const override;
142 virtual void print_node(std::ostream& stream,
int indent)
const override = 0;
144 virtual void save_node(std::ostream& stream)
const override = 0;
160 virtual void print_node(std::ostream& stream,
int indent)
const override = 0;
162 virtual void save_node(std::ostream& stream)
const override = 0;
174 virtual void print_node(std::ostream& stream,
int indent)
const override;
176 virtual void save_node(std::ostream& stream)
const override;
185 virtual void print_node(std::ostream& stream,
int indent)
const override;
187 virtual void save_node(std::ostream& stream)
const override;
196 virtual void print_node(std::ostream& stream,
int indent)
const override;
198 virtual void save_node(std::ostream& stream)
const override;
207 virtual void print_node(std::ostream& stream,
int indent)
const override;
209 virtual void save_node(std::ostream& stream)
const override;
218 virtual void print_node(std::ostream& stream,
int indent)
const override;
220 virtual void save_node(std::ostream& stream)
const override;
virtual void save_node(std::ostream &stream) const override=0
virtual void save_node(std::ostream &stream) const override=0
virtual void save_node(std::ostream &stream) const override
void save(std::ostream &stream) const
virtual void save_node(std::ostream &stream) const override
virtual std::string evaluate_string() const override
virtual std::string evaluate_string() const
virtual void print_node(std::ostream &stream, int indent) const override
number evaluate_operand() const
node_list const & arguments() const
virtual void print_node(std::ostream &stream, int indent) const override
virtual void print_node(std::ostream &stream, int indent) const override
virtual void save_node(std::ostream &stream) const override
node_function_call(std::string name, node_list arguments)
virtual number evaluate_node() const override
node_binary(node left, node right)
std::string const & name() const
virtual void print_node(std::ostream &stream, int indent) const override
virtual std::string evaluate_string() const override
node_identifier(std::string name)
virtual void save_node(std::ostream &stream) const override
virtual void print_node(std::ostream &stream, int indent) const override
number evaluate_right() const
void print(std::ostream &stream, int indent) const
virtual number evaluate_node() const override
virtual number evaluate_node() const override
number evaluate_left() const
std::vector< std::string > identifier_list
A sequence of identifiers (e.g., parameter names).
static std::shared_ptr< node_impl > read_node(std::istream &stream)
virtual void print_node(std::ostream &stream, int indent) const override
virtual void save_node(std::ostream &stream) const override
node_function(identifier_list parameters, node definition)
virtual number evaluate_node() const override
virtual number evaluate_node() const override
node_multiply(node left, node right)
virtual identifier_list const & evaluate_parameters() const override
virtual void print_node(std::ostream &stream, int indent) const override
node_number(number value)
virtual void save_node(std::ostream &stream) const override
node_impl & operator=(node_impl &&)=default
virtual number evaluate_node() const override
virtual void print_node(std::ostream &stream, int indent) const override
virtual number evaluate_node() const override
virtual void print_node(std::ostream &stream, int indent) const =0
virtual number evaluate_node() const =0
identifier_list parameters_
node_subtract(node left, node right)
virtual void save_node(std::ostream &stream) const =0
virtual void print_node(std::ostream &stream, int indent) const override
virtual identifier_list const & evaluate_parameters() const
virtual void save_node(std::ostream &stream) const override
identifier_list const & get_parameters() const
std::vector< node > node_list
A sequence of nodes.
virtual number evaluate_node() const override
std::string to_string() const
virtual number evaluate_node() const override
virtual void save_node(std::ostream &stream) const override
node_negate(node operand)
virtual number evaluate_node() const override=0
virtual void print_node(std::ostream &stream, int indent) const override
virtual void save_node(std::ostream &stream) const override
virtual number evaluate_node() const override=0
node_divide(node left, node right)
virtual void print_node(std::ostream &stream, int indent) const override=0
node_add(node left, node right)
virtual void save_node(std::ostream &stream) const override
identifier_list const & parameters() const
virtual void print_node(std::ostream &stream, int indent) const override=0
virtual number evaluate_node() const override