コード例 #1
0
 public Object evalLispCode(Object lispCode)
 {
     try
     {
         if (lispCode == null)
         {
             return(null);
         }
         if (lispCode is String)
         {
             StringReader stringCodeReader = new StringReader(lispCode.ToString());
             lispCode = LispTaskInterperter.Read("evalLispString", stringCodeReader, WriteLine);
         }
         WriteLine("Eval> " + lispCode);
         if (LispTaskInterperter.Eof(lispCode))
         {
             return(lispCode.ToString());
         }
         return(LispTaskInterperter.Eval(lispCode));
     }
     catch (Exception e)
     {
         LogException("evalLispInterp lispCode=" + lispCode, e);
         throw e;
     }
 }
コード例 #2
0
 public Object evalLispReader(TextReader stringCodeReader)
 {
     try
     {
         Object r = LispTaskInterperter.Read("evalLispString", stringCodeReader, WriteLine);
         if (LispTaskInterperter.Eof(r))
         {
             return(r.ToString());
         }
         return(evalLispCode(r));
     }
     catch (Exception e)
     {
         LogException("evalLispInterp stringCodeReader", e);
         throw e;
     }
 }