Branch data Line data Source code
1 : : /*-------------------------------------------------------------------------
2 : : *
3 : : * pl_reserved_kwlist_d.h
4 : : * List of keywords represented as a ScanKeywordList.
5 : : *
6 : : * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
7 : : * Portions Copyright (c) 1994, Regents of the University of California
8 : : *
9 : : * NOTES
10 : : * ******************************
11 : : * *** DO NOT EDIT THIS FILE! ***
12 : : * ******************************
13 : : *
14 : : * It has been GENERATED by src/tools/gen_keywordlist.pl
15 : : *
16 : : *-------------------------------------------------------------------------
17 : : */
18 : :
19 : : #ifndef PL_RESERVED_KWLIST_D_H
20 : : #define PL_RESERVED_KWLIST_D_H
21 : :
22 : : #include "common/kwlookup.h"
23 : :
24 : : static const char ReservedPLKeywords_kw_string[] =
25 : : "all\0"
26 : : "begin\0"
27 : : "by\0"
28 : : "case\0"
29 : : "declare\0"
30 : : "else\0"
31 : : "end\0"
32 : : "for\0"
33 : : "foreach\0"
34 : : "from\0"
35 : : "if\0"
36 : : "in\0"
37 : : "into\0"
38 : : "loop\0"
39 : : "not\0"
40 : : "null\0"
41 : : "or\0"
42 : : "then\0"
43 : : "to\0"
44 : : "using\0"
45 : : "when\0"
46 : : "while";
47 : :
48 : : static const uint16 ReservedPLKeywords_kw_offsets[] = {
49 : : 0,
50 : : 4,
51 : : 10,
52 : : 13,
53 : : 18,
54 : : 26,
55 : : 31,
56 : : 35,
57 : : 39,
58 : : 47,
59 : : 52,
60 : : 55,
61 : : 58,
62 : : 63,
63 : : 68,
64 : : 72,
65 : : 77,
66 : : 80,
67 : : 85,
68 : : 88,
69 : : 94,
70 : : 99,
71 : : };
72 : :
73 : : #define RESERVEDPLKEYWORDS_NUM_KEYWORDS 22
74 : :
75 : : static int
76 : 125940 : ReservedPLKeywords_hash_func(const void *key, size_t keylen)
77 : : {
78 : : static const int8 h[45] = {
79 : : -7, 127, -19, 127, 127, 11, 127, -1,
80 : : 127, 2, 127, 127, 7, -14, 127, 127,
81 : : 127, 0, 127, 127, 127, 23, 14, 127,
82 : : 0, 15, -6, 0, 15, 27, 127, -6,
83 : : 127, 13, 2, 0, 127, -1, 16, 4,
84 : : 127, 4, 10, 18, 127
85 : : };
86 : :
87 : 125940 : const unsigned char *k = (const unsigned char *) key;
88 : 125940 : uint32 a = 0;
89 : 125940 : uint32 b = 0;
90 : :
91 [ + + ]: 637141 : while (keylen--)
92 : : {
93 : 511201 : unsigned char c = *k++ | 0x20;
94 : :
95 : 511201 : a = a * 257 + c;
96 : 511201 : b = b * 31 + c;
97 : : }
98 : 125940 : return h[a % 45] + h[b % 45];
99 : : }
100 : :
101 : : static const ScanKeywordList ReservedPLKeywords = {
102 : : ReservedPLKeywords_kw_string,
103 : : ReservedPLKeywords_kw_offsets,
104 : : ReservedPLKeywords_hash_func,
105 : : RESERVEDPLKEYWORDS_NUM_KEYWORDS,
106 : : 7
107 : : };
108 : :
109 : : #endif /* PL_RESERVED_KWLIST_D_H */
|