00001
00785 #ifndef CELL_HPP
00786 #define CELL_HPP
00787
00788 #include <cstddef>
00789 #include <cstdlib>
00790 #include <iostream>
00791 #include <fstream>
00792 #include <sstream>
00793 #include <string>
00794 #include <stack>
00795
00796 using namespace std;
00797
00802 class Cell {
00803 public:
00804
00808 Cell(const int i);
00809
00813 Cell(const double d);
00814
00818 Cell(const char* const s);
00819
00823 Cell(Cell* const my_car, Cell* const my_cdr);
00824
00829 bool is_int() const;
00830
00835 bool is_double() const;
00836
00841 bool is_symbol() const;
00842
00847 bool is_cons() const;
00848
00853 int get_int() const;
00854
00859 double get_double() const;
00860
00865 string get_symbol() const;
00866
00871 Cell* get_car() const;
00872
00877 Cell* get_cdr() const;
00878
00883 void print(ostream& os = cout) const;
00884
00885 private:
00886
00887 string sexpr_m;
00888
00889 };
00890
00891
00892
00893
00894 extern Cell* const nil;
00895
00896 #endif // CELL_HPP