
#ifndef DKUTIL_PARSER_SPIRIT_SJIS_DIFINITION_HPP
#define DKUTIL_PARSER_SPIRIT_SJIS_DIFINITION_HPP

#include <dkutil/parser/sjis_util.hpp>

namespace dkutil{
	namespace semantic_action{
///日本語SJISの1byte目パーサー
struct sjis2parser : public boost::spirit::char_parser<kanzi_parser >
{
    typedef kanzi_parser self_t;
		/*template<typename CharT>
		struct traits{
			enum{
				value = sizeof(CharT),
			};

		};
		*/
    kanzi_parser() {}

    template <typename CharT>
    bool test(CharT ch) const
    { return dkcIsSJIS1(ch); }
};

///日本語SJISの2byte目パーサー
struct sjis2parser : public boost::spirit::char_parser<kanzi_parser >
{
    typedef kanzi_parser self_t;
		/*template<typename CharT>
		struct traits{
			enum{
				value = sizeof(CharT),
			};

		};
		*/
    sjis2parser() {}

    template <typename CharT>
    bool test(CharT ch) const
    { return dkcIsSJIS2(ch); }
};
	}//eon

}//end of dkutil namespace




#endif//end of include once
