2
* (C) 2006, 2007 Andreas Gruenbacher <agruen@suse.de>
3
* Copyright (c) 2003-2008 Novell, Inc. (All rights reserved)
4
* Copyright 2009-2012 Canonical Ltd.
6
* The libapparmor library is licensed under the terms of the GNU
7
* Lesser General Public License, version 2.1. Please see the file
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
* Create a compressed hfa (chfa) from and hfa
21
#ifndef __LIBAA_RE_CHFA_H
22
#define __LIBAA_RE_CHFA_H
32
typedef vector<pair<const State *, size_t> > DefaultBase;
33
typedef vector<pair<const State *, const State *> > NextCheck;
35
CHFA(DFA &dfa, map<uchar, uchar> &eq, dfaflags_t flags);
36
void dump(ostream & os);
37
void flex_table(ostream &os, const char *name);
38
void init_free_list(vector<pair<size_t, size_t> > &free_list,
39
size_t prev, size_t start);
40
bool fits_in(vector<pair<size_t, size_t> > &free_list, size_t base,
42
void insert_state(vector<pair<size_t, size_t> > &free_list,
43
State *state, DFA &dfa);
46
vector<uint32_t> accept;
47
vector<uint32_t> accept2;
48
DefaultBase default_base;
50
map<const State *, size_t> num;
51
map<uchar, uchar> &eq;
56
#endif /* __LIBAA_RE_CHFA_H */