blob: d605b81571492a3b5a2a4e56ec8534f505b69b55 (
plain)
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
|
# Name
---
Each word representing a var, symbol or type gets an `NAME_IDENTIFIER` -> `kpl_name*` associated with it
## Object Definitions
```c
#define KPL_LETTER_COUNT 26
#define KPL_NAME_COUNT 43
#define KPL_NAME_SIZE 44
typedef struct {
kpl_ptr underscore, lowercase[KPL_LETTER_COUNT], uppercase[KPL_LETTER_COUNT];
char name[KPL_NAME_SIZE];
} kpl_name_node;
typedef strcut {
kpl_name_node array[UINT16_MAX];
} kpl_name_array;
typedef strcut {
uint16_t slab_index, array_index;
kpl_mutex mutex;
kpl_ptr root;
kpl_name_array *slab[UINT16_MAX];
} kpl_name;
```
## Usage
The only operation into the trie is a findsert with a pointer to a string and its length, returning a pointer to the found or inserted node
|