1 /* This file is part of the Zebra server.
2 Copyright (C) 1994-2011 Index Data
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 struct Tnode *root; /* root of regular syntax tree */
33 int position; /* no of positions so far */
34 int rule; /* no of rules so far */
35 BSetHandle *charset; /* character set type */
36 BSet anyset; /* character recognized by `.' */
37 int use_Tnode; /* used Tnodes */
38 int max_Tnode; /* allocated Tnodes */
39 struct Tblock *start; /* start block of Tnodes */
40 struct Tblock *end; /* end block of Tnodes */
50 const unsigned char *expr_ptr;
57 const char **(*cmap)(void *vp, const char **from, int len);
60 typedef struct DFA_stateb_ {
61 struct DFA_stateb_ *next;
62 struct DFA_state *state_block;
66 struct DFA_state *freelist; /* chain of unused (but allocated) states */
67 struct DFA_state *unmarked; /* chain of unmarked DFA states */
68 struct DFA_state *marked; /* chain of marked DFA states */
69 DFA_stateb *statemem; /* state memory */
70 int no; /* no of states (unmarked+marked) */
71 DFASetType st; /* Position set type */
72 int hash; /* no hash entries in hasharray */
73 struct DFA_state **hasharray; /* hash pointers */
74 struct DFA_state **sortarray; /* sorted DFA states */
75 struct DFA_trans *transmem; /* transition memory */
78 int init_DFA_states (struct DFA_states **dfasp, DFASetType st, int hash);
79 int rm_DFA_states (struct DFA_states **dfasp);
80 int add_DFA_state (struct DFA_states *dfas, DFASet *s,
81 struct DFA_state **sp);
82 struct DFA_state *get_DFA_state (struct DFA_states *dfas);
83 void sort_DFA_states (struct DFA_states *dfas);
84 void add_DFA_tran (struct DFA_states *, struct DFA_state *,
94 * c-file-style: "Stroustrup"
95 * indent-tabs-mode: nil
97 * vim: shiftwidth=4 tabstop=8 expandtab