// ------------------------------------------------------------
//  Copyright (C) 2002-2003 Michael Zeilfelder
//  e-mail: info@michaelzeilfelder.de
//
//  This program is published under the terms of the GNU
//  General Public License version 2 as published by the Free
//  Software Foundation.
// ------------------------------------------------------------
#include "Lisp.h"

int main()
{
    LispInterpreter lisp;
    string str;

    while ( 1)
    {
        getline(cin, str);

        lisp.Tokenize(str);

//    lisp.Tokenize("(+ 3.2 (+ 10 -13 (* -0.1 2 1 5)) 20.1 10 52.4)");
//    lisp.Tokenize("(+ 3 20 (* 5 2) 52.4)");
//    lisp.Tokenize("(QUOTE hell goes around)");
//    cout << "Tokens" << endl;
//    lisp.ShowTokens();

        lisp.Parse();
//    cout << "After Parse" << endl;
  //  lisp.Print();
        lisp.Evaluate();
//    cout << "Eval:" << endl;
        lisp.Print();
    }


    return 0;
}

/*
    (+ 3 20 (* 5 2) 52.4)

    + .
      3  .
        20 .
           .        .
           5 .      52.4
             2
*/
