diff options
| author | nasr <nsrddyn@gmail.com> | 2026-03-02 22:44:17 +0000 |
|---|---|---|
| committer | nasr <nsrddyn@gmail.com> | 2026-03-02 22:44:17 +0000 |
| commit | 4e77bc7164070d7ffafdee1ba6ce3bb1aaf10746 (patch) | |
| tree | e878f009730e934dfe5e295d4b24dfd906f0eb73 | |
| parent | 56ebfa3f4b0d7a80090b344b294252d2be152bb0 (diff) | |
feature(main): loading file + bug fixes
structure improvement
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | source/base/base_include.h | 3 | ||||
| -rw-r--r-- | source/base/base_mem.c | 17 | ||||
| -rw-r--r-- | source/base/base_mem.h | 18 | ||||
| -rw-r--r-- | source/base/base_os.h | 41 | ||||
| -rw-r--r-- | source/base/base_string.c | 63 | ||||
| -rw-r--r-- | source/base/base_string.h | 45 | ||||
| -rw-r--r-- | source/engine/#engine_repl.c# | 7 | ||||
| -rw-r--r-- | source/engine/engine.c | 34 | ||||
| -rw-r--r-- | source/engine/engine_entry.c | 16 | ||||
| -rw-r--r-- | source/engine/engine_repl.c | 8 | ||||
| -rw-r--r-- | source/lexer/lexer.c | 8 | ||||
| -rw-r--r-- | source/lexer/lexer.h | 23 | ||||
| -rw-r--r-- | source/parser/parser.c (renamed from source/engine/engine_repl.h) | 1 | ||||
| -rw-r--r-- | source/parser/parser.h | 16 | ||||
| -rw-r--r-- | source/repl/repl.c | 16 | ||||
| -rw-r--r-- | source/repl/repl.h | 16 | ||||
| -rw-r--r-- | source/storage/csv_reader.c (renamed from source/base/base_test.c) | 0 | ||||
| -rw-r--r-- | source/storage/csv_reader.h | 0 | ||||
| -rw-r--r-- | tags | 243 |
20 files changed, 453 insertions, 124 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | BIN = build/engine | 1 | BIN = build/engine |
| 2 | SRC = source/engine/engine_entry.c | 2 | SRC = source/engine/engine.c |
| 3 | CC = clang | 3 | CC = clang |
| 4 | CFLAGS = -Wall -Wextra -Wfloat-equal -Wswitch-default -Wswitch-enum \ | 4 | CFLAGS = -Wall -Wextra -Wfloat-equal -Wswitch-default -Wswitch-enum \ |
| 5 | -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-unused-function -g -Werror | 5 | -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-unused-function -g -Werror |
diff --git a/source/base/base_include.h b/source/base/base_include.h index 0b0f256..40ae5ea 100755 --- a/source/base/base_include.h +++ b/source/base/base_include.h | |||
| @@ -20,11 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | #ifdef BASE_UNITY | 21 | #ifdef BASE_UNITY |
| 22 | 22 | ||
| 23 | #include "base_mem.c" | ||
| 24 | #include "base_arena.c" | 23 | #include "base_arena.c" |
| 25 | #include "base_stack.c" | 24 | #include "base_stack.c" |
| 26 | #include "base_test.c" | ||
| 27 | #include "base_string.c" | ||
| 28 | 25 | ||
| 29 | #endif | 26 | #endif |
| 30 | #endif | 27 | #endif |
diff --git a/source/base/base_mem.c b/source/base/base_mem.c index f20ba39..e69de29 100644 --- a/source/base/base_mem.c +++ b/source/base/base_mem.c | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | internal inline b8 | ||
| 2 | is_pow(umm x) | ||
| 3 | { | ||
| 4 | return (x & (x - 1)) == 0; | ||
| 5 | } | ||
| 6 | |||
| 7 | internal inline u64 | ||
| 8 | align(u64 pointer, umm alignment) | ||
| 9 | { | ||
| 10 | if ((alignment & (alignment - 1)) == 0) | ||
| 11 | { | ||
| 12 | return pointer; | ||
| 13 | } | ||
| 14 | |||
| 15 | return (pointer + alignment - 1) & ~(alignment - 1); | ||
| 16 | } | ||
| 17 | |||
diff --git a/source/base/base_mem.h b/source/base/base_mem.h index 945f0ce..2778fce 100644 --- a/source/base/base_mem.h +++ b/source/base/base_mem.h | |||
| @@ -5,4 +5,22 @@ | |||
| 5 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) | 5 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| 6 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) | 6 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) |
| 7 | 7 | ||
| 8 | internal inline b8 | ||
| 9 | is_pow(umm x) | ||
| 10 | { | ||
| 11 | return (x & (x - 1)) == 0; | ||
| 12 | } | ||
| 13 | |||
| 14 | internal inline u64 | ||
| 15 | align(u64 pointer, umm alignment) | ||
| 16 | { | ||
| 17 | if ((alignment & (alignment - 1)) == 0) | ||
| 18 | { | ||
| 19 | return pointer; | ||
| 20 | } | ||
| 21 | |||
| 22 | return (pointer + alignment - 1) & ~(alignment - 1); | ||
| 23 | } | ||
| 24 | |||
| 25 | |||
| 8 | #endif | 26 | #endif |
diff --git a/source/base/base_os.h b/source/base/base_os.h index ce9acae..ec0a3de 100644 --- a/source/base/base_os.h +++ b/source/base/base_os.h | |||
| @@ -9,6 +9,45 @@ print(const char *str) | |||
| 9 | write(STDOUT_FILENO, str, len); | 9 | write(STDOUT_FILENO, str, len); |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | #define print(Format) print(Format) | 12 | internal string8 |
| 13 | load_file(const char *path) | ||
| 14 | { | ||
| 15 | string8 result = {0}; | ||
| 16 | struct stat sbuf = {0}; | ||
| 17 | int err = 0; | ||
| 18 | i32 file = open(path, O_RDONLY); | ||
| 19 | |||
| 20 | if(file) | ||
| 21 | { | ||
| 22 | |||
| 23 | if(file != -1) | ||
| 24 | { | ||
| 25 | err = fstat(file, &sbuf); | ||
| 26 | check(err != -1); | ||
| 27 | |||
| 28 | result.size = (u64)sbuf.st_size; | ||
| 29 | |||
| 30 | if(result.size != 0) | ||
| 31 | { | ||
| 32 | result.data = (u8 *)mmap(0, | ||
| 33 | result.size, | ||
| 34 | PROT_READ, | ||
| 35 | MAP_PRIVATE, | ||
| 36 | file, | ||
| 37 | 0); | ||
| 38 | |||
| 39 | check(result.data != MAP_FAILED); | ||
| 40 | } | ||
| 41 | |||
| 42 | close(file); | ||
| 43 | } | ||
| 44 | else | ||
| 45 | { | ||
| 46 | // TODO(nasr): logging | ||
| 47 | } | ||
| 48 | |||
| 49 | } | ||
| 50 | return result; | ||
| 51 | } | ||
| 13 | 52 | ||
| 14 | #endif /* BASE_OS_H */ | 53 | #endif /* BASE_OS_H */ |
diff --git a/source/base/base_string.c b/source/base/base_string.c deleted file mode 100644 index 9d09914..0000000 --- a/source/base/base_string.c +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | internal b8 | ||
| 2 | compare_string(string c1, string c2) | ||
| 3 | { | ||
| 4 | if (c1.size != c2.size) | ||
| 5 | { | ||
| 6 | return 0; | ||
| 7 | } | ||
| 8 | |||
| 9 | for (u64 index = 0; index < c1.size; ++index) | ||
| 10 | { | ||
| 11 | if (c1.data[index] != c2.data[index]) | ||
| 12 | { | ||
| 13 | return 0; | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | return 1; | ||
| 18 | } | ||
| 19 | |||
| 20 | internal b8 | ||
| 21 | compare_u8(u8 *c1, u8 *c2, u64 len) | ||
| 22 | { | ||
| 23 | if (sizeof(c1) != len || sizeof(c2) != len) | ||
| 24 | { | ||
| 25 | return 0; | ||
| 26 | } | ||
| 27 | |||
| 28 | if (sizeof(*c1) != sizeof(*c2)) | ||
| 29 | { | ||
| 30 | return 0; | ||
| 31 | } | ||
| 32 | |||
| 33 | for (u64 word_idx = 0; word_idx <= sizeof(*c1); ++word_idx) | ||
| 34 | { | ||
| 35 | if (*c1 != *c2) | ||
| 36 | { | ||
| 37 | return 0; | ||
| 38 | } | ||
| 39 | |||
| 40 | ++c1; | ||
| 41 | ++c2; | ||
| 42 | } | ||
| 43 | |||
| 44 | return 1; | ||
| 45 | } | ||
| 46 | |||
| 47 | internal u64 | ||
| 48 | to_u64(u8 *buf, umm len) | ||
| 49 | { | ||
| 50 | u64 value = 0; | ||
| 51 | |||
| 52 | for (umm buffer_idx = 0; buffer_idx < len; ++buffer_idx) | ||
| 53 | { | ||
| 54 | u8 c = buf[buffer_idx]; | ||
| 55 | if (c < '0' || c > '9') | ||
| 56 | { | ||
| 57 | break; | ||
| 58 | } | ||
| 59 | value = value * 10 + (c - '0'); | ||
| 60 | } | ||
| 61 | |||
| 62 | return value; | ||
| 63 | } | ||
diff --git a/source/base/base_string.h b/source/base/base_string.h index 5f875e0..941dc53 100644 --- a/source/base/base_string.h +++ b/source/base/base_string.h | |||
| @@ -1,15 +1,46 @@ | |||
| 1 | #ifndef BASE_STRING_H | 1 | #ifndef BASE_STRING_H |
| 2 | #define BASE_STRING_H | 2 | #define BASE_STRING_H |
| 3 | 3 | ||
| 4 | #define _StringCast (string) | 4 | #include <string.h> |
| 5 | #define StringCast { .data (u8 *)(string), .size = (sizeof((string)) - 1)} | ||
| 6 | #define PushString (Arena, Size) StringCast{.data = PushArray((arena), PushStruct(u8), (Size)), .size = (u64)(Size)} | ||
| 7 | 5 | ||
| 8 | typedef struct string string; | 6 | #define StringLit(string) \ |
| 9 | struct string | 7 | (string8){ .data = (u8 *)(string), .size = (sizeof(string) - 1) } |
| 8 | |||
| 9 | #define PushString(arena, size) \ | ||
| 10 | (string8){ (u8 *)PushArray((arena), u8, (size)), (u64)(size) } | ||
| 11 | |||
| 12 | typedef struct string8 string8; | ||
| 13 | struct string8 | ||
| 10 | { | 14 | { |
| 11 | u8 *data; | 15 | u8 *data; |
| 12 | u64 size; | 16 | u64 size; |
| 13 | }; | 17 | }; |
| 14 | 18 | ||
| 19 | internal b8 | ||
| 20 | string8_cmp(string8 a, string8 b) | ||
| 21 | { | ||
| 22 | if (a.size != b.size) return 0; | ||
| 23 | return (b8)(memcmp(a.data, b.data, a.size) == 0); | ||
| 24 | } | ||
| 25 | |||
| 26 | internal u64 | ||
| 27 | string8_to_u64(u8 *buf, umm len) | ||
| 28 | { | ||
| 29 | u64 value = 0; | ||
| 30 | for (umm i = 0; i < len; ++i) | ||
| 31 | { | ||
| 32 | u8 c = buf[i]; | ||
| 33 | if (c < '0' || c > '9') break; | ||
| 34 | value = value * 10 + (c - '0'); | ||
| 35 | } | ||
| 36 | return value; | ||
| 37 | } | ||
| 38 | |||
| 39 | internal void | ||
| 40 | string8_append_char(string8 *buf, u8 c) | ||
| 41 | { | ||
| 42 | buf->data[buf->size] = c; | ||
| 43 | buf->size += 1; | ||
| 44 | } | ||
| 45 | |||
| 15 | #endif /* BASE_STRING_H */ | 46 | #endif /* BASE_STRING_H */ |
diff --git a/source/engine/#engine_repl.c# b/source/engine/#engine_repl.c# deleted file mode 100644 index be43645..0000000 --- a/source/engine/#engine_repl.c# +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | |||
| 2 | internal void | ||
| 3 | tokenize(str8 ) | ||
| 4 | { | ||
| 5 | |||
| 6 | |||
| 7 | } | ||
diff --git a/source/engine/engine.c b/source/engine/engine.c new file mode 100644 index 0000000..609101e --- /dev/null +++ b/source/engine/engine.c | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #define BASE_UNITY | ||
| 2 | #include "../base/base_include.h" | ||
| 3 | |||
| 4 | #include "../lexer/lexer.h" | ||
| 5 | #include "../lexer/lexer.c" | ||
| 6 | |||
| 7 | #include "../parser/parser.h" | ||
| 8 | #include "../parser/parser.c" | ||
| 9 | |||
| 10 | #include "../repl/repl.h" | ||
| 11 | #include "../repl/repl.c" | ||
| 12 | |||
| 13 | int main(int c, char **v) | ||
| 14 | { | ||
| 15 | mem_arena *global_arena = arena_create(MiB(1)); | ||
| 16 | |||
| 17 | unused(c); | ||
| 18 | unused(v); | ||
| 19 | |||
| 20 | string8 buffer = PushString(global_arena, 5); | ||
| 21 | unused(buffer); | ||
| 22 | |||
| 23 | |||
| 24 | for (;;) | ||
| 25 | { | ||
| 26 | print("reading user input..."); | ||
| 27 | // TODO(nasr): design a repl system | ||
| 28 | |||
| 29 | sleep(1); | ||
| 30 | } | ||
| 31 | |||
| 32 | } | ||
| 33 | |||
| 34 | |||
diff --git a/source/engine/engine_entry.c b/source/engine/engine_entry.c deleted file mode 100644 index 8973dee..0000000 --- a/source/engine/engine_entry.c +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | #define BASE_UNITY | ||
| 2 | #include "../base/base_include.h" | ||
| 3 | |||
| 4 | #include "engine_repl.h" | ||
| 5 | #include "engine_repl.c" | ||
| 6 | |||
| 7 | int main(int c, char **v) | ||
| 8 | { | ||
| 9 | unused(c); | ||
| 10 | unused(v); | ||
| 11 | |||
| 12 | for (;;) | ||
| 13 | { | ||
| 14 | |||
| 15 | } | ||
| 16 | } | ||
diff --git a/source/engine/engine_repl.c b/source/engine/engine_repl.c deleted file mode 100644 index ead6c7b..0000000 --- a/source/engine/engine_repl.c +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | |||
| 2 | internal tokens * | ||
| 3 | tokenize(string buffer) | ||
| 4 | { | ||
| 5 | |||
| 6 | |||
| 7 | |||
| 8 | } | ||
diff --git a/source/lexer/lexer.c b/source/lexer/lexer.c new file mode 100644 index 0000000..60a5cda --- /dev/null +++ b/source/lexer/lexer.c | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | internal token * | ||
| 2 | tokenize(string8 buffer) | ||
| 3 | { | ||
| 4 | |||
| 5 | // TODO(nasr): tokenize the user input | ||
| 6 | |||
| 7 | return NULL; | ||
| 8 | } | ||
diff --git a/source/lexer/lexer.h b/source/lexer/lexer.h new file mode 100644 index 0000000..86f8427 --- /dev/null +++ b/source/lexer/lexer.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #ifndef ENGINE_LEXER_H | ||
| 2 | #define ENGINE_LEXER_H | ||
| 3 | |||
| 4 | typedef enum token_type token_type; | ||
| 5 | enum token_type | ||
| 6 | { | ||
| 7 | // first 255 tokens for ascii characters | ||
| 8 | TOKEN_UNDEFINED = 255, | ||
| 9 | TOKEN_IDENTIFIER, | ||
| 10 | TOKEN_VALUE, | ||
| 11 | |||
| 12 | }; | ||
| 13 | |||
| 14 | typedef struct token token; | ||
| 15 | struct token | ||
| 16 | { | ||
| 17 | string8 lexeme; | ||
| 18 | token_type type; | ||
| 19 | |||
| 20 | }; | ||
| 21 | |||
| 22 | |||
| 23 | #endif /* ENGINE_LEXER_H */ | ||
diff --git a/source/engine/engine_repl.h b/source/parser/parser.c index eb20524..4c57345 100644 --- a/source/engine/engine_repl.h +++ b/source/parser/parser.c | |||
| @@ -13,5 +13,4 @@ struct btree | |||
| 13 | 13 | ||
| 14 | }; | 14 | }; |
| 15 | 15 | ||
| 16 | |||
| 17 | #endif /* ENGINE_H */ | 16 | #endif /* ENGINE_H */ |
diff --git a/source/parser/parser.h b/source/parser/parser.h new file mode 100644 index 0000000..4c57345 --- /dev/null +++ b/source/parser/parser.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef ENGINE_REPL_H | ||
| 2 | #define ENGINE_REPL_H | ||
| 3 | |||
| 4 | typedef struct node node; | ||
| 5 | struct node | ||
| 6 | { | ||
| 7 | |||
| 8 | }; | ||
| 9 | |||
| 10 | typedef struct btree btree; | ||
| 11 | struct btree | ||
| 12 | { | ||
| 13 | |||
| 14 | }; | ||
| 15 | |||
| 16 | #endif /* ENGINE_H */ | ||
diff --git a/source/repl/repl.c b/source/repl/repl.c new file mode 100644 index 0000000..4c57345 --- /dev/null +++ b/source/repl/repl.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef ENGINE_REPL_H | ||
| 2 | #define ENGINE_REPL_H | ||
| 3 | |||
| 4 | typedef struct node node; | ||
| 5 | struct node | ||
| 6 | { | ||
| 7 | |||
| 8 | }; | ||
| 9 | |||
| 10 | typedef struct btree btree; | ||
| 11 | struct btree | ||
| 12 | { | ||
| 13 | |||
| 14 | }; | ||
| 15 | |||
| 16 | #endif /* ENGINE_H */ | ||
diff --git a/source/repl/repl.h b/source/repl/repl.h new file mode 100644 index 0000000..4c57345 --- /dev/null +++ b/source/repl/repl.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef ENGINE_REPL_H | ||
| 2 | #define ENGINE_REPL_H | ||
| 3 | |||
| 4 | typedef struct node node; | ||
| 5 | struct node | ||
| 6 | { | ||
| 7 | |||
| 8 | }; | ||
| 9 | |||
| 10 | typedef struct btree btree; | ||
| 11 | struct btree | ||
| 12 | { | ||
| 13 | |||
| 14 | }; | ||
| 15 | |||
| 16 | #endif /* ENGINE_H */ | ||
diff --git a/source/base/base_test.c b/source/storage/csv_reader.c index e69de29..e69de29 100644 --- a/source/base/base_test.c +++ b/source/storage/csv_reader.c | |||
diff --git a/source/storage/csv_reader.h b/source/storage/csv_reader.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/source/storage/csv_reader.h | |||
| @@ -0,0 +1,243 @@ | |||
| 1 | !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ | ||
| 2 | !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ | ||
| 3 | !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ | ||
| 4 | !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ | ||
| 5 | !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ | ||
| 6 | !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ | ||
| 7 | !_TAG_FIELD_DESCRIPTION input /input file/ | ||
| 8 | !_TAG_FIELD_DESCRIPTION name /tag name/ | ||
| 9 | !_TAG_FIELD_DESCRIPTION pattern /pattern/ | ||
| 10 | !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ | ||
| 11 | !_TAG_FIELD_DESCRIPTION!C++ name /aliased names/ | ||
| 12 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ | ||
| 13 | !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ | ||
| 14 | !_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/ | ||
| 15 | !_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/ | ||
| 16 | !_TAG_KIND_DESCRIPTION!C f,function /function definitions/ | ||
| 17 | !_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/ | ||
| 18 | !_TAG_KIND_DESCRIPTION!C h,header /included header files/ | ||
| 19 | !_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/ | ||
| 20 | !_TAG_KIND_DESCRIPTION!C s,struct /structure names/ | ||
| 21 | !_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/ | ||
| 22 | !_TAG_KIND_DESCRIPTION!C u,union /union names/ | ||
| 23 | !_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/ | ||
| 24 | !_TAG_KIND_DESCRIPTION!C++ M,module /modules/ | ||
| 25 | !_TAG_KIND_DESCRIPTION!C++ P,partition /partitions/ | ||
| 26 | !_TAG_KIND_DESCRIPTION!C++ c,class /classes/ | ||
| 27 | !_TAG_KIND_DESCRIPTION!C++ d,macro /macro definitions/ | ||
| 28 | !_TAG_KIND_DESCRIPTION!C++ e,enumerator /enumerators (values inside an enumeration)/ | ||
| 29 | !_TAG_KIND_DESCRIPTION!C++ f,function /function definitions/ | ||
| 30 | !_TAG_KIND_DESCRIPTION!C++ g,enum /enumeration names/ | ||
| 31 | !_TAG_KIND_DESCRIPTION!C++ h,header /included header files/ | ||
| 32 | !_TAG_KIND_DESCRIPTION!C++ m,member /class, struct, and union members/ | ||
| 33 | !_TAG_KIND_DESCRIPTION!C++ n,namespace /namespaces/ | ||
| 34 | !_TAG_KIND_DESCRIPTION!C++ s,struct /structure names/ | ||
| 35 | !_TAG_KIND_DESCRIPTION!C++ t,typedef /typedefs/ | ||
| 36 | !_TAG_KIND_DESCRIPTION!C++ u,union /union names/ | ||
| 37 | !_TAG_KIND_DESCRIPTION!C++ v,variable /variable definitions/ | ||
| 38 | !_TAG_KIND_DESCRIPTION!Make I,makefile /makefiles/ | ||
| 39 | !_TAG_KIND_DESCRIPTION!Make m,macro /macros/ | ||
| 40 | !_TAG_KIND_DESCRIPTION!Make t,target /targets/ | ||
| 41 | !_TAG_KIND_DESCRIPTION!Markdown S,subsection /level 2 sections/ | ||
| 42 | !_TAG_KIND_DESCRIPTION!Markdown T,l4subsection /level 4 sections/ | ||
| 43 | !_TAG_KIND_DESCRIPTION!Markdown c,chapter /chapters/ | ||
| 44 | !_TAG_KIND_DESCRIPTION!Markdown h,hashtag /hashtags/ | ||
| 45 | !_TAG_KIND_DESCRIPTION!Markdown n,footnote /footnotes/ | ||
| 46 | !_TAG_KIND_DESCRIPTION!Markdown s,section /sections/ | ||
| 47 | !_TAG_KIND_DESCRIPTION!Markdown t,subsubsection /level 3 sections/ | ||
| 48 | !_TAG_KIND_DESCRIPTION!Markdown u,l5subsection /level 5 sections/ | ||
| 49 | !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ | ||
| 50 | !_TAG_OUTPUT_FILESEP slash /slash or backslash/ | ||
| 51 | !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ | ||
| 52 | !_TAG_OUTPUT_VERSION 1.1 /current.age/ | ||
| 53 | !_TAG_PARSER_VERSION!C 1.1 /current.age/ | ||
| 54 | !_TAG_PARSER_VERSION!C++ 2.2 /current.age/ | ||
| 55 | !_TAG_PARSER_VERSION!Make 1.1 /current.age/ | ||
| 56 | !_TAG_PARSER_VERSION!Markdown 1.1 /current.age/ | ||
| 57 | !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ | ||
| 58 | !_TAG_PROC_CWD /home/nasr/tb_db/ // | ||
| 59 | !_TAG_PROGRAM_AUTHOR Universal Ctags Team // | ||
| 60 | !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ | ||
| 61 | !_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
| 62 | !_TAG_PROGRAM_VERSION 6.2.1 /v6.2.1/ | ||
| 63 | !_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/ | ||
| 64 | !_TAG_ROLE_DESCRIPTION!C!header local /local header/ | ||
| 65 | !_TAG_ROLE_DESCRIPTION!C!header system /system header/ | ||
| 66 | !_TAG_ROLE_DESCRIPTION!C!macro undef /undefined/ | ||
| 67 | !_TAG_ROLE_DESCRIPTION!C!struct foreigndecl /declared in foreign languages/ | ||
| 68 | !_TAG_ROLE_DESCRIPTION!C++!header exported /exported with "exported imported ..."/ | ||
| 69 | !_TAG_ROLE_DESCRIPTION!C++!header imported /imported with "imported ..."/ | ||
| 70 | !_TAG_ROLE_DESCRIPTION!C++!header local /local header/ | ||
| 71 | !_TAG_ROLE_DESCRIPTION!C++!header system /system header/ | ||
| 72 | !_TAG_ROLE_DESCRIPTION!C++!macro undef /undefined/ | ||
| 73 | !_TAG_ROLE_DESCRIPTION!C++!module imported /imported with "imported ..."/ | ||
| 74 | !_TAG_ROLE_DESCRIPTION!C++!module partOwner /used for specifying a partition/ | ||
| 75 | !_TAG_ROLE_DESCRIPTION!C++!partition imported /imported with "imported ..."/ | ||
| 76 | !_TAG_ROLE_DESCRIPTION!Make!makefile included /included/ | ||
| 77 | !_TAG_ROLE_DESCRIPTION!Make!makefile optional /optionally included/ | ||
| 78 | $(BIN) Makefile /^$(BIN): $(SRC)$/;" t | ||
| 79 | ARENA_ALIGN source/base/base_mem.h /^#define ARENA_ALIGN /;" d | ||
| 80 | Align source/base/base_arena.h /^#define Align(/;" d | ||
| 81 | BASE_ARENA_H source/base/base_arena.h /^#define BASE_ARENA_H$/;" d | ||
| 82 | BASE_H source/base/base.h /^#define BASE_H$/;" d | ||
| 83 | BASE_INCLUDE_H source/base/base_include.h /^#define BASE_INCLUDE_H$/;" d | ||
| 84 | BASE_IO_H source/base/base_io.h /^#define BASE_IO_H$/;" d | ||
| 85 | 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 | ||
| 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 | ||
| 89 | BASE_UNITY source/engine/engine_main.c /^#define BASE_UNITY$/;" d file: | ||
| 90 | BIN Makefile /^BIN = build\/engine$/;" m | ||
| 91 | BLUE source/base/base_test.h /^#define BLUE /;" d | ||
| 92 | BUFF_DEFAULT source/base/base.h /^#define BUFF_DEFAULT /;" d | ||
| 93 | BUFF_LARGE source/base/base.h /^#define BUFF_LARGE /;" d | ||
| 94 | BUFF_SMALL source/base/base.h /^#define BUFF_SMALL /;" d | ||
| 95 | CC Makefile /^CC = clang$/;" m | ||
| 96 | CFLAGS Makefile /^CFLAGS = -Wall -Wextra -Wfloat-equal -Wswitch-default -Wswitch-enum \\$/;" m | ||
| 97 | DEPRECATED source/base/base.h /^#define DEPRECATED /;" d | ||
| 98 | ENGINE_LEXER_H source/engine/engine_lexer.h /^#define ENGINE_LEXER_H$/;" d | ||
| 99 | ENGINE_REPL_H source/engine/engine_parser.c /^#define ENGINE_REPL_H$/;" d file: | ||
| 100 | ENGINE_REPL_H source/engine/engine_parser.h /^#define ENGINE_REPL_H$/;" d | ||
| 101 | ENGINE_REPL_H source/engine/engine_repl.c /^#define ENGINE_REPL_H$/;" d file: | ||
| 102 | ENGINE_REPL_H source/engine/engine_repl.h /^#define ENGINE_REPL_H$/;" d | ||
| 103 | ERR_INVALID source/base/base.h /^#define ERR_INVALID /;" d | ||
| 104 | ERR_IO source/base/base.h /^#define ERR_IO /;" d | ||
| 105 | ERR_OK source/base/base.h /^#define ERR_OK /;" d | ||
| 106 | ERR_PARSE source/base/base.h /^#define ERR_PARSE /;" d | ||
| 107 | ERR_PERM source/base/base.h /^#define ERR_PERM /;" d | ||
| 108 | FALSE source/base/base.h /^#define FALSE /;" d | ||
| 109 | GREEN source/base/base_test.h /^#define GREEN /;" d | ||
| 110 | GiB source/base/base.h /^#define GiB(/;" d | ||
| 111 | HEADER_H source/base/bash_hash.h /^#define HEADER_H$/;" d | ||
| 112 | KiB source/base/base.h /^#define KiB(/;" d | ||
| 113 | LEN source/base/base_test.h /^#define LEN(/;" d | ||
| 114 | MAX source/base/base_mem.h /^#define MAX(/;" d | ||
| 115 | MIN source/base/base_mem.h /^#define MIN(/;" d | ||
| 116 | MemCpy source/base/base.h /^#define MemCpy(/;" d | ||
| 117 | MemSet source/base/base.h /^#define MemSet(/;" d | ||
| 118 | MiB source/base/base.h /^#define MiB(/;" d | ||
| 119 | NIL source/base/base.h /^#define NIL /;" d | ||
| 120 | PATH_MAX_LEN source/base/base.h /^#define PATH_MAX_LEN /;" d | ||
| 121 | PushArray source/base/base_arena.h /^#define PushArray(/;" d | ||
| 122 | PushString source/base/base_string.h /^ #define PushString(/;" d | ||
| 123 | PushStruct source/base/base_arena.h /^#define PushStruct(/;" d | ||
| 124 | RED source/base/base_test.h /^#define RED /;" d | ||
| 125 | RESET source/base/base_test.h /^#define RESET /;" d | ||
| 126 | SRC Makefile /^SRC = source\/engine\/engine_main.c$/;" m | ||
| 127 | STACK_H source/base/base_stack.h /^#define STACK_H$/;" d | ||
| 128 | StringLit source/base/base_string.h /^#define StringLit(/;" d | ||
| 129 | TOKEN_IDENTIFIER source/engine/engine_lexer.h /^ TOKEN_IDENTIFIER,$/;" e enum:token_type | ||
| 130 | TOKEN_UNDEFINED source/engine/engine_lexer.h /^ TOKEN_UNDEFINED = 255,$/;" e enum:token_type | ||
| 131 | TOKEN_VALUE source/engine/engine_lexer.h /^ TOKEN_VALUE,$/;" e enum:token_type | ||
| 132 | TRUE source/base/base.h /^#define TRUE /;" d | ||
| 133 | 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 * | ||
| 135 | arena_alloc source/base/base_arena.c /^arena_alloc(mem_arena *arena, u64 size)$/;" f typeref:typename:internal void * | ||
| 136 | arena_clear source/base/base_arena.c /^arena_clear(mem_arena *arena)$/;" f typeref:typename:internal void | ||
| 137 | arena_create source/base/base_arena.c /^arena_create(u64 capacity)$/;" f typeref:typename:internal mem_arena * | ||
| 138 | arena_destroy source/base/base_arena.c /^arena_destroy(mem_arena *arena)$/;" f typeref:typename:internal void | ||
| 139 | arena_pop source/base/base_arena.c /^arena_pop(mem_arena *arena, u64 size)$/;" f typeref:typename:internal void | ||
| 140 | arena_pop_to source/base/base_arena.c /^arena_pop_to(mem_arena *arena, u64 pos)$/;" f typeref:typename:internal void | ||
| 141 | arena_resize source/base/base_arena.c /^arena_resize(mem_arena *arena, void *old_memory, u64 new_size, u64 old_size)$/;" f typeref:typename:internal mem_arena * | ||
| 142 | arena_resize_align source/base/base_arena.c /^arena_resize_align(mem_arena *arena, void *old_memory, u64 new_size, u64 old_size, umm alignment/;" f typeref:typename:internal mem_arena * | ||
| 143 | 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 | ||
| 145 | b8 source/base/base.h /^typedef u8 b8;$/;" t typeref:typename:u8 | ||
| 146 | 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 * | ||
| 148 | breakpoint source/base/base.h /^#define breakpoint /;" d | ||
| 149 | btree source/engine/engine_parser.c /^struct btree$/;" s file: | ||
| 150 | btree source/engine/engine_parser.c /^typedef struct btree btree;$/;" t typeref:struct:btree file: | ||
| 151 | btree source/engine/engine_parser.h /^struct btree$/;" s | ||
| 152 | btree source/engine/engine_parser.h /^typedef struct btree btree;$/;" t typeref:struct:btree | ||
| 153 | btree source/engine/engine_repl.c /^struct btree$/;" s file: | ||
| 154 | btree source/engine/engine_repl.c /^typedef struct btree btree;$/;" t typeref:struct:btree file: | ||
| 155 | btree source/engine/engine_repl.h /^struct btree$/;" s | ||
| 156 | btree source/engine/engine_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 | ||
| 158 | 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 | ||
| 160 | check source/base/base_test.h /^#define check(/;" d | ||
| 161 | checkpoint source/base/base_test.h /^#define checkpoint /;" d | ||
| 162 | 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 | ||
| 164 | clean Makefile /^clean:$/;" t | ||
| 165 | 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 | ||
| 167 | 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 | ||
| 169 | 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 | ||
| 171 | 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 | ||
| 173 | 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 | ||
| 175 | 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 * | ||
| 177 | 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 | ||
| 179 | i64 source/base/base.h /^typedef int64_t i64;$/;" t typeref:typename:int64_t | ||
| 180 | 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 | ||
| 182 | 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 | ||
| 184 | lexeme source/engine/engine_lexer.h /^ string8 lexeme;$/;" m struct:token typeref:typename:string8 | ||
| 185 | 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 | ||
| 187 | 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 | ||
| 189 | 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 | ||
| 191 | 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 | ||
| 193 | node source/engine/engine_parser.c /^struct node$/;" s file: | ||
| 194 | node source/engine/engine_parser.c /^typedef struct node node;$/;" t typeref:struct:node file: | ||
| 195 | node source/engine/engine_parser.h /^struct node$/;" s | ||
| 196 | node source/engine/engine_parser.h /^typedef struct node node;$/;" t typeref:struct:node | ||
| 197 | node source/engine/engine_repl.c /^struct node$/;" s file: | ||
| 198 | node source/engine/engine_repl.c /^typedef struct node node;$/;" t typeref:struct:node file: | ||
| 199 | node source/engine/engine_repl.h /^struct node$/;" s | ||
| 200 | node source/engine/engine_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 | ||
| 202 | 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 | ||
| 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 | ||
| 206 | read_only source/base/base.h /^#define read_only /;" d | ||
| 207 | read_only source/base/base.h /^#define read_only$/;" d | ||
| 208 | run Makefile /^run:$/;" t | ||
| 209 | show source/base/base_test.h /^#define show /;" d | ||
| 210 | size source/base/base_string.h /^ u64 size;$/;" m struct:string8 typeref:typename:u64 | ||
| 211 | smm source/base/base.h /^typedef intptr_t smm;$/;" t typeref:typename:intptr_t | ||
| 212 | stack_create source/base/base_stack.c /^stack_create(u64 capacity)$/;" f typeref:typename:internal mem_stack * | ||
| 213 | stack_destroy source/base/base_stack.c /^stack_destroy(mem_stack *stack)$/;" f typeref:typename:internal void | ||
| 214 | stack_pop source/base/base_stack.c /^stack_pop(mem_stack *stack, void *pointer)$/;" f typeref:typename:internal void | ||
| 215 | stack_pop_all source/base/base_stack.c /^stack_pop_all(mem_stack *stack)$/;" f typeref:typename:internal void | ||
| 216 | stack_push source/base/base_stack.c /^stack_push(mem_stack *stack, u64 size)$/;" f typeref:typename:internal void * | ||
| 217 | stack_push_align source/base/base_stack.c /^stack_push_align(mem_stack *stack, u64 size, u8 alignment)$/;" f typeref:typename:internal mem_stack * | ||
| 218 | stack_resize_align source/base/base_stack.c /^stack_resize_align(mem_stack *stack, void *pointer, u64 old_size, u64 new_size, u8 alignment)$/;" f typeref:typename:internal mem_stack * | ||
| 219 | start_position source/base/base_arena.h /^ u64 start_position;$/;" m struct:temp_arena typeref:typename:u64 | ||
| 220 | string8 source/base/base_string.h /^struct string8$/;" s | ||
| 221 | string8 source/base/base_string.h /^typedef struct string8 string8;$/;" t typeref:struct:string8 | ||
| 222 | string8_append_char source/base/base_string.h /^string8_append_char(string8 *buf, u8 c)$/;" f typeref:typename:internal void | ||
| 223 | string8_cmp source/base/base_string.h /^string8_cmp(string8 a, string8 b)$/;" f typeref:typename:internal b8 | ||
| 224 | string8_to_u64 source/base/base_string.h /^string8_to_u64(u8 *buf, umm len)$/;" f typeref:typename:internal u64 | ||
| 225 | temp_arena source/base/base_arena.h /^struct temp_arena$/;" s | ||
| 226 | temp_arena source/base/base_arena.h /^typedef struct temp_arena temp_arena;$/;" t typeref:struct:temp_arena | ||
| 227 | temp_arena_begin source/base/base_arena.c /^temp_arena_begin(mem_arena *arena)$/;" f typeref:typename:internal temp_arena | ||
| 228 | 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 | ||
| 230 | test source/base/base_test.h /^#define test(/;" d | ||
| 231 | token source/engine/engine_lexer.h /^struct token$/;" s | ||
| 232 | token source/engine/engine_lexer.h /^typedef struct token token;$/;" t typeref:struct:token | ||
| 233 | token_type source/engine/engine_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 | ||
| 235 | tokenize source/engine/engine_lexer.c /^tokenize(string8 buffer)$/;" f typeref:typename:internal token * | ||
| 236 | type source/engine/engine_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 | ||
| 238 | 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 | ||
| 240 | u8 source/base/base.h /^typedef uint8_t u8;$/;" t typeref:typename:uint8_t | ||
| 241 | umm source/base/base.h /^typedef uintptr_t umm;$/;" t typeref:typename:uintptr_t | ||
| 242 | unused source/base/base.h /^#define unused(/;" d | ||
| 243 | write_int source/base/base_test.h /^write_int(i32 num)$/;" f typeref:typename:internal void | ||
