Example #1
0
        private bool exit;         // do we need to exit?

        public Interpreter(string input)
        {
            this.lex    = new Lexer(input);
            this.vars   = new Hashtable();
            this.labels = new Hashtable();
            this.loops  = new Hashtable();
            this.funcs  = new Hashtable();

            /*
             * this.vars = new Dictionary<string, Value>();
             * this.labels = new Dictionary<string, Marker>();
             * this.loops = new Dictionary<string, Marker>();
             * this.funcs = new Dictionary<string, BasicFunction>();
             */
            this.ifcounter = 0;
            BuiltIns.InstallAll(this); // map all builtins functions
        }
Example #2
0
        public int Run(string Script)
        {
            this.lex    = new Lexer(Script);
            this.vars   = new Hashtable();
            this.labels = new Hashtable();
            this.loops  = new Hashtable();
            this.funcs  = new Hashtable();

            /*
             * this.vars = new Dictionary<string, Value>();
             * this.labels = new Dictionary<string, Marker>();
             * this.loops = new Dictionary<string, Marker>();
             * this.funcs = new Dictionary<string, BasicFunction>();
             */
            this.ifcounter = 0;
            BuiltIns.InstallAll(this); // map all builtins functions
            return(0);
        }