예제 #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="args"></param>
        public override LispObject execute(LispObject[] args)
        {
            if (args[0] is Condition)
            {
                Condition cond = (Condition)args[0];
                String s = "DESC:\r\n" + cond.getDescription().princToString() + "\r\nMESG:\r\n" + cond.getMessage() + "\r\nRPRT:\r\n" + cond.getConditionReport() + "\r\n";
                DLRConsole.DebugWriteLine(s);
               // if (true) return previous.execute(args);
                if (args[0] is UndefinedFunction)
                {
                    UndefinedFunction u = (UndefinedFunction)args[0];
                    return ABCLInterpreter.COMMON_ABCLInterpreter.makeFunction(u.getCellName());
                }
                if (args[0] is UnboundVariable)
                {
                    UnboundVariable u = (UnboundVariable)args[0];
                    return ABCLInterpreter.COMMON_ABCLInterpreter.makeVariable(u.getCellName());
                }

                lock (ABCLInterpreter.SubThreadInDebugMutex)
                {
                    bool wasDebugging = ABCLInterpreter.IsSubThreadInDebug;
                    try
                    {
                        ABCLInterpreter.IsSubThreadInDebug = true;
                        previous.execute(args); //throw new ConditionThrowable(cond);
                    }
                    finally
                    {
                        ABCLInterpreter.IsSubThreadInDebug = wasDebugging;
                    }
                }
            }
            throw new MissingMethodException(Lisp.javaString(args[0]));
        } // method: execute
예제 #2
0
        public static LispObject GetNarrowestChild(this LispObject obj, LispSourcePosition position)
        {
            if (!obj.SourceLocation.HasValue ||
                !obj.SourceLocation.Value.ContainsPosition(position))
            {
                return(null);
            }

            var children = obj.GetChildren().ToList();

            if (children.Count == 0)
            {
                // can't delve any deeper
                return(obj);
            }

            // otherwise try to find the child that contains the position and recurse
            foreach (var child in children)
            {
                if (child.SourceLocation.HasValue &&
                    child.SourceLocation.Value.ContainsPosition(position))
                {
                    return(child.GetNarrowestChild(position));
                }
            }

            // no child was more specific, just return this
            return(obj);
        }
예제 #3
0
        public Interpreter getInterpreter()
        {
            if (interpreter == null)
            {
                jlispThread = new Thread(new ThreadStart(StartJLISP));
                jlispThread.Start();
                while (interpreter == null)
                {
                    ironTextBoxControl.Update();
                }
            }
            if (varPackage == null)
            {
                varPackage = Symbol._PACKAGE_;
            }
            LispObject pkg = varPackage.symbolValue();

            if (lastPackage != pkg)
            {
                lastPackage = pkg;
                ironTextBoxControl.Prompt = ((Package)pkg).getName() + "> ";
                //ironTextBoxControl.ConsoleTextBox
            }
            return(interpreter);
        }
예제 #4
0
        public LispParseResult ParseUntilSourceLocation(string code, LispSourcePosition position)
        {
            var        sourceBindings   = new LispSourceBindings(Host.CurrentPackage);
            LispObject containingObject = null;
            var        eofValue         = new LispError("EOF");
            var        textReader       = new StringReader(code);
            var        textStream       = new LispTextStream("", textReader, TextWriter.Null);

            Host.ObjectReader.SetReaderStream(textStream);
            while (true)
            {
                var result = Host.ObjectReader.Read(false, eofValue, true);
                if (ReferenceEquals(result.LastResult, eofValue))
                {
                    break;
                }

                sourceBindings.TryAddSourceBinding(result.LastResult);

                if (result.LastResult.SourceLocation.HasValue &&
                    result.LastResult.SourceLocation.Value.ContainsPosition(position))
                {
                    containingObject = result.LastResult;
                    break;
                }
            }

            var narrowestChild = containingObject?.GetNarrowestChild(position);
            var parseResult    = new LispParseResult(Host, narrowestChild, sourceBindings);

            return(parseResult);
        }
예제 #5
0
 protected static void EnsureNotError(LispObject obj)
 {
     if (obj is LispError error)
     {
         Assert.True(false, $"{error.Message} at {error.SourceLocation}");
     }
 }
예제 #6
0
        internal LispObject Evaluate(string command)
        {
            getInterpreter();
            LispObject cmd    = Lisp.readObjectFromString(command);
            LispObject result = Lisp.eval(cmd);

            return(result);
        }
예제 #7
0
        public LispEvaluatorObjectExpression(LispObject expression)
        {
            if (expression == null)
            {
                throw new ArgumentNullException(nameof(expression));
            }

            Expression = expression;
        }
예제 #8
0
        public bool TryGetBoundValue(LispResolvedSymbol symbol, out LispObject value)
        {
            if (_parsedBindings.TryGetValue(symbol.Value, out value))
            {
                return(true);
            }

            return(false);
        }
예제 #9
0
파일: LispEnvironment.cs 프로젝트: nja/keel
 public void AddBinding(Symbol symbol, LispObject value)
 {
     if (!dict.ContainsKey(symbol))
     {
         dict.Add(symbol, value);
     }
     else
     {
         throw new EnvironmentException(symbol + " already bound");
     }
 }
예제 #10
0
        internal bool TryPopArgument(out LispObject arg)
        {
            arg = default;
            if (_argumentStack.Count > 0)
            {
                arg = _argumentStack.Pop();
                return(true);
            }

            return(false);
        }
예제 #11
0
        public static bool IsNil(this LispObject o)
        {
            switch (o)
            {
            case LispNilList _:
                return(true);

            default:
                return(false);
            }
        }
예제 #12
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, Symbol previous, LispObject[] args)
        {
            LispObject pv = previous.getSymbolValue();
            LispObject pf = previous.getSymbolFunction();

            if (lsp == pf)
            {
            }
            String s = ((Symbol)previous).getName();

            return(clojEval(lsp, s, args));
        }
예제 #13
0
        public override bool IsSubscriberOf(string eventName)
        {
            eventName = eventName.ToUpper();
            Symbol     s   = Lisp.getCurrentPackage().findAccessibleSymbol(eventName);
            LispObject fun = s.getSymbolFunction();

            if (fun == null || fun == Lisp.NIL)
            {
                return(false);
            }
            return(true);
        }
예제 #14
0
        public void TryAddSourceBinding(LispObject obj)
        {
            // TODO: delve into labels and functions/macros for arguments
            if (obj is LispList list)
            {
                var listItems = list.ToList();
                if (list.Value is LispSymbol symbol)
                {
                    var resolvedSymbol = symbol.Resolve(CurrentPackage);
                    switch (resolvedSymbol.Value)
                    {
                    case "COMMON-LISP:DEFUN":
                    {
                        if (LispDefaultContext.TryGetCodeFunctionFromItems(listItems.Skip(1).ToArray(), CurrentPackage, out var codeFunction, out var _error))
                        {
                            if (codeFunction != null)
                            {
                                _parsedBindings[codeFunction.NameSymbol.Value] = codeFunction;
                            }
                        }
                    }
                    break;

                    case "COMMON-LISP:DEFMACRO":
                    {
                        if (LispDefaultContext.TryGetCodeMacroFromItems(listItems.Skip(1).ToArray(), CurrentPackage, out var codeMacro, out var _error))
                        {
                            if (codeMacro != null)
                            {
                                _parsedBindings[codeMacro.NameSymbol.Value] = codeMacro;
                            }
                        }
                    }
                    break;

                    case "COMMON-LISP:SETF":
                        // starting at 1 to skip the `SETF` keyword
                        for (int i = 1; i < listItems.Count - 1; i++)
                        {
                            var name  = listItems[i];
                            var value = listItems[i + 1];
                            if (name is LispSymbol symbolName)
                            {
                                var resolvedSymbolName = symbolName.Resolve(CurrentPackage);
                                _parsedBindings[resolvedSymbolName.Value] = value;
                            }
                        }
                        break;
                    }
                }
            }
        }
예제 #15
0
        internal void InsertObjectOperations(LispObject obj, bool createDribbleInstructions)
        {
            if (createDribbleInstructions)
            {
                InsertOperation(new LispEvaluatorDribbleExit());
            }

            InsertOperation(new LispEvaluatorObjectExpression(obj));

            if (createDribbleInstructions)
            {
                InsertOperation(new LispEvaluatorDribbleEnter(obj));
            }
        }
예제 #16
0
        public static string GetMarkdownDisplay(this LispObject obj, LispHost host)
        {
            switch (obj)
            {
            case LispCodeFunction codeFunction:
                return($@"
``` lisp
; <in module {codeFunction.NameSymbol.PackageName}>
(DEFUN {codeFunction.NameSymbol.ToDisplayString(host.CurrentPackage)} ({codeFunction.ArgumentCollection}) ...)
```

{codeFunction.Documentation}".Trim());

            case LispFunction function:
                return($@"
``` lisp
; <native function>
; <in module {function.NameSymbol.PackageName}>
(DEFUN {function.NameSymbol.ToDisplayString(host.CurrentPackage)} (...) ...)
```

{function.Documentation}".Trim());

            case LispCodeMacro codeMacro:
                return($@"
``` lisp
; <in module {codeMacro.NameSymbol.PackageName}>
(DEFMACRO {codeMacro.NameSymbol.ToDisplayString(host.CurrentPackage)} ({codeMacro.ArgumentCollection}) ...)
```

TODO: documentation".Trim());

            case LispMacro macro:
                return($@"
``` lisp
; <native macro>
; <in module {macro.NameSymbol.PackageName}>
(DEFMACRO {macro.NameSymbol.ToDisplayString(host.CurrentPackage)} (...) ...)
```

TODO: documentation".Trim());

            case LispResolvedSymbol symbol:
                // TODO: don't display current package qualifier
                return($"`{symbol.Value}`: {host.GetValue(symbol.Value)}");

            default:
                return(obj?.ToString());
            }
        }
예제 #17
0
        internal void ReportError(LispError error, LispObject parent)
        {
            if (!error.SourceLocation.HasValue)
            {
                error.SourceLocation = parent?.SourceLocation;
            }

            if (error.StackFrame is null)
            {
                error.StackFrame = StackFrame;
            }

            PushArgument(error);
        }
예제 #18
0
        /// <summary>
        /// (ON-CHAT (@ "My Bot") (@ "hi"))
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public Object findSymbol(object obj, String s)
        {
            Package pkg = CurrentPackage();

            if (obj == null)
            {
                LispObject lo = pkg.findAccessibleSymbol(s);
                if (lo is Symbol)
                {
                    return(lo.getSymbolValue().javaInstance());
                }
            }
            throw new MissingMethodException("no function binding for " + s);
        } // method: findSymbol
예제 #19
0
        public string GetText(LispObject argument)
        {
            var sb = new StringBuilder();

            sb.Append(argument.ToString(useEscapeCharacters: true));
            var paddingWidth = Math.Max(0, Width - sb.Length);

            if (paddingWidth > 0)
            {
                sb.Append(new string(' ', paddingWidth));
            }

            return(sb.ToString());
        }
예제 #20
0
 internal void ExecuteToConsole(string command)
 {
     getInterpreter();
     if (buffer.IsNeedy())
     {
         buffer.AddToBuffer(command + "\n");
         buffer.needsChars = false;
     }
     else
     {
         buffer.SetBuffer("");
         econsole = command;
         ///new Thread(new ThreadStart(EConsole)).Start();
         LispObject lo = Evaluate(econsole);
         WriteText("==> " + lo.princToString() + "\r\n");
     }
     getInterpreter();
     return;
 }
예제 #21
0
        public Interpreter getInterpreter()
        {
            if (interpreter == null)
            {
                if (false)
                {
                    jlispThread = new Thread(new ThreadStart(StartJLISP));
                    jlispThread.Start();
                }
                else
                {
                    // StartInstanceBlocked();
                    // isReady = true;

                    jrunnable = new JRunnableLisp(this);
                    jthread   = new java.lang.Thread(jrunnable);
                    jthread.start();
                }
                while (!isReady)
                {
                    java.lang.Thread.sleep(1000);// Thread.Sleep(1000);// ironTextBoxControl.Update();
                    Yield();
                }
            }
            if (varPackage == null)
            {
                varPackage = Symbol._PACKAGE_;
            }
            LispObject pkg = varPackage.symbolValue();

            if (lastPackage != pkg)
            {
                lastPackage = pkg;
                //            ironTextBoxControl.Prompt = ((Package)pkg).getName() + "> ";
                //          ironTextBoxControl.getIronTextBox();

                // ironTextBoxControl.getIronTextBox().Parent;
                //ironTextBoxControl.ConsoleTextBox
            }
            return(interpreter);
        }
예제 #22
0
        public void HaltExecutionOnFunctionReturn()
        {
            var  host        = new LispHost();
            bool sentinelHit = false;

            host.AddFunction("SENTINEL", (host, executionState, args) =>
            {
                sentinelHit = true;
                return(new LispInteger(54));
            });
            LispObject capturedReturnValue = null;

            host.RootFrame.FunctionReturned += (s, e) =>
            {
                if (e.Frame.FunctionSymbol.Value == "COMMON-LISP-USER:INNER-FUNCTION")
                {
                    e.HaltExecution     = true;
                    capturedReturnValue = e.ReturnValue;
                }
            };
            var evalResult = host.Eval(@"
(defun inner-function ()
    42)
(defun outer-function ()
    (inner-function)
    (sentinel))
(outer-function)
");

            Assert.False(evalResult.ExecutionState.IsExecutionComplete);
            Assert.Equal(42, ((LispInteger)capturedReturnValue).Value);
            Assert.Equal(42, ((LispInteger)evalResult.LastResult).Value);
            Assert.False(sentinelHit);
            host.EvalContinue(evalResult.ExecutionState);
            Assert.True(evalResult.ExecutionState.IsExecutionComplete);
            Assert.Equal(54, ((LispInteger)evalResult.LastResult).Value);
            Assert.True(sentinelHit);
        }
예제 #23
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, String s, LispObject[] args)
        {
            Object target  = null;
            int    indexOf = s.IndexOf(".");

            if (indexOf > 0)
            {
                String s1 = s.Substring(0, indexOf);
                target = findSymbol(target, s1);
                if (target != null)
                {
                    ((ScriptInterpreter)this).Intern(s1, target);
                }
                Package    pkg = CurrentPackage();
                Symbol     sym = pkg.findAccessibleSymbol(s);
                LispObject sf  = sym.getSymbolFunction();
                if (sf != null)
                {
                    if (sf != lsp)
                    {
                        return(sf.execute(args));
                    }
                }

                s = s.Substring(indexOf + 1);
                Object o = clojExecute(target, s, args);
                return(JavaObject.getInstance(o));
            }
            else
            {
                String s1 = s;
                target = findSymbol(target, s1);
                Object o = clojExecute(target, "", args);
                return(JavaObject.getInstance(o));
            }
        }
예제 #24
0
        internal Object clojExecute(object target, String s, LispObject[] args)
        {
            int index = 0;
            int found = -1;
            char[] cs = s.ToCharArray();
            char c = cs[index];
            while (index < cs.Length && found==-1)
            {
                switch (c)
                {
                    case ':':
                    case '/':
                    case '.':
                        found = index;
                        break;

                    default:
                        index++;
                        break;
                } // switch
            }

            int indexOf = s.IndexOf(".");
            while (indexOf > 0)
            {
                String s1 = s.Substring(0, indexOf - 1);
                target = findSymbol(target, s1);
                s = s.Substring(indexOf + 1);
                indexOf = s.IndexOf(".");
            }
            throw new MissingMethodException("no function binding for " + target + " .  " + s + " arg= " + args);
        }
예제 #25
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, Symbol previous, LispObject[] args)
        {
            LispObject pv = previous.getSymbolValue();
            LispObject pf = previous.getSymbolFunction();
            if (lsp == pf)
            {

            }
            String s = ((Symbol)previous).getName();
            return clojEval(lsp, s, args);
        }
예제 #26
0
 public LispEvaluatorFunctionExit(LispFunction function, LispObject invocationExpression, bool popFrame = true)
 {
     Function             = function;
     InvocationExpression = invocationExpression;
     PopFrame             = popFrame;
 }
예제 #27
0
파일: Macro.cs 프로젝트: nja/keel
 public Macro(string name, LispObject lambdaList, Cons macroBody, LispEnvironment macroEnv)
 {
     this.name = name;
     this.expander = new Lambda(lambdaList, macroBody, macroEnv);
     this.macroEnv = macroEnv;
 }
예제 #28
0
파일: LispEnvironment.cs 프로젝트: nja/keel
 public void SetValue(Symbol symbol, LispObject value)
 {
     if (dict.ContainsKey(symbol))
     {
         dict[symbol] = value;
     }
     else if (!IsRoot)
     {
         parent.SetValue(symbol, value);
     }
     else
     {
         throw new EnvironmentException("No binding for " + symbol);
     }
 }
예제 #29
0
 public LispObjectReaderResult(LispObject lastResult, string incompleteInput, int expressionDepth)
 {
     LastResult      = lastResult;
     IncompleteInput = incompleteInput;
     ExpressionDepth = expressionDepth;
 }
예제 #30
0
 public CSThrowError(LispObject prev)
     : base("CSThrowError", "datum &rest arguments")
 {
     previous = prev;
 }
예제 #31
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="args"></param>
 public override LispObject execute(LispObject[] args)
 {
     return (LispObject)dynamicDelagate.DynamicInvoke(args);
 } // method: execute
예제 #32
0
파일: LispEnvironment.cs 프로젝트: nja/keel
        public LispObject Eval(LispObject expr)
        {
            if (expr is Symbol)
            {
                return LookUp((Symbol)expr);
            }

            if (expr.IsAtom)
            {
                return expr;
            }

            if (this.specials.IsSpecial((Cons)expr))
            {
                return this.specials.Eval((Cons)expr, this);
            }

            if (this.IsMacro((Cons)expr))
            {
                Cons expansion;
                MacroExpand.Expand((Cons)expr, this, out expansion);
                return this.Eval(expansion);
            }

            var funVal = this.Eval(Car.Of(expr));
            var fun = funVal.As<Function>();

            var arguments = Cdr.Of(expr);
            var argumentValues = Cons.ToList(arguments.As<Cons>().Select(this.Eval));

            return fun.Apply(argumentValues, this);
        }
예제 #33
0
파일: LispEnvironment.cs 프로젝트: nja/keel
 public void AddBinding(string symbolName, LispObject value)
 {
     AddBinding(Symbols.Intern(Symbol.Canonicalize(symbolName)), value);
 }
예제 #34
0
파일: LispEnvironment.cs 프로젝트: nja/keel
        public bool TryLookUp(Symbol symbol, out LispObject value)
        {
            if (dict.TryGetValue(symbol, out value))
            {
                return true;
            }

            if (!this.IsRoot)
            {
                return this.parent.TryLookUp(symbol, out value);
            }

            return false;
        }
예제 #35
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, String s, LispObject[] args)
        {
            Object target = null;
            int indexOf = s.IndexOf(".");
            if (indexOf > 0)
            {
                String s1 = s.Substring(0, indexOf );
                target = findSymbol(target, s1);
                if (target != null)
                {
                   ((ScriptInterpreter)this).Intern(s1, target);
                   
                }
                Package pkg = CurrentPackage();
                Symbol sym = pkg.findAccessibleSymbol(s);
                LispObject sf = sym.getSymbolFunction();
                if (sf!=null)
                {
                    if (sf!=lsp)
                    {
                        return sf.execute(args);
                    }

                }

                s = s.Substring(indexOf + 1);
                Object o = clojExecute(target, s, args);
                return JavaObject.getInstance(o);
            } else {
            String s1 = s;
            target = findSymbol(target, s1);
            Object o = clojExecute(target, "", args);
            return JavaObject.getInstance(o);
            }
        }
예제 #36
0
파일: ReaderTest.cs 프로젝트: nja/keel
        private void AssertList(LispObject list, List<Token> tokens)
        {
            if (list.IsNil)
            {
                Assert.IsEmpty(tokens);
            }
            else
            {
                var cons = (Cons)list;
                var symbol = (Symbol)cons.Car;

                Assert.That(symbol.SameName(tokens[0].Name));

                AssertList(cons.Cdr, tokens.GetRange(1, tokens.Count - 1));
            }
        }
예제 #37
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="args"></param>
 public override LispObject execute(LispObject[] args)
 {
     return ABCLInterpreter.COMMON_ABCLInterpreter.clojEval(this,previous,args);
 } // method: execute
예제 #38
0
 public virtual void SetValue(LispResolvedSymbol symbol, LispObject value)
 {
     _values[symbol.Value] = value;
     Root.OnValueSet(symbol, value, this);
 }
예제 #39
0
 public LispException(LispObject value)
 {
     Value = value;
 }
예제 #40
0
파일: LispEnvironment.cs 프로젝트: nja/keel
        public void Extend(LispObject lambdaList, Cons values)
        {
            if (lambdaList.IsNil)
            {
                if (values.IsNil)
                {
                    return;
                }

                throw new EnvironmentException("Too many values when extending environment");
            }

            if (lambdaList.IsAtom)
            {
                this.AddBinding(lambdaList.As<Symbol>(), values);
            }
            else
            {
                if (values.IsNil)
                {
                    throw new EnvironmentException("Too few values when extending environment");
                }

                this.AddBinding(Car.Of(lambdaList).As<Symbol>(), values.Car);
                this.Extend(Cdr.Of(lambdaList), values.Cdr.As<Cons>());
            }
        }
예제 #41
0
        internal void SetValueInParentScope(LispResolvedSymbol symbol, LispObject value)
        {
            var target = Parent ?? this;

            target.SetValue(symbol, value);
        }
예제 #42
0
        internal static LispExecutionState CreateExecutionState(LispStackFrame stackFrame, string inputName, LispObject obj, bool useTailCalls, bool allowHalting, bool createDribbleInstructions)
        {
            var executionState = CreateExecutionState(stackFrame, inputName, string.Empty, useTailCalls, allowHalting);

            executionState.InsertObjectOperations(obj, createDribbleInstructions);
            return(executionState);
        }
 public LispEvaluatingExpressionEventArgs(LispObject expression, LispStackFrame stackFrame)
 {
     Expression = expression;
     StackFrame = stackFrame;
 }
예제 #44
0
 public LispParseResult(LispHost host, LispObject obj, LispSourceBindings bindings)
 {
     Host     = host;
     Object   = obj;
     Bindings = bindings;
 }
예제 #45
0
 private Package CurrentPackage()
 {
     lastPackage = org.armedbear.lisp.Lisp.getCurrentPackage();
     return (Package)lastPackage;
 }
예제 #46
0
        public Interpreter getInterpreter()
        {
            if (interpreter == null)
            {
                jlispThread = new Thread(new ThreadStart(StartJLISP));
                jlispThread.Start();
                while (interpreter == null)
                {
                    ironTextBoxControl.Update();
                }
            }
            if (varPackage == null)
            {
                varPackage = Symbol._PACKAGE_;
            }
            LispObject pkg = varPackage.symbolValue();
            if (lastPackage != pkg)
            {
                lastPackage = pkg;
                ironTextBoxControl.Prompt = ((Package)pkg).getName() + "> ";
                //ironTextBoxControl.ConsoleTextBox
            }
            return interpreter;

        }
예제 #47
0
 internal void PushArgument(LispObject argument)
 {
     _argumentStack.Push(argument);
 }
예제 #48
0
        public Interpreter getInterpreter()
        {
            if (interpreter == null)
            {
                if (false)
                {
                    jlispThread = new Thread(new ThreadStart(StartJLISP));
                    jlispThread.Start();
                }
                else
                {
                    // StartInstanceBlocked();
                    // isReady = true;

                    jrunnable = new JRunnableLisp(this);
                    jthread = new java.lang.Thread(jrunnable);
                    jthread.start();
                }
                while (!isReady)
                {
                    java.lang.Thread.sleep(1000);// Thread.Sleep(1000);// ironTextBoxControl.Update();
                    Yield();
                }
            }
            if (varPackage == null)
            {
                varPackage = Symbol._PACKAGE_;
            }
            LispObject pkg = varPackage.symbolValue();
            if (lastPackage != pkg)
            {
                lastPackage = pkg;
                //            ironTextBoxControl.Prompt = ((Package)pkg).getName() + "> ";
                //          ironTextBoxControl.getIronTextBox();

                // ironTextBoxControl.getIronTextBox().Parent;
                //ironTextBoxControl.ConsoleTextBox
            }
            return interpreter;

        }       
예제 #49
0
파일: Car.cs 프로젝트: nja/keel
 public static LispObject Of(LispObject x)
 {
     return x.As<Cons>().Car;
 }
예제 #50
0
 internal LispObject makeFunction(LispObject lispObject)
 {
     return new LateSymbolPrimitive((Symbol)lispObject);
 }
예제 #51
0
파일: Function.cs 프로젝트: nja/keel
 public Function(LispObject args)
 {
     this.args = args;
 }
예제 #52
0
 internal LispObject makeVariable(LispObject lispObject)
 {
     WriteLine("faking " + lispObject);
     return lispObject;
     //throw new Exception("The method or operation is not implemented.");
 }