IDZEBRA  2.1.2
Data Structures | Macros | Functions | Variables
dfa.h File Reference
#include <bset.h>
#include <dfaset.h>
#include <yaz/yconfig.h>

Go to the source code of this file.

Data Structures

struct  DFA_tran
 
struct  DFA_trans
 
struct  DFA_state
 
struct  DFA
 

Macros

#define L_LP   1
 
#define L_RP   2
 
#define L_CHAR   3
 
#define L_CHARS   4
 
#define L_ANY   5
 
#define L_ALT   6
 
#define L_ANYZ   7
 
#define L_WILD   8
 
#define L_QUEST   9
 
#define L_CLOS1   10
 
#define L_CLOS0   11
 
#define L_END   12
 
#define L_START   13
 
#define DFA_ERR_SYNTAX   1
 
#define DFA_ERR_LP   2
 
#define DFA_ERR_RP   3
 

Functions

struct DFAdfa_init (void)
 
void dfa_anyset_includes_nl (struct DFA *dfa)
 
void dfa_set_cmap (struct DFA *dfa, void *vp, const char **(*cmap)(void *vp, const char **from, int len))
 
int dfa_parse (struct DFA *, const char **)
 
void dfa_mkstate (struct DFA *)
 
void dfa_delete (struct DFA **)
 
int dfa_get_last_rule (struct DFA *)
 
void dfa_parse_cmap_clean (struct DFA *d)
 
void dfa_parse_cmap_new (struct DFA *d, const int *cmap)
 
void dfa_parse_cmap_del (struct DFA *d, int from)
 
void dfa_parse_cmap_add (struct DFA *d, int from, int to)
 

Variables

int debug_dfa_trav
 
int debug_dfa_tran
 
int debug_dfa_followpos
 
int dfa_verbose
 
unsigned short dfa_thompson_chars []
 
unsigned short dfa_ccl_chars []
 

Macro Definition Documentation

#define DFA_ERR_LP   2

Definition at line 98 of file dfa.h.

Referenced by do_parse().

#define DFA_ERR_RP   3

Definition at line 99 of file dfa.h.

Referenced by do_parse().

#define DFA_ERR_SYNTAX   1

Definition at line 97 of file dfa.h.

Referenced by do_parse().

#define L_ALT   6

Definition at line 88 of file dfa.h.

#define L_ANY   5

Definition at line 87 of file dfa.h.

#define L_ANYZ   7

Definition at line 89 of file dfa.h.

#define L_CHAR   3

Definition at line 85 of file dfa.h.

#define L_CHARS   4

Definition at line 86 of file dfa.h.

#define L_CLOS0   11

Definition at line 93 of file dfa.h.

#define L_CLOS1   10

Definition at line 92 of file dfa.h.

#define L_END   12

Definition at line 94 of file dfa.h.

#define L_LP   1

Definition at line 83 of file dfa.h.

#define L_QUEST   9

Definition at line 91 of file dfa.h.

#define L_RP   2

Definition at line 84 of file dfa.h.

#define L_START   13

Definition at line 95 of file dfa.h.

#define L_WILD   8

Definition at line 90 of file dfa.h.

Function Documentation

void dfa_anyset_includes_nl ( struct DFA dfa)

Definition at line 1102 of file dfa.c.

References add_BSet(), DFA_parse::anyset, DFA_parse::charset, and DFA::parse_info.

Referenced by dict_lookup_grep().

void dfa_delete ( struct DFA **  )
int dfa_get_last_rule ( struct DFA )

Definition at line 1114 of file dfa.c.

References DFA::parse_info, and DFA_parse::rule.

struct DFA* dfa_init ( void  )
void dfa_mkstate ( struct DFA )
int dfa_parse ( struct DFA ,
const char **   
)
void dfa_parse_cmap_add ( struct DFA d,
int  from,
int  to 
)

Definition at line 976 of file dfa.c.

References DFA_parse::charMap, DFA_parse::charMapSize, ifree(), imalloc(), and DFA::parse_info.

Referenced by lexSpecDFA().

void dfa_parse_cmap_clean ( struct DFA d)

Definition at line 924 of file dfa.c.

References DFA_parse::charMap, DFA_parse::charMapSize, imalloc(), and DFA::parse_info.

void dfa_parse_cmap_del ( struct DFA d,
int  from 
)

Definition at line 958 of file dfa.c.

References DFA_parse::charMap, and DFA::parse_info.

Referenced by lexSpecDFA().

void dfa_parse_cmap_new ( struct DFA d,
const int *  cmap 
)

Definition at line 938 of file dfa.c.

References DFA_parse::charMap, DFA_parse::charMapSize, ifree(), imalloc(), and DFA::parse_info.

Referenced by dfa_parse_cmap_thompson().

void dfa_set_cmap ( struct DFA dfa,
void *  vp,
const char **(*)(void *vp, const char **from, int len)  cmap 
)

Definition at line 1107 of file dfa.c.

References DFA_parse::cmap, DFA_parse::cmap_data, and DFA::parse_info.

Referenced by dict_lookup_grep().

Variable Documentation

int debug_dfa_followpos

Definition at line 66 of file dfa.c.

Referenced by agrep_options(), dict_lookup_grep(), lexer_options(), main(), mk_dfas(), and readFileSpec().

int debug_dfa_tran
int debug_dfa_trav

Definition at line 64 of file dfa.c.

Referenced by agrep_options(), dfa_trav(), dict_lookup_grep(), lexer_options(), main(), and readFileSpec().

unsigned short dfa_ccl_chars[]
unsigned short dfa_thompson_chars[]
int dfa_verbose

Definition at line 67 of file dfa.c.

Referenced by agrep_options(), dict_lookup_grep(), lexer_options(), main(), mk_dfas(), and readFileSpec().