#ifndef SCRIPT_ENGINE_H #define SCRIPT_ENGINE_H #include "number.h" #include "expression.h" #include #include #include #include namespace Bu { class Stream; } class Expression; class ScriptEngine { private: typedef Bu::Hash VarHash; typedef Bu::List NumStack; public: ScriptEngine(); virtual ~ScriptEngine(); void exec( const Bu::String &sExpr ); void exec( Bu::Stream &sInput ); void exec( Expression *pExpr ); bool isRunning() const { return bRunning; } public: Bu::Signal1 sigNumResult; Bu::Signal1 sigError; Bu::Signal1 sigMessage; private: void command( Expression::iterator &i ); private: VarHash hVarState; bool bRunning; }; #endif