#ifndef __GUT_OPERATOR_HPP #define __GUT_OPERATOR_HPP #include "variable.hpp" #include "ptnode.hpp" namespace gut { const unsigned long TOKEN_FUNCTION = 0xffffff; const unsigned long TOKEN_OPERATION = 0xfffff; const unsigned long TOKEN_CONTROL = 0xffff; typedef variable (*operate_f)(ptnode *pnode); typedef std::map function_table_t; void initialize_funcion(void); void initialize_operation(void); inline bool token_is_function(int token_id) { return (token_id >= TOKEN_FUNCTION); } inline bool token_is_operation(int token_id) { return (token_id >= TOKEN_OPERATION && token_id < TOKEN_FUNCTION); } variable excute_function(int token_id, ptnode *pnode); variable excute_operation(int token_id, ptnode *pnode); } // namespace gut #endif // __gut_OPERATOR_HPP