00001
00747 #ifndef CELL_HPP
00748 #define CELL_HPP
00749
00750 #include <cstddef>
00751 #include <cstdlib>
00752 #include <iostream>
00753 #include <fstream>
00754 #include <sstream>
00755 #include <string>
00756 #include <stack>
00757
00758
00763 class Cell {
00764 public:
00765
00769 Cell(const int i);
00770
00774 Cell(const double d);
00775
00779 Cell(const char* const s);
00780
00784 Cell(Cell* const my_car, Cell* const my_cdr);
00785
00790 bool is_int() const;
00791
00796 bool is_double() const;
00797
00802 bool is_symbol() const;
00803
00808 bool is_cons() const;
00809
00814 int get_int() const;
00815
00820 double get_double() const;
00821
00826 std::string get_symbol() const;
00827
00832 Cell* get_car() const;
00833
00838 Cell* get_cdr() const;
00839
00844 void print(std::ostream& os = std::cout) const;
00845
00846 private:
00847
00848 std::string sexpr_m;
00849
00850 };
00851
00852
00853
00854
00855 extern Cell* const nil;
00856
00857 #endif // CELL_HPP