expression.hpp
Go to the documentation of this file.
Parse a mathematical expression.
Definition: expression.hpp:58
void optimize()
Perform constant folding onto the abstract syntax tree.
Definition: expression.hpp:101
void parse(std::string const &expr)
Parse the mathematical expression into an abstract syntax tree.
Definition: expression.hpp:98
double evaluate(std::map< std::string, double > const &st={})
Evaluate the abstract syntax tree for a given symbol table.
Definition: expression.hpp:106
parser::expression_type grammar()
Definition: parser_def.hpp:314
double parse(std::string const &expr, std::map< std::string, double > const &st={})
Convenience function.
Definition: expression.hpp:118
Definition: pair.hpp:31
Definition: evaluator.hpp:63
Definition: evaluator.hpp:120
Definition: ast.hpp:84
Definition: ast.hpp:62