OSDN Git Service

delimiter.h/cppを、term_lexer、term_checkerとしてテンプレートを利用するように分離した。
[simplecms/utakata.git] / src / lexeme.h
index 233cb44..796ca9f 100755 (executable)
@@ -5,8 +5,7 @@
 #ifndef _DEVELOP_UTAKATA_SRC_LEXEME_H_
 #define _DEVELOP_UTAKATA_SRC_LEXEME_H_
 
-#include "src/common/uncopyable.h"
-#include "src/common/scoped_ptr.h"
+#include "lib/scoped_ptr.h"
 
 namespace utakata {
 
@@ -16,7 +15,7 @@ class UniString;
 
 namespace lexer {
 
-class Lexeme : private utility::Uncopyable {
+class Lexeme {
   // 各非終端記号を表すためのクラスです。このクラスは、各Lexerによって
   // 作成され、一度作成された後は変更されることはありません。
   // 実際にはこのクラスより、それぞれの値に評価されます。
@@ -43,11 +42,16 @@ class Lexeme : private utility::Uncopyable {
     kUnsyntaxSplicing,
     kUnquote,
     kUnquoteSplicing,
+    kUnToken,
   };
 
+  Lexeme() : string_(), type_(kUnToken) {}
   Lexeme(const unicode::UniString& lexeme_str, const LexemeType type);
+  Lexeme(const Lexeme& other);
   virtual ~Lexeme() {}
 
+  Lexeme& operator=(const Lexeme& rh);
+
   // 各非終端記号などの型を表すenum値を返します。
   const LexemeType type() const {return type_;}
 
@@ -56,7 +60,7 @@ class Lexeme : private utility::Uncopyable {
 
  private:
   // lexemeを表す文字列です。
-  utility::scoped_ptr<unicode::UniString> string_;
+  akebono::scoped_ptr<unicode::UniString> string_;
 
   // lexemeの型を表すEnum値です。
   LexemeType type_;