OSDN Git Service

utf8_string, utf8となっていたものを、scheme中のUnicodeの基点となるUniCharとUniStringに正規化。
[simplecms/utakata.git] / sublexer_impl.h
index bf949c0..2608b45 100755 (executable)
@@ -7,7 +7,7 @@
 #include "smart_ptr.h"
 #include "utf8.h"
 #include "lexeme.h"
-#include "utf8_string.h"
+#include "unicode.h"
 
 
 namespace utakata {
@@ -41,7 +41,7 @@ namespace utakata {
         private:
 
             // lex関数中で利用される、雑多になった字句解析関数の分割
-            smart_ptr<lexeme::ILexeme> lex_(const utakata::utf8_string::UTF8String& str,
+            smart_ptr<lexeme::ILexeme> lex_(const utakata::unicode::UniString& str,
                                             smart_ptr<utakata::utf8::UTF8InputStream> stream,
                                             smart_ptr<ISubLexer>& next);
 
@@ -102,7 +102,7 @@ namespace utakata {
         private:
 
             // 渡された文字列のspecを判定する。
-            std::vector<unsigned char> parseCharSpec(const utf8_string::UTF8String& s);
+            std::vector<unsigned char> parseCharSpec(const unicode::UniString& s);
 
         };
 
@@ -116,7 +116,7 @@ namespace utakata {
             const unsigned char HEX;
         public:
 
-            NumberLexer(const utakata::utf8_string::UTF8String& str);
+            NumberLexer(const utakata::unicode::UniString& str);
             virtual ~NumberLexer(){}
 
             smart_ptr<lexeme::ILexeme> lex(smart_ptr<utakata::utf8::UTF8InputStream> stream,
@@ -125,17 +125,17 @@ namespace utakata {
 
             smart_ptr<lexeme::ILexeme> innerLex_(smart_ptr<utakata::utf8::UTF8InputStream> stream,
                                                  smart_ptr<ISubLexer>& next,
-                                                 const utakata::utf8_string::UTF8String& str);
+                                                 const utakata::unicode::UniString& str);
 
 
             // 渡した文字列からprefixを抽出して返す。
-            unsigned char getPrefix_(const utakata::utf8_string::UTF8String& str);
+            unsigned char getPrefix_(const utakata::unicode::UniString& str);
             // 正確性を抽出して返す。
-            void checkExactness_(const utakata::utf8_string::UTF8String& str); 
+            void checkExactness_(const utakata::unicode::UniString& str); 
 
         private:
             
-            smart_ptr<utakata::utf8_string::UTF8String> str_;
+            smart_ptr<utakata::unicode::UniString> str_;
 
             bool exact_;        // 正確性を設定する。
             unsigned char prefix_;       // prefixを設定する。
@@ -149,7 +149,7 @@ namespace utakata {
             // を保存する必要すらない。
         public:
 
-            IdentifierLexer(const utakata::utf8_string::UTF8String& str);
+            IdentifierLexer(const utakata::unicode::UniString& str);
             virtual ~IdentifierLexer(){}
 
             smart_ptr<lexeme::ILexeme> lex(smart_ptr<utakata::utf8::UTF8InputStream> stream,
@@ -157,7 +157,7 @@ namespace utakata {
 
         private:
 
-            smart_ptr<utakata::utf8_string::UTF8String> str_;
+            smart_ptr<utakata::unicode::UniString> str_;
         };
 
         class BooleanLexer : public ISubLexer
@@ -166,7 +166,7 @@ namespace utakata {
             // いずれかの次には、必ず区切り文字がなければならない。
         public:
 
-            BooleanLexer(const utakata::utf8_string::UTF8Char& ch);
+            BooleanLexer(const utakata::unicode::UniChar& ch);
             virtual ~BooleanLexer(){}
 
             smart_ptr<lexeme::ILexeme> lex(smart_ptr<utakata::utf8::UTF8InputStream> stream,
@@ -174,7 +174,7 @@ namespace utakata {
 
         private:
 
-            smart_ptr<utakata::utf8_string::UTF8Char> ch_;
+            smart_ptr<utakata::unicode::UniChar> ch_;
         };
 
         class ByteVectorLexer : public ISubLexer
@@ -183,7 +183,7 @@ namespace utakata {
             // vu8ではない場合には、エラーとなる。
         public:
 
-            ByteVectorLexer(const utakata::utf8_string::UTF8Char& ch);
+            ByteVectorLexer(const utakata::unicode::UniChar& ch);
             virtual ~ByteVectorLexer(){}
 
             smart_ptr<lexeme::ILexeme> lex(smart_ptr<utakata::utf8::UTF8InputStream> stream,
@@ -191,7 +191,7 @@ namespace utakata {
 
         private:
 
-            smart_ptr<utakata::utf8_string::UTF8Char> ch_;
+            smart_ptr<utakata::unicode::UniChar> ch_;
         };
 
     };