17 |
/* along with this program; if not, write to the Free Software */ |
/* along with this program; if not, write to the Free Software */ |
18 |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
19 |
|
|
|
/* |
|
|
* $Id$ |
|
|
*/ |
|
|
|
|
20 |
/** |
/** |
21 |
* \file dic_internals.h |
* \file dic_internals.h |
22 |
* \brief Internal dictionary structures |
* \brief Internal dictionary structures |
27 |
#ifndef _DIC_INTERNALS_H |
#ifndef _DIC_INTERNALS_H |
28 |
#define _DIC_INTERNALS_H |
#define _DIC_INTERNALS_H |
29 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |
30 |
extern "C" |
extern "C" |
31 |
{ |
{ |
32 |
#endif |
#endif |
33 |
|
|
34 |
/** |
/** |
35 |
* bit masking for ascii characters \n |
* bit masking for ascii characters \n |
36 |
* ('a' & CHAR) == ('A' & CHAR) == 1 |
* ('a' & CHAR) == ('A' & CHAR) == 1 |
37 |
*/ |
*/ |
38 |
#define DIC_CHAR_MASK 0x1F |
#define DIC_CHAR_MASK 0x1F |
39 |
|
|
57 |
* ---------------- |
* ---------------- |
58 |
*/ |
*/ |
59 |
|
|
60 |
typedef struct _Dawg_edge { |
typedef struct _Dawg_edge { |
61 |
unsigned int ptr : 24; |
unsigned int ptr : 24; |
62 |
unsigned int term : 1; |
unsigned int term : 1; |
63 |
unsigned int last : 1; |
unsigned int last : 1; |
64 |
unsigned int fill : 1; |
unsigned int fill : 1; |
65 |
unsigned int chr : 5; |
unsigned int chr : 5; |
66 |
} Dawg_edge; |
} Dawg_edge; |
67 |
|
|
68 |
typedef struct _Dict_header { |
typedef struct _Dict_header { |
69 |
char ident[sizeof(_COMPIL_KEYWORD_)]; |
char ident[sizeof(_COMPIL_KEYWORD_)]; |
79 |
|
|
80 |
struct _Dictionary |
struct _Dictionary |
81 |
{ |
{ |
82 |
Dawg_edge *dawg; |
Dawg_edge *dawg; |
83 |
unsigned int root; |
unsigned int root; |
84 |
int nwords; |
int nwords; |
85 |
int nnodes; |
int nnodes; |
88 |
|
|
89 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |
90 |
} |
} |
91 |
#endif |
#endif |
92 |
#endif /* _DIC_INTERNALS_H */ |
#endif /* _DIC_INTERNALS_H */ |
93 |
|
|