#ifndef __FmRegExp_h_C96A3C6C_1563_4a90_B108_60EECD94A103
#define __FmRegExp_h_C96A3C6C_1563_4a90_B108_60EECD94A103

/*************************************************************************
 * <_xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_>	FmRegExpNFA.h
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLiDiJiDeDiDhFiDiJiDiKiCmM_xHqqkZx_Export_xZkqqHx_jHhAiDhHiDgCiDfPiDhEiDeAiDeDiDiLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iMlLiNnNiCmMiDfEiDhMiBfLiDgHjFlGiOjKiOoNiCmNiImIiJlKiBeC_xHqqkZx_
 *			'*'		:Quantifier(_xZkqqHx_jHmKiOhHjCoIiOhB_xHqqkZx_)_xZkqqHx_iBeCiCePiJpBiImIiPoDiBeC_xHqqkZx_
 *			'+'		:Quantifier(_xZkqqHx_jHmKiOhHjCoIiOhB_xHqqkZx_)_xZkqqHx_iBeCiCfAiJpBiImIiPoDiBeC_xHqqkZx_
 *			'?'		:Quantifier(_xZkqqHx_jHmKiOhHjCoIiOhB_xHqqkZx_)_xZkqqHx_iBeCiCePiJpBiIlNiCkCiCmNiCfAiJpBiBeC_xHqqkZx_
 *			'^'		:Assertion(_xZkqqHx_iMlOjGlOiOhB_xHqqkZx_)_xZkqqHx_iBeCiNhDjDkKiBeC_xHqqkZx_
 *			'$'		:Assertion(_xZkqqHx_iMlOjGlOiOhB_xHqqkZx_)_xZkqqHx_iBeCiNhDjGjGiBeC_xHqqkZx_
 *			'\b'	:Assertion(_xZkqqHx_iMlOjGlOiOhB_xHqqkZx_)_xZkqqHx_iBeCjCfAiMoKiLkLiKeFiBeCjCfAiMoKiLkLiKeFiCmGiCmNiBeBiImIiJlKiCmM_xHqqkZx_
 *					 _xZkqqHx_jFlGiOjKiOoNiCmMiLkLiCpAjClCiCnHiCoJiBeC_xHqqkZ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jDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/

#ifdef  _WIDE_CHAR
// 06.09.07 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//typedef const WORD*	CTCP;
typedef const wchar_t*	CTCP;
#else //_WIDE_CHAR
typedef const char*	CTCP;
#endif//_WIDE_CHAR

#define DllExport	__declspec(dllexport)

class FmRegExpNFA;

//----- SetExpression::wFlags_xZkqqHx_iCmMiDeJiDhGiDfGiDiHiDjDiOhHjCoIiDhEiDiJiDeP_xHqqkZx_ -----
enum
{
	DREX_EXP_NONE			= 0,
	DREX_EXP_TO_UPCASE		= 0x0001,			// _xZkqqHx_iMjPiNpFiOkOiCmMjFlGiOjKjFjEjFkKiCpAjDoAjFjEiCmFjBoFjFlGiOjKiCnGjFmPiKlHiBeC_xHqqkZx_
// 06.09.07 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	DREX_EXP_ALLOW_SINGLE_ASSERTION = 0x0002,	// _xZkqqHx_iMlOjGlOiOhBiCmMjCfAjDmGjHjIjHhAiCpAiLjGiJmCiBeC_xHqqkZx_
};

//----- 05.05.10 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
typedef FmRegExpNFA* (*FuncFmfCreate)();
typedef void (*FuncFmfDelete) (FmRegExpNFA* pNFA);

extern DllExport FmRegExpNFA* FmfCreate ();
extern DllExport void FmfDelete (FmRegExpNFA* pNFA);
//----- 05.05.10 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FmRegExpNFA
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLiDeJiDhFiDfHiDeGiDeOiDgHiDeOiDiJiDfIiBeC_xHqqkZx_Export_xZkqqHx_jHhAiDfPiDhOiBfLiDeOiDiJiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	1.FmRegExpNFA::Create_xZkqqHx_iKnGjAjEiCmJiCoGiCoIiBeBiClBiCmMiDeJiDhFiDfHiDeGiDeOiDgHiCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *			2._xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiDiBiDjDiDgPiKnGjAjE_xHqqkZx_ SetExpression _xZkqqHx_iCmFiBeBjAlDiLeLjFfMiMlLiOkOiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *			3._xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiDiBiDjDiDgPiKnGjAjE_xHqqkZx_ IsMatch _xZkqqHx_iCmFiBeBjFlGiOjKjHpBiCpAiMjPiNpFiClHiCoJiBeC_xHqqkZx_
 *			4.FmRegExpNFA::Delete_xZkqqHx_iKnGjAjEiCmJiCoGiCoIiBeBiClBiCmMiDeJiDhFiDfHiDeGiDeOiDgHiCpAiNoNiPjMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.16 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class FmRegExpNFA
{
public:
	virtual BOOL	IsMatch (WORD& wPreChar, CTCP& tcpStr, CTCP tcpStrEnd = NULL) = 0;
	virtual BOOL	SetExpression (CTCP& tcsExp, WORD wFlags = DREX_EXP_NONE, DWORD dwQTimes = 500) = 0;
	virtual long	GetMatchStrSize () = 0;
	virtual void	GetMatchStr (CTCP& tcpFrom, CTCP& tcpTo, long lIdx) = 0;
//----- 05.05.11 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//public:
//	static DllExport FmRegExpNFA* Create ()
//		{ return FmfCreate(); }
//	static DllExport void Delete (FmRegExpNFA* pNFA)
//		{ FmfDelete(pNFA); }
//----- 05.05.11 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
}; // class FmRegExpNFA.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FmRegExpNFA::Create
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLiDeJiDhFiDfHiDeGiDeOiDgHiNoMjAkMiKnGjAjEiBeC_xHqqkZx_DLL_xZkqqHx_iCmM_xHqqkZx_Export_xZkqqHx_jHhAiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLiDeJiDhFiDfHiDeGiDeOiDgHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.16 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FmRegExpNFA::Delete
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLiDeJiDhFiDfHiDeGiDeOiDgHiNoNiPjMiKnGjAjEiBeC_xHqqkZx_DLL_xZkqqHx_iCmM_xHqqkZx_Export_xZkqqHx_jHhAiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFmPjAjE_xHqqkZx_>	pNFA	:_xZkqqHx_jAlDiLeLjFfMiMlLiDeJiDhFiDfHiDeGiDeOiDgHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.16 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	RegExpNFASub::IsMatch
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFlGiOjKjHpBiCkKjAlDiLeLjFfMiMlLiCmJiIoKjChGiClFiCmEiCkCiCoJiCkJiCmHiCk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nMiCmF_xHqqkZx_IsMatch_xZkqqHx_iKnGjAjE_xHqqkZx_
 *			_xZkqqHx_iCpAiOmAiNhDiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iNmFiPiJiCmNiBeB_xHqqkZx_wPreChar = 0, tcpStr = &A_xZkqqHx_iBeC_xHqqkZx_
 *			_xZkqqHx_iOjPiCmNiBeB_xHqqkZx_wPreChar = 'A', tcpStr = &B_xZkqqHx_iBeC_xHqqkZx_
 *			_xZkqqHx_iOjPiCmNiBeB_xHqqkZx_wPreChar = 'B', tcpStr = &C_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	tcpStr_xZkqqHx_iCmMiImKjChFiCkJiCoHiClFiCkJiMjPiNpFiClFiCmIiCkCiClBiCmGiCmJjCiNiInDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	98.12.12 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	RegExpNFASub::SetExpression
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLiCmMiMjPiNpFiOkOjFlGiOjKjHpBiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	tcsExp	:_xZkqqHx_iMjPiNpFiOkOjFlGiOjKjHpBiCpAjAnNjCoIiClHiCoJiBeCiDeHiDiJiBfLjEkNjAlGiImKjChFiCpAjFnEiClHiBeC_xHqqkZx_
 *			wFlags	:_xZkqqHx_iMjPiNpFiOkOiJpAjAmNiOjOiCmMiDeJiDhGiDfGiDiHiDjDiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *			dwQTimes:Quantifier(*,+)_xZkqqHx_iCmMiNmFjBoFiCmMiMeKiCoIjFnEiClFiJpBjAjEiCpAiOhHjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAlDiPoNiCmIiCoHiCmO_xHqqkZx_ TRUE_xZkqqHx_iBeBiDeHiDiJiBfLiCmIiCoHiCmO_xHqqkZx_ FALSE _xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	98.12.12 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	RegExpNFASub::GetMatchStrSize
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLjCiGiCmM_xHqqkZx_"()"_xZkqqHx_iCmFiKgNjFnLiClDiCoKiClNjFjEjFkKjFlGiOjKjHpBiDiKiDfIiDgHiCmMiDfEiDeDiDfJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFjEjFkKjFlGiOjKjHpBiDiKiDfIiDgHiCmMiDfEiDeDiDfJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.16 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	RegExpNFASub::GetMatchStr
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiCmMjFjEjFkKjFlGiOjKjHpBiCmMjEmNiImNiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFmPjAjE_xHqqkZx_>	tcpFrom	:_xZkqqHx_jEmNiImNiCmMiNmFiPiJiCmMjFlGiOjKiImKjChFiCpAjFnEiClHiBeC_xHqqkZx_
 *			tcpTo	:_xZkqqHx_jEmNiImNiCmMiNmFiMoDiCmMjFlGiOjKiImKjChFiCpAjFnEiClHiBeC_xHqqkZx_
 *			lIdx	:_xZkqqHx_iOoGjDlOiClHiCoJjFjEjFkKjFlGiOjKjHpBiCmMiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.16 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/

#endif//!__FmRegExp_h_C96A3C6C_1563_4a90_B108_60EECD94A103
