#ifndef INCLUDED_SEMANTIC_ #define INCLUDED_SEMANTIC_ #include #include union Semantic { friend std::ostream &operator<<(std::ostream &out, Semantic const &obj); std::pair d_int; std::pair d_str; public: enum Type { INT, IDENTIFIER }; Semantic(); Semantic(Type type, char const *txt); Semantic(Semantic const &other); // 2 ~Semantic(); Semantic &operator=(Semantic const &rhs); void swap(Semantic &other); }; inline Semantic::Semantic() : d_int {INT, 0} {} #endif