00001
00781 #ifndef CELL_HPP
00782 #define CELL_HPP
00783
00784 #include <cstddef>
00785 #include <cstdlib>
00786 #include <iostream>
00787 #include <fstream>
00788 #include <sstream>
00789 #include <string>
00790 #include <stack>
00791
00792 using namespace std;
00793
00798 class Cell {
00799 public:
00800
00804 Cell(const int i);
00805
00809 Cell(const double d);
00810
00814 Cell(const char* const s);
00815
00819 Cell(Cell* const my_car, Cell* const my_cdr);
00820
00825 bool is_int() const;
00826
00831 bool is_double() const;
00832
00837 bool is_symbol() const;
00838
00843 bool is_cons() const;
00844
00849 int get_int() const;
00850
00855 double get_double() const;
00856
00861 string get_symbol() const;
00862
00867 Cell* get_car() const;
00868
00873 Cell* get_cdr() const;
00874
00879 void print(ostream& os = cout) const;
00880
00881 private:
00882
00883 string sexpr_m;
00884
00885 };
00886
00887
00888
00889
00890 extern Cell* const nil;
00891
00892 #endif // CELL_HPP