diff options
| author | nasr <nsrddyn@gmail.com> | 2026-03-05 22:42:55 +0000 |
|---|---|---|
| committer | nasr <nsrddyn@gmail.com> | 2026-03-05 22:42:55 +0000 |
| commit | d8c52d6c408a172f1210c77df3e3a9629ea68dc6 (patch) | |
| tree | 8125ad25c4b9a1a94d8a77b4daa19ca06479fc1d | |
| parent | aa2bee82ac82ff47c6be84f2e6d39c690ec66a21 (diff) | |
feature(main): helper functions for lexing
refactor(main): helper script for testing to gitignore
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | source/base/base_string.h | 9 | ||||
| -rw-r--r-- | source/engine/engine.c | 9 | ||||
| -rw-r--r-- | source/lexer/lexer.c | 74 | ||||
| -rw-r--r-- | source/storage/csv_reader.c | 8 | ||||
| -rw-r--r-- | source/storage/csv_reader.h | 8 | ||||
| -rw-r--r-- | tags | 105 |
7 files changed, 161 insertions, 54 deletions
| @@ -5,3 +5,5 @@ idea/* | |||
| 5 | /build | 5 | /build |
| 6 | /notes.txt | 6 | /notes.txt |
| 7 | /test | 7 | /test |
| 8 | /tags | ||
| 9 | /helper.sh | ||
diff --git a/source/base/base_string.h b/source/base/base_string.h index 64a3162..189b38a 100644 --- a/source/base/base_string.h +++ b/source/base/base_string.h | |||
| @@ -47,4 +47,13 @@ string8_append_char(string8 *buf, u8 c) | |||
| 47 | buf->size += 1; | 47 | buf->size += 1; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | read_only global_variable | ||
| 51 | string8 nil_string = | ||
| 52 | { | ||
| 53 | |||
| 54 | .data = NULL, | ||
| 55 | .size = 0, | ||
| 56 | |||
| 57 | }; | ||
| 58 | |||
| 50 | #endif /* BASE_STRING_H */ | 59 | #endif /* BASE_STRING_H */ |
diff --git a/source/engine/engine.c b/source/engine/engine.c index ada4ecb..05c143c 100644 --- a/source/engine/engine.c +++ b/source/engine/engine.c | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #define BASE_UNITY | 1 | #define BASE_UNITY |
| 2 | #include "../base/base_include.h" | 2 | #include "../base/base_include.h" |
| 3 | 3 | ||
| 4 | #include <stdio.h> | ||
| 5 | |||
| 4 | #include "../lexer/lexer.h" | 6 | #include "../lexer/lexer.h" |
| 5 | #include "../lexer/lexer.c" | 7 | #include "../lexer/lexer.c" |
| 6 | 8 | ||
| @@ -13,17 +15,14 @@ | |||
| 13 | #include "../storage/csv_reader.h" | 15 | #include "../storage/csv_reader.h" |
| 14 | #include "../storage/csv_reader.c" | 16 | #include "../storage/csv_reader.c" |
| 15 | 17 | ||
| 16 | #if 1 | ||
| 17 | #include <stdio.h> | ||
| 18 | #endif | ||
| 19 | |||
| 20 | 18 | ||
| 21 | int main(int c, char **v) | 19 | int main(int c, char **v) |
| 22 | { | 20 | { |
| 23 | if(c < 2) return -999; | 21 | if(c < 2) return -999; |
| 24 | 22 | ||
| 25 | string8 buffer = load_file(v[1]); | 23 | string8 buffer = load_file(v[1]); |
| 26 | read_csv(buffer); | 24 | // read_csv(buffer); |
| 25 | tokenize_csv(buffer); | ||
| 27 | 26 | ||
| 28 | 27 | ||
| 29 | // for(;;) | 28 | // for(;;) |
diff --git a/source/lexer/lexer.c b/source/lexer/lexer.c index 8182c5a..1c7ab38 100644 --- a/source/lexer/lexer.c +++ b/source/lexer/lexer.c | |||
| @@ -1,10 +1,80 @@ | |||
| 1 | internal b32 | ||
| 2 | is_alpha(u8 point) | ||
| 3 | { | ||
| 4 | return ((point >= 'a' && point <= 'z') || | ||
| 5 | (point >= 'A' && point <= 'Z') || | ||
| 6 | (point == '_')); | ||
| 7 | } | ||
| 8 | |||
| 9 | internal b32 | ||
| 10 | is_digit(u8 point) | ||
| 11 | { | ||
| 12 | return (point >= '0' && point <= '9'); | ||
| 13 | } | ||
| 14 | |||
| 15 | internal b32 | ||
| 16 | is_alpha_num(u8 point) | ||
| 17 | { | ||
| 18 | return (is_alpha(point) || is_digit(point)); | ||
| 19 | } | ||
| 20 | |||
| 21 | internal b32 | ||
| 22 | is_whitespace(u8 point) | ||
| 23 | { | ||
| 24 | return (point == '\n' || point == '\r' || | ||
| 25 | point == ' ' || point == '\t'); | ||
| 26 | } | ||
| 27 | |||
| 28 | internal b32 | ||
| 29 | is_delimiter(u8 point) | ||
| 30 | { | ||
| 31 | |||
| 32 | return (point == ','); | ||
| 33 | |||
| 34 | } | ||
| 35 | |||
| 1 | internal token * | 36 | internal token * |
| 2 | tokenize_csv(string8 buffer) | 37 | tokenize_csv(string8 buffer) |
| 3 | { | 38 | { |
| 39 | i32 count = 0; | ||
| 40 | string8 **tokens = PushArray(arena, string8 *, buffer.size / 10); | ||
| 41 | |||
| 4 | if(buffer.size < 0) return NULL; | 42 | if(buffer.size < 0) return NULL; |
| 5 | for(i32 index = 0; | 43 | for(i32 index = 0; |
| 6 | buffer.data[index] != '\0' | 44 | buffer.data[index] != '\0'; |
| 7 | ;) | 45 | ++index) |
| 46 | { | ||
| 47 | string8 tokens = {0}; | ||
| 48 | |||
| 49 | u8 point = buffer.data[index]; | ||
| 50 | if(is_whitespace(point)) continue; | ||
| 51 | |||
| 52 | u8 *start = &buffer.data; | ||
| 53 | |||
| 54 | if(is_delimiter(point)) | ||
| 55 | { | ||
| 56 | |||
| 57 | |||
| 58 | } | ||
| 59 | |||
| 60 | u8 *end = start - 1; | ||
| 61 | |||
| 62 | unused(start); | ||
| 63 | unused(end); | ||
| 64 | |||
| 65 | switch (point) | ||
| 66 | { | ||
| 67 | |||
| 68 | default: | ||
| 69 | { | ||
| 70 | printf("point: %c\n", point); | ||
| 71 | count++; | ||
| 72 | } | ||
| 73 | } | ||
| 74 | |||
| 75 | } | ||
| 76 | |||
| 77 | printf("%d", count); | ||
| 8 | 78 | ||
| 9 | return NULL; | 79 | return NULL; |
| 10 | } | 80 | } |
diff --git a/source/storage/csv_reader.c b/source/storage/csv_reader.c index a06e9c4..2fcbe04 100644 --- a/source/storage/csv_reader.c +++ b/source/storage/csv_reader.c | |||
| @@ -1,15 +1,7 @@ | |||
| 1 | #define STD_TEST | ||
| 2 | #if defined(STD_TEST) | ||
| 3 | #include <stdio.h> | ||
| 4 | #endif | ||
| 5 | |||
| 6 | internal void | 1 | internal void |
| 7 | read_csv(string8 buffer) | 2 | read_csv(string8 buffer) |
| 8 | { | 3 | { |
| 9 | #if defined(STD_TEST) | ||
| 10 | printf("\nsize:%lu\ndata %s\n", buffer.size, buffer.data); | 4 | printf("\nsize:%lu\ndata %s\n", buffer.size, buffer.data); |
| 11 | #endif | ||
| 12 | 5 | ||
| 13 | } | 6 | } |
| 14 | 7 | ||
| 15 | |||
diff --git a/source/storage/csv_reader.h b/source/storage/csv_reader.h index 711499f..36e07a4 100644 --- a/source/storage/csv_reader.h +++ b/source/storage/csv_reader.h | |||
| @@ -23,8 +23,8 @@ struct csv_table | |||
| 23 | read_only global_variable | 23 | read_only global_variable |
| 24 | csv_row nil_csv_row = | 24 | csv_row nil_csv_row = |
| 25 | { | 25 | { |
| 26 | .fields = {NULL, 0}, | 26 | .fields = &nil_string, |
| 27 | .count = 0, | 27 | .count = 0, |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | 30 | ||
| @@ -32,8 +32,8 @@ csv_row nil_csv_row = | |||
| 32 | read_only global_variable | 32 | read_only global_variable |
| 33 | csv_table nil_csv_table = | 33 | csv_table nil_csv_table = |
| 34 | { | 34 | { |
| 35 | .string8 = {NULL, 0}, | 35 | .headers = &nil_string, |
| 36 | .csv_row = &nil_csv_row, | 36 | .rows = &nil_csv_row, |
| 37 | .col_count = 0, | 37 | .col_count = 0, |
| 38 | .row_count = 0, | 38 | .row_count = 0, |
| 39 | }; | 39 | }; |
| @@ -86,20 +86,23 @@ BASE_MEM_H source/base/base_mem.h /^#define BASE_MEM_H$/;" d | |||
| 86 | BASE_OS_H source/base/base_os.h /^#define BASE_OS_H$/;" d | 86 | BASE_OS_H source/base/base_os.h /^#define BASE_OS_H$/;" d |
| 87 | BASE_STRING_H source/base/base_string.h /^#define BASE_STRING_H$/;" d | 87 | BASE_STRING_H source/base/base_string.h /^#define BASE_STRING_H$/;" d |
| 88 | BASE_TEST_H source/base/base_test.h /^#define BASE_TEST_H$/;" d | 88 | BASE_TEST_H source/base/base_test.h /^#define BASE_TEST_H$/;" d |
| 89 | BASE_UNITY source/engine/engine_main.c /^#define BASE_UNITY$/;" d file: | 89 | BASE_UNITY source/engine/engine.c /^#define BASE_UNITY$/;" d file: |
| 90 | BIN Makefile /^BIN = build\/engine$/;" m | 90 | BIN Makefile /^BIN = build\/engine$/;" m |
| 91 | BLUE source/base/base_test.h /^#define BLUE /;" d | 91 | BLUE source/base/base_test.h /^#define BLUE /;" d |
| 92 | BTREE_H source/storage/b_tree.h /^#define BTREE_H$/;" d | ||
| 92 | BUFF_DEFAULT source/base/base.h /^#define BUFF_DEFAULT /;" d | 93 | BUFF_DEFAULT source/base/base.h /^#define BUFF_DEFAULT /;" d |
| 93 | BUFF_LARGE source/base/base.h /^#define BUFF_LARGE /;" d | 94 | BUFF_LARGE source/base/base.h /^#define BUFF_LARGE /;" d |
| 94 | BUFF_SMALL source/base/base.h /^#define BUFF_SMALL /;" d | 95 | BUFF_SMALL source/base/base.h /^#define BUFF_SMALL /;" d |
| 96 | B_TREE_ORDER source/storage/b_tree.h /^#define B_TREE_ORDER /;" d | ||
| 95 | CC Makefile /^CC = clang$/;" m | 97 | CC Makefile /^CC = clang$/;" m |
| 96 | CFLAGS Makefile /^CFLAGS = -Wall -Wextra -Wfloat-equal -Wswitch-default -Wswitch-enum \\$/;" m | 98 | CFLAGS Makefile /^CFLAGS = -Wall -Wextra -Wfloat-equal -Wswitch-default -Wswitch-enum \\$/;" m |
| 99 | CSV_READER_H source/storage/csv_reader.h /^#define CSV_READER_H$/;" d | ||
| 97 | DEPRECATED source/base/base.h /^#define DEPRECATED /;" d | 100 | DEPRECATED source/base/base.h /^#define DEPRECATED /;" d |
| 98 | ENGINE_LEXER_H source/engine/engine_lexer.h /^#define ENGINE_LEXER_H$/;" d | 101 | ENGINE_LEXER_H source/lexer/lexer.h /^#define ENGINE_LEXER_H$/;" d |
| 99 | ENGINE_REPL_H source/engine/engine_parser.c /^#define ENGINE_REPL_H$/;" d file: | 102 | ENGINE_REPL_H source/parser/parser.c /^#define ENGINE_REPL_H$/;" d file: |
| 100 | ENGINE_REPL_H source/engine/engine_parser.h /^#define ENGINE_REPL_H$/;" d | 103 | ENGINE_REPL_H source/parser/parser.h /^#define ENGINE_REPL_H$/;" d |
| 101 | ENGINE_REPL_H source/engine/engine_repl.c /^#define ENGINE_REPL_H$/;" d file: | 104 | ENGINE_REPL_H source/repl/repl.c /^#define ENGINE_REPL_H$/;" d file: |
| 102 | ENGINE_REPL_H source/engine/engine_repl.h /^#define ENGINE_REPL_H$/;" d | 105 | ENGINE_REPL_H source/repl/repl.h /^#define ENGINE_REPL_H$/;" d |
| 103 | ERR_INVALID source/base/base.h /^#define ERR_INVALID /;" d | 106 | ERR_INVALID source/base/base.h /^#define ERR_INVALID /;" d |
| 104 | ERR_IO source/base/base.h /^#define ERR_IO /;" d | 107 | ERR_IO source/base/base.h /^#define ERR_IO /;" d |
| 105 | ERR_OK source/base/base.h /^#define ERR_OK /;" d | 108 | ERR_OK source/base/base.h /^#define ERR_OK /;" d |
| @@ -123,13 +126,16 @@ PushString source/base/base_string.h /^ #define PushString(/;" d | |||
| 123 | PushStruct source/base/base_arena.h /^#define PushStruct(/;" d | 126 | PushStruct source/base/base_arena.h /^#define PushStruct(/;" d |
| 124 | RED source/base/base_test.h /^#define RED /;" d | 127 | RED source/base/base_test.h /^#define RED /;" d |
| 125 | RESET source/base/base_test.h /^#define RESET /;" d | 128 | RESET source/base/base_test.h /^#define RESET /;" d |
| 126 | SRC Makefile /^SRC = source\/engine\/engine_main.c$/;" m | 129 | SRC Makefile /^SRC = source\/engine\/engine.c$/;" m |
| 127 | STACK_H source/base/base_stack.h /^#define STACK_H$/;" d | 130 | STACK_H source/base/base_stack.h /^#define STACK_H$/;" d |
| 131 | StringFmt source/base/base_string.h /^#define StringFmt /;" d | ||
| 128 | StringLit source/base/base_string.h /^#define StringLit(/;" d | 132 | StringLit source/base/base_string.h /^#define StringLit(/;" d |
| 129 | TOKEN_IDENTIFIER source/engine/engine_lexer.h /^ TOKEN_IDENTIFIER,$/;" e enum:token_type | 133 | TOKEN_IDENTIFIER source/lexer/lexer.h /^ TOKEN_IDENTIFIER,$/;" e enum:token_type |
| 130 | TOKEN_UNDEFINED source/engine/engine_lexer.h /^ TOKEN_UNDEFINED = 255,$/;" e enum:token_type | 134 | TOKEN_UNDEFINED source/lexer/lexer.h /^ TOKEN_UNDEFINED = 255,$/;" e enum:token_type |
| 131 | TOKEN_VALUE source/engine/engine_lexer.h /^ TOKEN_VALUE,$/;" e enum:token_type | 135 | TOKEN_VALUE source/lexer/lexer.h /^ TOKEN_VALUE,$/;" e enum:token_type |
| 132 | TRUE source/base/base.h /^#define TRUE /;" d | 136 | TRUE source/base/base.h /^#define TRUE /;" d |
| 137 | ULLongFmt source/base/base_string.h /^#define ULLongFmt /;" d | ||
| 138 | ULongFmt source/base/base_string.h /^#define ULongFmt /;" d | ||
| 133 | align source/base/base_mem.h /^align(u64 pointer, umm alignment)$/;" f typeref:typename:internal u64 | 139 | align source/base/base_mem.h /^align(u64 pointer, umm alignment)$/;" f typeref:typename:internal u64 |
| 134 | arena source/base/base_arena.h /^ mem_arena *arena;$/;" m struct:temp_arena typeref:typename:mem_arena * | 140 | arena source/base/base_arena.h /^ mem_arena *arena;$/;" m struct:temp_arena typeref:typename:mem_arena * |
| 135 | arena_alloc source/base/base_arena.c /^arena_alloc(mem_arena *arena, u64 size)$/;" f typeref:typename:internal void * | 141 | arena_alloc source/base/base_arena.c /^arena_alloc(mem_arena *arena, u64 size)$/;" f typeref:typename:internal void * |
| @@ -143,17 +149,25 @@ arena_resize_align source/base/base_arena.c /^arena_resize_align(mem_arena *aren | |||
| 143 | b16 source/base/base.h /^typedef i16 b16;$/;" t typeref:typename:i16 | 149 | b16 source/base/base.h /^typedef i16 b16;$/;" t typeref:typename:i16 |
| 144 | b32 source/base/base.h /^typedef i32 b32;$/;" t typeref:typename:i32 | 150 | b32 source/base/base.h /^typedef i32 b32;$/;" t typeref:typename:i32 |
| 145 | b8 source/base/base.h /^typedef u8 b8;$/;" t typeref:typename:u8 | 151 | b8 source/base/base.h /^typedef u8 b8;$/;" t typeref:typename:u8 |
| 152 | b_tree source/storage/b_tree.h /^struct b_tree$/;" s | ||
| 153 | b_tree source/storage/b_tree.h /^typedef struct b_tree b_tree;$/;" t typeref:struct:b_tree | ||
| 154 | b_tree_create source/storage/b_tree.c /^b_tree_create(mem_arena *arena, u16 order)$/;" f typeref:typename:internal void | ||
| 155 | b_tree_insert source/storage/b_tree.c /^b_tree_insert()$/;" f typeref:typename:internal void | ||
| 156 | b_tree_node source/storage/b_tree.h /^struct b_tree_node$/;" s | ||
| 157 | b_tree_node source/storage/b_tree.h /^typedef struct b_tree_node b_tree_node;$/;" t typeref:struct:b_tree_node | ||
| 158 | b_tree_search source/storage/b_tree.c /^b_tree_search(node *node)$/;" f typeref:typename:internal void | ||
| 159 | b_tree_write source/storage/b_tree.c /^b_tree_write()$/;" f typeref:typename:internal void | ||
| 146 | base_position source/base/base_arena.h /^ u8 *base_position;$/;" m struct:mem_arena typeref:typename:u8 * | 160 | base_position source/base/base_arena.h /^ u8 *base_position;$/;" m struct:mem_arena typeref:typename:u8 * |
| 147 | base_position source/base/base_stack.h /^ u8 *base_position;$/;" m struct:mem_stack typeref:typename:u8 * | 161 | base_position source/base/base_stack.h /^ u8 *base_position;$/;" m struct:mem_stack typeref:typename:u8 * |
| 148 | breakpoint source/base/base.h /^#define breakpoint /;" d | 162 | breakpoint source/base/base.h /^#define breakpoint /;" d |
| 149 | btree source/engine/engine_parser.c /^struct btree$/;" s file: | 163 | btree source/parser/parser.c /^struct btree$/;" s file: |
| 150 | btree source/engine/engine_parser.c /^typedef struct btree btree;$/;" t typeref:struct:btree file: | 164 | btree source/parser/parser.c /^typedef struct btree btree;$/;" t typeref:struct:btree file: |
| 151 | btree source/engine/engine_parser.h /^struct btree$/;" s | 165 | btree source/parser/parser.h /^struct btree$/;" s |
| 152 | btree source/engine/engine_parser.h /^typedef struct btree btree;$/;" t typeref:struct:btree | 166 | btree source/parser/parser.h /^typedef struct btree btree;$/;" t typeref:struct:btree |
| 153 | btree source/engine/engine_repl.c /^struct btree$/;" s file: | 167 | btree source/repl/repl.c /^struct btree$/;" s file: |
| 154 | btree source/engine/engine_repl.c /^typedef struct btree btree;$/;" t typeref:struct:btree file: | 168 | btree source/repl/repl.c /^typedef struct btree btree;$/;" t typeref:struct:btree file: |
| 155 | btree source/engine/engine_repl.h /^struct btree$/;" s | 169 | btree source/repl/repl.h /^struct btree$/;" s |
| 156 | btree source/engine/engine_repl.h /^typedef struct btree btree;$/;" t typeref:struct:btree | 170 | btree source/repl/repl.h /^typedef struct btree btree;$/;" t typeref:struct:btree |
| 157 | calculate_padding source/base/base_stack.c /^calculate_padding(u64 pointer, u8 alignment, u64 header_size)$/;" f typeref:typename:internal u8 | 171 | calculate_padding source/base/base_stack.c /^calculate_padding(u64 pointer, u8 alignment, u64 header_size)$/;" f typeref:typename:internal u8 |
| 158 | capacity source/base/base_arena.h /^ u64 capacity;$/;" m struct:mem_arena typeref:typename:u64 | 172 | capacity source/base/base_arena.h /^ u64 capacity;$/;" m struct:mem_arena typeref:typename:u64 |
| 159 | capacity source/base/base_stack.h /^ u64 capacity;$/;" m struct:mem_stack typeref:typename:u64 | 173 | capacity source/base/base_stack.h /^ u64 capacity;$/;" m struct:mem_stack typeref:typename:u64 |
| @@ -161,19 +175,28 @@ check source/base/base_test.h /^#define check(/;" d | |||
| 161 | checkpoint source/base/base_test.h /^#define checkpoint /;" d | 175 | checkpoint source/base/base_test.h /^#define checkpoint /;" d |
| 162 | checkpoint_end_output source/base/base_test.h /^#define checkpoint_end_output /;" d | 176 | checkpoint_end_output source/base/base_test.h /^#define checkpoint_end_output /;" d |
| 163 | checkpoint_output source/base/base_test.h /^#define checkpoint_output /;" d | 177 | checkpoint_output source/base/base_test.h /^#define checkpoint_output /;" d |
| 178 | children source/storage/b_tree.h /^ b_tree_node *children[B_TREE_ORDER];$/;" m struct:b_tree_node typeref:typename:b_tree_node * [] | ||
| 164 | clean Makefile /^clean:$/;" t | 179 | clean Makefile /^clean:$/;" t |
| 180 | col_count source/storage/csv_reader.h /^ i32 col_count;$/;" m struct:csv_table typeref:typename:i32 | ||
| 181 | count source/storage/csv_reader.h /^ i32 count;$/;" m struct:csv_row typeref:typename:i32 | ||
| 182 | csv_row source/storage/csv_reader.h /^struct csv_row$/;" s | ||
| 183 | csv_row source/storage/csv_reader.h /^typedef struct csv_row csv_row;$/;" t typeref:struct:csv_row | ||
| 184 | csv_table source/storage/csv_reader.h /^struct csv_table$/;" s | ||
| 185 | csv_table source/storage/csv_reader.h /^typedef struct csv_table csv_table;$/;" t typeref:struct:csv_table | ||
| 165 | current_offset source/base/base_stack.h /^ u64 current_offset;$/;" m struct:mem_stack typeref:typename:u64 | 186 | current_offset source/base/base_stack.h /^ u64 current_offset;$/;" m struct:mem_stack typeref:typename:u64 |
| 166 | current_position source/base/base_arena.h /^ u64 current_position;$/;" m struct:mem_arena typeref:typename:u64 | 187 | current_position source/base/base_arena.h /^ u64 current_position;$/;" m struct:mem_arena typeref:typename:u64 |
| 167 | data source/base/base_string.h /^ u8 *data;$/;" m struct:string8 typeref:typename:u8 * | 188 | data source/base/base_string.h /^ u8 *data;$/;" m struct:string8 typeref:typename:u8 * |
| 168 | database engine in c README.md /^# database engine in c$/;" c | 189 | database engine in c README.md /^# database engine in c$/;" c |
| 169 | f32 source/base/base.h /^typedef float f32;$/;" t typeref:typename:float | 190 | f32 source/base/base.h /^typedef float f32;$/;" t typeref:typename:float |
| 170 | f64 source/base/base.h /^typedef double f64;$/;" t typeref:typename:double | 191 | f64 source/base/base.h /^typedef double f64;$/;" t typeref:typename:double |
| 192 | fields source/storage/csv_reader.h /^ string8 *fields;$/;" m struct:csv_row typeref:typename:string8 * | ||
| 171 | generate_hash source/base/base_hash.c /^generate_hash()$/;" f typeref:typename:internal u64 | 193 | generate_hash source/base/base_hash.c /^generate_hash()$/;" f typeref:typename:internal u64 |
| 172 | global_variable source/base/base.h /^#define global_variable /;" d | 194 | global_variable source/base/base.h /^#define global_variable /;" d |
| 173 | hash source/base/bash_hash.h /^typedef struct hash hash;$/;" t typeref:struct:hash | 195 | hash source/base/bash_hash.h /^typedef struct hash hash;$/;" t typeref:struct:hash |
| 174 | hash_map source/base/bash_hash.h /^struct hash_map $/;" s | 196 | hash_map source/base/bash_hash.h /^struct hash_map $/;" s |
| 175 | hash_map source/base/bash_hash.h /^typedef struct hash_map hash_map;$/;" t typeref:struct:hash_map | 197 | hash_map source/base/bash_hash.h /^typedef struct hash_map hash_map;$/;" t typeref:struct:hash_map |
| 176 | header source/base/base_stack.h /^ mem_stack_header *header;$/;" m struct:mem_stack typeref:typename:mem_stack_header * | 198 | header source/base/base_stack.h /^ mem_stack_header *header;$/;" m struct:mem_stack typeref:typename:mem_stack_header * |
| 199 | headers source/storage/csv_reader.h /^ string8 *headers;$/;" m struct:csv_table typeref:typename:string8 * | ||
| 177 | i16 source/base/base.h /^typedef int16_t i16;$/;" t typeref:typename:int16_t | 200 | i16 source/base/base.h /^typedef int16_t i16;$/;" t typeref:typename:int16_t |
| 178 | i32 source/base/base.h /^typedef int32_t i32;$/;" t typeref:typename:int32_t | 201 | i32 source/base/base.h /^typedef int32_t i32;$/;" t typeref:typename:int32_t |
| 179 | i64 source/base/base.h /^typedef int64_t i64;$/;" t typeref:typename:int64_t | 202 | i64 source/base/base.h /^typedef int64_t i64;$/;" t typeref:typename:int64_t |
| @@ -181,30 +204,42 @@ i8 source/base/base.h /^typedef int8_t i8;$/;" t typeref:typename:int8_t | |||
| 181 | input_read source/base/base_io.h /^input_read()$/;" f typeref:typename:internal void | 204 | input_read source/base/base_io.h /^input_read()$/;" f typeref:typename:internal void |
| 182 | internal source/base/base.h /^#define internal /;" d | 205 | internal source/base/base.h /^#define internal /;" d |
| 183 | is_pow source/base/base_mem.h /^is_pow(umm x)$/;" f typeref:typename:internal b8 | 206 | is_pow source/base/base_mem.h /^is_pow(umm x)$/;" f typeref:typename:internal b8 |
| 184 | lexeme source/engine/engine_lexer.h /^ string8 lexeme;$/;" m struct:token typeref:typename:string8 | 207 | key_count source/storage/b_tree.h /^ i32 key_count;$/;" m struct:b_tree_node typeref:typename:i32 |
| 208 | keys source/storage/b_tree.h /^ string8 keys[B_TREE_ORDER - 1];$/;" m struct:b_tree_node typeref:typename:string8[] | ||
| 209 | leaf source/storage/b_tree.h /^ b32 leaf;$/;" m struct:b_tree_node typeref:typename:b32 | ||
| 210 | lexeme source/lexer/lexer.h /^ string8 lexeme;$/;" m struct:token typeref:typename:string8 | ||
| 211 | load_file source/base/base_os.h /^load_file(const char *path)$/;" f typeref:typename:internal string8 | ||
| 185 | local_persist source/base/base.h /^#define local_persist /;" d | 212 | local_persist source/base/base.h /^#define local_persist /;" d |
| 186 | main source/engine/engine_main.c /^int main(int c, char **v)$/;" f typeref:typename:int | 213 | main source/engine/engine.c /^int main(int c, char **v)$/;" f typeref:typename:int |
| 187 | mem_arena source/base/base_arena.h /^struct mem_arena$/;" s | 214 | mem_arena source/base/base_arena.h /^struct mem_arena$/;" s |
| 188 | mem_arena source/base/base_arena.h /^typedef struct mem_arena mem_arena;$/;" t typeref:struct:mem_arena | 215 | mem_arena source/base/base_arena.h /^typedef struct mem_arena mem_arena;$/;" t typeref:struct:mem_arena |
| 189 | mem_stack source/base/base_stack.h /^struct mem_stack$/;" s | 216 | mem_stack source/base/base_stack.h /^struct mem_stack$/;" s |
| 190 | mem_stack source/base/base_stack.h /^typedef struct mem_stack mem_stack;$/;" t typeref:struct:mem_stack | 217 | mem_stack source/base/base_stack.h /^typedef struct mem_stack mem_stack;$/;" t typeref:struct:mem_stack |
| 191 | mem_stack_header source/base/base_stack.h /^struct mem_stack_header$/;" s | 218 | mem_stack_header source/base/base_stack.h /^struct mem_stack_header$/;" s |
| 192 | mem_stack_header source/base/base_stack.h /^typedef struct mem_stack_header mem_stack_header;$/;" t typeref:struct:mem_stack_header | 219 | mem_stack_header source/base/base_stack.h /^typedef struct mem_stack_header mem_stack_header;$/;" t typeref:struct:mem_stack_header |
| 193 | node source/engine/engine_parser.c /^struct node$/;" s file: | 220 | nil_csv_row source/storage/csv_reader.h /^csv_row nil_csv_row =$/;" v typeref:typename:read_only global_variable csv_row |
| 194 | node source/engine/engine_parser.c /^typedef struct node node;$/;" t typeref:struct:node file: | 221 | nil_csv_table source/storage/csv_reader.h /^csv_table nil_csv_table =$/;" v typeref:typename:read_only global_variable csv_table |
| 195 | node source/engine/engine_parser.h /^struct node$/;" s | 222 | nil_string source/base/base_string.h /^string8 nil_string =$/;" v typeref:typename:read_only global_variable string8 |
| 196 | node source/engine/engine_parser.h /^typedef struct node node;$/;" t typeref:struct:node | 223 | node source/parser/parser.c /^struct node$/;" s file: |
| 197 | node source/engine/engine_repl.c /^struct node$/;" s file: | 224 | node source/parser/parser.c /^typedef struct node node;$/;" t typeref:struct:node file: |
| 198 | node source/engine/engine_repl.c /^typedef struct node node;$/;" t typeref:struct:node file: | 225 | node source/parser/parser.h /^struct node$/;" s |
| 199 | node source/engine/engine_repl.h /^struct node$/;" s | 226 | node source/parser/parser.h /^typedef struct node node;$/;" t typeref:struct:node |
| 200 | node source/engine/engine_repl.h /^typedef struct node node;$/;" t typeref:struct:node | 227 | node source/repl/repl.c /^struct node$/;" s file: |
| 228 | node source/repl/repl.c /^typedef struct node node;$/;" t typeref:struct:node file: | ||
| 229 | node source/repl/repl.h /^struct node$/;" s | ||
| 230 | node source/repl/repl.h /^typedef struct node node;$/;" t typeref:struct:node | ||
| 201 | padding source/base/base_stack.h /^ u8 padding;$/;" m struct:mem_stack_header typeref:typename:u8 | 231 | padding source/base/base_stack.h /^ u8 padding;$/;" m struct:mem_stack_header typeref:typename:u8 |
| 232 | parent source/storage/b_tree.h /^ b_tree_node *parent;$/;" m struct:b_tree_node typeref:typename:b_tree_node * | ||
| 202 | previous_offset source/base/base_stack.h /^ u8 previous_offset;$/;" m struct:mem_stack_header typeref:typename:u8 | 233 | previous_offset source/base/base_stack.h /^ u8 previous_offset;$/;" m struct:mem_stack_header typeref:typename:u8 |
| 203 | previous_position source/base/base_arena.h /^ u64 previous_position;$/;" m struct:mem_arena typeref:typename:u64 | 234 | previous_position source/base/base_arena.h /^ u64 previous_position;$/;" m struct:mem_arena typeref:typename:u64 |
| 204 | print source/base/base_os.h /^#define print(Format) print(/;" d | ||
| 205 | print source/base/base_os.h /^print(const char *str)$/;" f typeref:typename:internal void | 235 | print source/base/base_os.h /^print(const char *str)$/;" f typeref:typename:internal void |
| 236 | read_csv source/storage/csv_reader.c /^read_csv(string8 buffer)$/;" f typeref:typename:internal void | ||
| 206 | read_only source/base/base.h /^#define read_only /;" d | 237 | read_only source/base/base.h /^#define read_only /;" d |
| 207 | read_only source/base/base.h /^#define read_only$/;" d | 238 | read_only source/base/base.h /^#define read_only$/;" d |
| 239 | root source/storage/b_tree.h /^ b_tree_node *root;$/;" m struct:b_tree typeref:typename:b_tree_node * | ||
| 240 | row_count source/storage/csv_reader.h /^ i32 row_count;$/;" m struct:csv_table typeref:typename:i32 | ||
| 241 | rows source/storage/b_tree.h /^ csv_row *rows[B_TREE_ORDER - 1];$/;" m struct:b_tree_node typeref:typename:csv_row * [] | ||
| 242 | rows source/storage/csv_reader.h /^ csv_row *rows;$/;" m struct:csv_table typeref:typename:csv_row * | ||
| 208 | run Makefile /^run:$/;" t | 243 | run Makefile /^run:$/;" t |
| 209 | show source/base/base_test.h /^#define show /;" d | 244 | show source/base/base_test.h /^#define show /;" d |
| 210 | size source/base/base_string.h /^ u64 size;$/;" m struct:string8 typeref:typename:u64 | 245 | size source/base/base_string.h /^ u64 size;$/;" m struct:string8 typeref:typename:u64 |
| @@ -228,12 +263,12 @@ temp_arena_begin source/base/base_arena.c /^temp_arena_begin(mem_arena *arena)$/ | |||
| 228 | temp_arena_end source/base/base_arena.c /^temp_arena_end(temp_arena temp)$/;" f typeref:typename:internal void | 263 | temp_arena_end source/base/base_arena.c /^temp_arena_end(temp_arena temp)$/;" f typeref:typename:internal void |
| 229 | temp_breakpoint source/base/base.h /^#define temp_breakpoint /;" d | 264 | temp_breakpoint source/base/base.h /^#define temp_breakpoint /;" d |
| 230 | test source/base/base_test.h /^#define test(/;" d | 265 | test source/base/base_test.h /^#define test(/;" d |
| 231 | token source/engine/engine_lexer.h /^struct token$/;" s | 266 | token source/lexer/lexer.h /^struct token$/;" s |
| 232 | token source/engine/engine_lexer.h /^typedef struct token token;$/;" t typeref:struct:token | 267 | token source/lexer/lexer.h /^typedef struct token token;$/;" t typeref:struct:token |
| 233 | token_type source/engine/engine_lexer.h /^enum token_type$/;" g | 268 | token_type source/lexer/lexer.h /^enum token_type$/;" g |
| 234 | token_type source/engine/engine_lexer.h /^typedef enum token_type token_type;$/;" t typeref:enum:token_type | 269 | token_type source/lexer/lexer.h /^typedef enum token_type token_type;$/;" t typeref:enum:token_type |
| 235 | tokenize source/engine/engine_lexer.c /^tokenize(string8 buffer)$/;" f typeref:typename:internal token * | 270 | tokenize_csv source/lexer/lexer.c /^tokenize_csv(string8 buffer)$/;" f typeref:typename:internal token * |
| 236 | type source/engine/engine_lexer.h /^ token_type type;$/;" m struct:token typeref:typename:token_type | 271 | type source/lexer/lexer.h /^ token_type type;$/;" m struct:token typeref:typename:token_type |
| 237 | u16 source/base/base.h /^typedef uint16_t u16;$/;" t typeref:typename:uint16_t | 272 | u16 source/base/base.h /^typedef uint16_t u16;$/;" t typeref:typename:uint16_t |
| 238 | u32 source/base/base.h /^typedef uint32_t u32;$/;" t typeref:typename:uint32_t | 273 | u32 source/base/base.h /^typedef uint32_t u32;$/;" t typeref:typename:uint32_t |
| 239 | u64 source/base/base.h /^typedef uint64_t u64;$/;" t typeref:typename:uint64_t | 274 | u64 source/base/base.h /^typedef uint64_t u64;$/;" t typeref:typename:uint64_t |
