1 // This file is part of e93.
2 //
3 // e93 is free software; you can redistribute it and/or modify
4 // it under the terms of the e93 LICENSE AGREEMENT.
5 //
6 // e93 is distributed in the hope that it will be useful,
7 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 // e93 LICENSE AGREEMENT for more details.
10 //
11 // You should have received a copy of the e93 LICENSE AGREEMENT
12 // along with e93; see the file "LICENSE.TXT".
13 
14 #define MAX_REGISTERS				10				// maximum number of registers that will be remembered
15 
16 typedef struct compiledExpression COMPILED_EXPRESSION;
17 
18 void REFree(COMPILED_EXPRESSION *expression);
19 void REPrintCompiledExpression(COMPILED_EXPRESSION *expression);
20 COMPILED_EXPRESSION *RECompile(UINT8 *expression,UINT32 numBytes,const UINT8 *translateTable);
21 bool GetRERegisterMatch(COMPILED_EXPRESSION *compiledExpression,UINT32 expRegisterIndex,UINT32 *matchOffset,UINT32 *matchLength);
22 bool GetRERegisterMatchChunkAndOffset(COMPILED_EXPRESSION *compiledExpression,UINT32 expRegisterIndex,CHUNK_HEADER **chunk,UINT32 *offset,UINT32 *matchLength);
23 bool SearchForwardRE(CHUNK_HEADER *chunk,UINT32 offset,COMPILED_EXPRESSION *compiledExpression,bool leftEdge,bool rightEdge,UINT32 numToSearchStart,UINT32 numToSearch,bool ignoreCase,bool *foundMatch,UINT32 *matchOffset,UINT32 *numMatched,CHUNK_HEADER **startChunk,UINT32 *startOffset,CHUNK_HEADER **endChunk,UINT32 *endOffset,ABORT_TEST_FUNCTION *abortFunction);
24 bool SearchBackwardRE(CHUNK_HEADER *chunk,UINT32 offset,COMPILED_EXPRESSION *compiledExpression,bool leftEdge,bool rightEdge,UINT32 numToSearchStart,UINT32 numToSearch,bool ignoreCase,bool *foundMatch,UINT32 *matchOffset,UINT32 *numMatched,CHUNK_HEADER **startChunk,UINT32 *startOffset,CHUNK_HEADER **endChunk,UINT32 *endOffset,ABORT_TEST_FUNCTION *abortFunction);
25 void REHuntBackToFarthestPossibleStart(CHUNK_HEADER *chunk,UINT32 offset,COMPILED_EXPRESSION *compiledExpression,UINT32 *numBack,CHUNK_HEADER **endChunk,UINT32 *endOffset);
26