mediawiki-extensions-AbuseF.../parser_native/parser.h
River Tarnell ff2465007f - remove unused isInVector
- move AFP stuff into its own namespace
- move utf8 and equivset into seperate modules
- parser should understand /* */ comments
2008-08-08 03:23:34 +00:00

34 lines
590 B
C++

#ifndef EXPRESSOR_H
#define EXPRESSOR_H
#include <string>
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/function.hpp>
#include "aftypes.h"
namespace afp {
struct parser_grammar;
struct expressor : boost::noncopyable {
typedef boost::function<datum (std::vector<datum>)> func_t;
expressor();
~expressor();
datum evaluate(std::string const &expr) const;
void add_variable(std::string const &name, datum value);
void add_function(std::string const &name, func_t value);
private:
parser_grammar *grammar_;
};
} // namespace afp
#endif /* !EXPRESSOR_H */