Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

acsmx2.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Defines

#define MAX_ALPHABET_SIZE   256
#define ACSM_FAIL_STATE2   0xffff

Typedefs

typedef unsigned short acstate_t
typedef _acsm_pattern2 ACSM_PATTERN2
typedef trans_node_s trans_node_t

Enumerations

enum  { ACF_FULL, ACF_SPARSE, ACF_BANDED, ACF_SPARSEBANDS }
enum  { FSA_TRIE, FSA_NFA, FSA_DFA }

Functions

ACSM_STRUCT2acsmNew2 ()
int acsmAddPattern2 (ACSM_STRUCT2 *p, unsigned char *pat, int n, int nocase, int offset, int depth, void *id, int iid)
int acsmCompile2 (ACSM_STRUCT2 *acsm)
int acsmSearch2 (ACSM_STRUCT2 *acsm, unsigned char *T, int n, int(*Match)(void *id, int index, void *data), void *data)
void acsmFree2 (ACSM_STRUCT2 *acsm)
int acsmSelectFormat2 (ACSM_STRUCT2 *acsm, int format)
int acsmSelectFSA2 (ACSM_STRUCT2 *acsm, int fsa)
void acsmSetMaxSparseBandZeros2 (ACSM_STRUCT2 *acsm, int n)
void acsmSetMaxSparseElements2 (ACSM_STRUCT2 *acsm, int n)
int acsmSetAlphabetSize2 (ACSM_STRUCT2 *acsm, int n)
void acsmSetVerbose2 (int n)
void acsmPrintInfo2 (ACSM_STRUCT2 *p)
int acsmPrintDetailInfo2 (ACSM_STRUCT2 *)
int acsmPrintSummaryInfo2 ()


Define Documentation

#define ACSM_FAIL_STATE2   0xffff
 

Definition at line 49 of file acsmx2.h.

Referenced by acsmSearchSparseNFA(), AddPatternStates(), Build_NFA(), calcSparseBands(), Conv_Full_DFA_To_Banded(), Conv_Full_DFA_To_Sparse(), Convert_NFA_To_DFA(), List_GetNextState(), Print_DFA(), and SparseGetNextStateNFA().

#define MAX_ALPHABET_SIZE   256
 

Definition at line 30 of file acsmx2.h.

Referenced by acsmSetAlphabetSize2(), Conv_Full_DFA_To_Banded(), Conv_Full_DFA_To_Sparse(), and Conv_Full_DFA_To_SparseBands().


Typedef Documentation

typedef struct _acsm_pattern2 ACSM_PATTERN2
 

typedef unsigned short acstate_t
 

Definition at line 48 of file acsmx2.h.

typedef struct trans_node_s trans_node_t
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
ACF_FULL 
ACF_SPARSE 
ACF_BANDED 
ACF_SPARSEBANDS 

Definition at line 90 of file acsmx2.h.

anonymous enum
 

Enumeration values:
FSA_TRIE 
FSA_NFA 
FSA_DFA 

Definition at line 104 of file acsmx2.h.


Function Documentation

int acsmAddPattern2 ACSM_STRUCT2 p,
unsigned char *  pat,
int  n,
int  nocase,
int  offset,
int  depth,
void *  id,
int  iid
 

Definition at line 1442 of file acsmx2.c.

References ACSM_STRUCT2::acsmPatterns, _acsm_pattern2::casepatrn, ConvertCaseEx(), _acsm_pattern2::depth, _acsm_pattern2::id, _acsm_pattern2::iid, MEMASSERT, memcpy, _acsm_pattern2::n, _acsm_pattern2::next, _acsm_pattern2::nocase, _acsm_pattern2::offset, and _acsm_pattern2::patrn.

Referenced by mpseAddPattern().

int acsmCompile2 ACSM_STRUCT2 acsm  ) 
 

Definition at line 1528 of file acsmx2.c.

References ACF_BANDED, ACF_FULL, ACF_SPARSE, ACF_SPARSEBANDS, acsm_summary_s::acsm, ACSM_STRUCT2::acsmFailState, ACSM_STRUCT2::acsmFormat, ACSM_STRUCT2::acsmFSA, ACSM_STRUCT2::acsmMatchList, ACSM_STRUCT2::acsmMaxStates, ACSM_STRUCT2::acsmNextState, ACSM_STRUCT2::acsmNumStates, ACSM_STRUCT2::acsmNumTrans, ACSM_STRUCT2::acsmPatterns, ACSM_STRUCT2::acsmTransTable, acsmUpdateMatchStates(), AddPatternStates(), Build_NFA(), Conv_Full_DFA_To_Banded(), Conv_Full_DFA_To_Sparse(), Conv_Full_DFA_To_SparseBands(), Conv_List_To_Full(), Convert_NFA_To_DFA(), FSA_DFA, FSA_NFA, List_FreeTransTable(), List_PrintTransTable(), max_memory, MEMASSERT, memcpy, memset, _acsm_pattern2::n, _acsm_pattern2::next, NULL, acsm_summary_s::num_states, acsm_summary_s::num_transitions, Print_DFA(), and s_verbose.

Referenced by mpsePrepPatterns().

void acsmFree2 ACSM_STRUCT2 acsm  ) 
 

Definition at line 2259 of file acsmx2.c.

References ACSM_STRUCT2::acsmFailState, ACSM_STRUCT2::acsmMatchList, ACSM_STRUCT2::acsmNextState, and _acsm_pattern2::next.

Referenced by mpseFree().

ACSM_STRUCT2* acsmNew2  ) 
 

Definition at line 1414 of file acsmx2.c.

References ACF_FULL, FSA_DFA, init_xlatcase(), MEMASSERT, and memset.

Referenced by mpseNew().

int acsmPrintDetailInfo2 ACSM_STRUCT2  ) 
 

Definition at line 2320 of file acsmx2.c.

Referenced by mpsePrintDetail().

void acsmPrintInfo2 ACSM_STRUCT2 p  ) 
 

Definition at line 2282 of file acsmx2.c.

References ACSM_STRUCT2::acsmAlphabetSize, ACSM_STRUCT2::acsmFormat, ACSM_STRUCT2::acsmFSA, ACSM_STRUCT2::acsmNumStates, ACSM_STRUCT2::acsmNumTrans, ACSM_STRUCT2::acsmSparseMaxRowNodes, ACSM_STRUCT2::acsmSparseMaxZcnt, and max_memory.

int acsmPrintSummaryInfo2  ) 
 

Definition at line 2332 of file acsmx2.c.

References acsm_summary_s::acsm, ACSM_STRUCT2::acsmAlphabetSize, ACSM_STRUCT2::acsmFormat, ACSM_STRUCT2::acsmFSA, max_memory, acsm_summary_s::num_states, and acsm_summary_s::num_transitions.

Referenced by mpsePrintSummary().

int acsmSearch2 ACSM_STRUCT2 acsm,
unsigned char *  T,
int  n,
int(*)(void *id, int index, void *data)  Match,
void *  data
 

Definition at line 2221 of file acsmx2.c.

References ACF_BANDED, ACF_FULL, acsmSearchSparseDFA(), acsmSearchSparseDFA_Banded(), acsmSearchSparseDFA_Full(), acsmSearchSparseNFA(), FSA_DFA, FSA_NFA, and FSA_TRIE.

Referenced by mpseSearch().

int acsmSelectFormat2 ACSM_STRUCT2 acsm,
int  format
 

Definition at line 1351 of file acsmx2.c.

References ACF_BANDED, ACF_FULL, ACF_SPARSE, ACF_SPARSEBANDS, and ACSM_STRUCT2::acsmFormat.

Referenced by mpseNew().

int acsmSelectFSA2 ACSM_STRUCT2 acsm,
int  fsa
 

Definition at line 1384 of file acsmx2.c.

References ACSM_STRUCT2::acsmFSA, FSA_DFA, FSA_NFA, and FSA_TRIE.

int acsmSetAlphabetSize2 ACSM_STRUCT2 acsm,
int  n
 

Definition at line 1399 of file acsmx2.c.

References ACSM_STRUCT2::acsmAlphabetSize, and MAX_ALPHABET_SIZE.

void acsmSetMaxSparseBandZeros2 ACSM_STRUCT2 acsm,
int  n
 

Definition at line 1370 of file acsmx2.c.

References ACSM_STRUCT2::acsmSparseMaxZcnt.

void acsmSetMaxSparseElements2 ACSM_STRUCT2 acsm,
int  n
 

Definition at line 1377 of file acsmx2.c.

References ACSM_STRUCT2::acsmSparseMaxRowNodes.

void acsmSetVerbose2 int  n  ) 
 

Definition at line 197 of file acsmx2.c.

References s_verbose.


Generated on Sun May 14 14:51:26 2006 by  doxygen 1.4.2