summaryrefslogtreecommitdiff
path: root/src/scriptengine.h
blob: 74924d6d7d13c2f452128466f47079d5f2484f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef SCRIPT_ENGINE_H
#define SCRIPT_ENGINE_H

#include "number.h"

#include <bu/hash.h>
#include <bu/list.h>
#include <bu/string.h>


namespace Bu
{
    class Stream;
}
class Expression;

class ScriptEngine
{
public:
    ScriptEngine();
    virtual ~ScriptEngine();

    Number exec( const Bu::String &sExpr );
    Number exec( Bu::Stream &sInput );
    Number exec( Expression *pExpr );

private:
    typedef Bu::Hash<Bu::String, Number> VarHash;
    typedef Bu::List<Number> NumStack;
    VarHash hVarState;
};

#endif