1 #ifndef	rematch_h
2 #define	rematch_h
3 
4 static const char rematch_h_rcsid[]="$Id: rematch.h,v 1.2 1999/03/31 07:30:03 mrsam Exp $";
5 
6 #include	<sys/types.h>
7 // #include	<unistd.h>
8 #include	"config.h"
9 
10 ////////////////////////////////////////////////////////////////////////////
11 //
12 // ReMatch is an abstract class used in matching text against regular
13 // expression.  The matched text may come from a memory buffer, or a file.
14 // The matching logic does not care, and uses an abstracted data source,
15 // represented by this class, which supplies the text being matched,
16 // character by character.
17 //
18 // Also, in order to support the '!' operator, GetCurrentPos() and
19 // SetCurrentPos() functions must be implemented as a rudimentary "seek"
20 // mechanism.
21 //
22 ////////////////////////////////////////////////////////////////////////////
23 
24 class ReMatch {
25 public:
ReMatch()26 	ReMatch()	{}
27 	virtual ~ReMatch();
28 
29 	virtual int NextChar()=0;
30 	virtual int CurrentChar()=0;
31 	virtual off_t GetCurrentPos()=0;
32 	virtual void SetCurrentPos(off_t)=0;
33 } ;
34 #endif
35