Beispiel #1
0
        private static string BodyToString(Vector vector)
        {
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < vector.Length; i++)
            {
                if (sb.Length != 0)
                {
                    sb.Append(" ");
                }
                sb.Append(LispPrinter.ToString(vector[i]));
            }
            return(sb.ToString());
        }
Beispiel #2
0
        private static string BodyToString(BNode node)
        {
            string shead = LispPrinter.ToString(node.Head);

            if (node.Tail is BNodeNil)
            {
                return(shead);
            }
            else if (node.Tail is BNode)
            {
                return(string.Concat(shead, " ", BodyToString((BNode)node.Tail)));
            }
            else
            {
                return(string.Concat(shead, " . ", LispPrinter.ToString(node.Tail)));
            }
        }
Beispiel #3
0
 public override string ToString()
 {
     return(LispPrinter.ToString(this));
 }