// -*- c++ -*- #pragma once #ifndef __RUCY_SYMBOL_H__ #define __RUCY_SYMBOL_H__ #include #define SYMBOL(name, str) static const Rucy::Symbol name (str) #define SYM(s) SYMBOL(s, #s) #define SYM_Q(s) SYMBOL(s, #s "?") #define SYM_B(s) SYMBOL(s, #s "!") namespace Rucy { class Symbol { public: Symbol (); Symbol (ID id); Symbol (const char* str); ID id () const; const char* c_str () const; operator bool () const; bool operator ! () const; private: ID id_; };// Symbol }// Rucy #endif//EOH