Click here to Skip to main content
15,887,485 members
Articles / Programming Languages / C++

Fast regular expressions

Rate me:
Please Sign up or sign in to vote.
4.85/5 (19 votes)
29 Oct 2000 362.1K   5.2K   104  
Compiles a regular expression into a fast automaton.
// RexFileProcessor.h: interface for the CRexFileProcessor class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_REXFILEPROCESSOR_H__D25DB4A4_A437_11D4_8FAF_BA1D2C9EFD43__INCLUDED_)
#define AFX_REXFILEPROCESSOR_H__D25DB4A4_A437_11D4_8FAF_BA1D2C9EFD43__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "SearchInterface.h"

class CRexFileProcessor : public CFileProcessor  
{
public:
	CRexFileProcessor();
    virtual REXI_DefErr   AddRegDefinition(const char* pcszName,const char* pcszRegExp);
    virtual REXI_DefErr   SetRegExpression(const char* pcszExpr);
    virtual void                ProcessFile(CSearchResult& pResult,
        const char* pcszPathName,const char* pcszFileName,bool bLinewise,bool bAtMostOneMatchPerLine);
	virtual ~CRexFileProcessor();
private:    
    REXI_Search m_rexSearch;
};

#endif // !defined(AFX_REXFILEPROCESSOR_H__D25DB4A4_A437_11D4_8FAF_BA1D2C9EFD43__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions