Imported Upstream version 3.2.6
[platform/upstream/ccache.git] / macroskip.h
1 /*
2  * A Boyer-Moore-Horspool skip table used for searching for the strings
3  * "__TIME__" and "__DATE__".
4  *
5  * macro_skip[c] = 8 for all c not in "__TIME__" and "__DATE__".
6  *
7  * The other characters map as follows:
8  *
9  *   _ -> 1
10  *   A -> 4
11  *   D -> 5
12  *   E -> 2
13  *   I -> 4
14  *   M -> 3
15  *   T -> 3
16  *
17  *
18  * This was generated with the following Python script:
19  *
20  * m = {'_': 1,
21  *      'A': 4,
22  *      'D': 5,
23  *      'E': 2,
24  *      'I': 4,
25  *      'M': 3,
26  *      'T': 3}
27  *
28  * for i in range(0, 256):
29  *     if chr(i) in m:
30  *         num = m[chr(i)]
31  *     else:
32  *         num = 8
33  *     print ("%d, " % num),
34  *
35  *     if i % 16 == 15:
36  *         print ""
37  */
38
39 static const uint32_t macro_skip[] = {
40         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
41         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
42         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
43         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
44         8,  4,  8,  8,  5,  2,  8,  8,  8,  4,  8,  8,  8,  3,  8,  8,
45         8,  8,  8,  8,  3,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  1,
46         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
47         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
48         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
49         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
50         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
51         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
52         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
53         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
54         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
55         8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
56 };