#ifndef __RegExpNFASub_h
#define __RegExpNFASub_h

//----- _xZkqqHx_jFjEjFkKjFlGiOjKjHpBiDiMiDfCiBfLiDgI_xHqqkZx_ -----
struct MatchStrRec
{
	CTCP	tcpFrom;
	CTCP	tcpTo;
}; // struct MatchStrRec.

typedef vector<MatchStrRec> MatchStrRecVector;

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	RegExpNFASub
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAlDiLeLjFfMiMlLiDeJiDhFiDfHiDeGiDeOiDgHiDeOiDiJiDfIiCmMiOmAjBmMiDeOiDiJiDfIiBeC_xHqqkZx_RegExpNFA_xZkqqHx_iDeOiDiJiDfIiCmNiBeB_xHqqkZx_
 *			Export_xZkqqHx_jHhAiCmMiDfPiDhOiBfLiDeOiDiJiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.16 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class RegExpNFASub : public FmRegExpNFA
{
public:
	RegExpNFASub ();
	virtual ~RegExpNFASub ();
	virtual DllExport BOOL	IsMatch (WORD& wPreChar, CTCP& tcpStr, CTCP tcpStrEnd);
	virtual DllExport BOOL	SetExpression (CTCP& tcsExp, WORD wFlags = DREX_EXP_NONE, DWORD dwQTimes = 500);
	virtual DllExport long	GetMatchStrSize ();
	virtual DllExport void	GetMatchStr (CTCP& tcpFrom, CTCP& tcpTo, long lIdx);

protected:
	virtual BOOL	MkNodeGeneral (RegExpNode* pPre2Node, RegExpNode* pPreNode,
									CTCP& tcpHead);
	virtual BOOL	MkNodeQuantCode (RegExpNode* pPre2Node, RegExpNode* pPreNode,
									WORD wPreChar, CTCP& tcpHead);
	virtual BOOL	MkNodeAssertCode (RegExpNode* pPre2Node, RegExpNode* pPreNode,
									WORD wPreChar, CTCP& tcpHead);
	virtual BOOL	MkNodeOpenPareCode (RegExpNode* pPre2Node, RegExpNode* pPreNode,
										WORD wPreChar, CTCP& tcpHead);
	virtual BOOL	MkNodeClosePareCode (RegExpNode* pPre2Node, RegExpNode* pPreNode,
										WORD wPreChar, CTCP& tcpHead);
	virtual BOOL	MkNodeEnumChar (RegExpNode* pPre2Node, RegExpNode* pPreNode,
									WORD wPreChar, CTCP& tcpHead);
	virtual BOOL	MkNodeAmbigChar (RegExpNode* pPre2Node, RegExpNode* pPreNode,
									WORD wPreChar, CTCP& tcpHead);
	virtual BOOL	MkNodeLetterChar (RegExpNode* pPre2Node, RegExpNode* pPreNode,
									WORD wPreChar, CTCP& tcpHead);

protected:
	RegExpNode*		m_pNode;		// _xZkqqHx_iDgNiBfLiDgIiDgDiDiKiBfLiCmMiDgHiDgCiDhGiBeC_xHqqkZx_
	WORD			m_wFlags;		// _xZkqqHx_jFmPiKlHiDeJiDhGiDfGiDiHiDjDiDhEiDiJiDePiBeC_xHqqkZx_
	DWORD			m_dwQTimes;		// _xZkqqHx_jHmKiOhHjCoIiOhBiCmMiMeKiCoIjFnEiClFiJpBjAjEiBeC_xHqqkZx_
	BOOL			m_bPareOpening;	// _xZkqqHx_jFjEjFkKjFlGiOjKjHpBiKiHiMmKiDeJiBfLiDhGiDjDjCiGiBeC_xHqqkZx_
	BOOL			m_bGetMatchStr;	// _xZkqqHx_jFjEjFkKjFlGiOjKjHpBiDiKiDfIiDgHiCpAiDgNiBfLiDgIjCiGiCkJiCoHiOoGjDlOiClFiClNiCkJiBeI_xHqqkZx_
	MatchStrRecVector m_vMatchStr;	// _xZkqqHx_jFjEjFkKjFlGiOjKjHpBiDiKiDfIiDgHiBeC_xHqqkZx_
}; // class RegExpNFASub.

#endif//!__RegExpNFASub_h
