コード例 #1
0
ファイル: MetaLexer.cpp プロジェクト: Angelineguan/Spire
	void MetaLexer::SetLexProfile(String lex)
	{
		Errors.Clear();
		ParseLexProfile(lex);
		if (!Errors.Count())
			ConstructDFA();
		else
			dfa = 0;
	}
コード例 #2
0
BOOL CDFA::RegExpToDFA(CString strPattern)
{
    BOOL bRet = FALSE;

    if ("" == strPattern)
        goto Exit0;

    if (strPattern == m_strPattern)
        return TRUE;

    CHECK_BOOL ( m_TreeConstructer.SetPattern(strPattern) );
    CHECK_BOOL ( ConstructDFA() );

    bRet = TRUE;
Exit0:
    return bRet;
}