TangCheng
2025-04-12 d6b06e5d2f8ca0efb5566fdcf29d15567f339b2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/*-------------------------------------------------------------------------
 *
 * cypher_kwlist_d.h
 *    List of keywords represented as a ScanKeywordList.
 *
 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * NOTES
 *  ******************************
 *  *** DO NOT EDIT THIS FILE! ***
 *  ******************************
 *
 *  It has been GENERATED by src/tools/gen_keywordlist.pl
 *
 *-------------------------------------------------------------------------
 */
 
#ifndef CYPHER_KWLIST_D_H
#define CYPHER_KWLIST_D_H
 
#include "common/kwlookup.h"
 
static const char CypherKeyword_kw_string[] =
    "all\0"
    "analyze\0"
    "and\0"
    "as\0"
    "asc\0"
    "ascending\0"
    "by\0"
    "call\0"
    "case\0"
    "coalesce\0"
    "contains\0"
    "create\0"
    "delete\0"
    "desc\0"
    "descending\0"
    "detach\0"
    "distinct\0"
    "else\0"
    "end\0"
    "ends\0"
    "exists\0"
    "explain\0"
    "false\0"
    "in\0"
    "is\0"
    "limit\0"
    "match\0"
    "merge\0"
    "not\0"
    "null\0"
    "optional\0"
    "or\0"
    "order\0"
    "remove\0"
    "return\0"
    "set\0"
    "skip\0"
    "starts\0"
    "then\0"
    "true\0"
    "union\0"
    "unwind\0"
    "verbose\0"
    "when\0"
    "where\0"
    "with\0"
    "xor\0"
    "yield";
 
static const uint16 CypherKeyword_kw_offsets[] = {
    0,
    4,
    12,
    16,
    19,
    23,
    33,
    36,
    41,
    46,
    55,
    64,
    71,
    78,
    83,
    94,
    101,
    110,
    115,
    119,
    124,
    131,
    139,
    145,
    148,
    151,
    157,
    163,
    169,
    173,
    178,
    187,
    190,
    196,
    203,
    210,
    214,
    219,
    226,
    231,
    236,
    242,
    249,
    257,
    262,
    268,
    273,
    277,
};
 
#define CYPHERKEYWORD_NUM_KEYWORDS 48
 
static int
CypherKeyword_hash_func(const void *key, size_t keylen)
{
    static const int8 h[97] = {
           127,     18,      0,    127,      8,    127,     22,    127,
           127,     22,    -10,     11,     45,     -4,    127,      0,
           127,     48,      2,    127,     43,    127,    127,     18,
           127,     26,      9,    127,    -23,    127,    127,    127,
            -2,     28,     68,    127,    -35,     29,    127,      0,
           127,    127,    -12,    127,     18,      1,    -34,     -9,
            27,     -3,     20,    127,    127,     52,     -7,    -34,
            34,      8,    127,    127,     16,      0,    127,     31,
           127,    127,    127,     23,    127,    127,    127,      0,
            24,     23,    127,      4,      0,      0,     35,     -2,
             0,     40,    127,    127,      0,      7,      0,     27,
           127,    -13,    127,      0,     22,    127,     -8,    127,
           127,
    };
 
    const unsigned char *k = (const unsigned char *) key;
    uint32        a = 0;
    uint32        b = 1;
 
    while (keylen--)
    {
        unsigned char c = *k++ | 0x20;
 
        a = a * 31 + c;
        b = b * 127 + c;
    }
    return h[a % 97] + h[b % 97];
}
 
const ScanKeywordList CypherKeyword = {
    CypherKeyword_kw_string,
    CypherKeyword_kw_offsets,
    CypherKeyword_hash_func,
    CYPHERKEYWORD_NUM_KEYWORDS,
    10
};
 
#endif                            /* CYPHER_KWLIST_D_H */