summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornasr <nsrddyn@gmail.com>2026-03-02 22:44:17 +0000
committernasr <nsrddyn@gmail.com>2026-03-02 22:44:17 +0000
commit4e77bc7164070d7ffafdee1ba6ce3bb1aaf10746 (patch)
treee878f009730e934dfe5e295d4b24dfd906f0eb73
parent56ebfa3f4b0d7a80090b344b294252d2be152bb0 (diff)
feature(main): loading file + bug fixes
structure improvement
-rw-r--r--Makefile2
-rwxr-xr-xsource/base/base_include.h3
-rw-r--r--source/base/base_mem.c17
-rw-r--r--source/base/base_mem.h18
-rw-r--r--source/base/base_os.h41
-rw-r--r--source/base/base_string.c63
-rw-r--r--source/base/base_string.h45
-rw-r--r--source/engine/#engine_repl.c#7
-rw-r--r--source/engine/engine.c34
-rw-r--r--source/engine/engine_entry.c16
-rw-r--r--source/engine/engine_repl.c8
-rw-r--r--source/lexer/lexer.c8
-rw-r--r--source/lexer/lexer.h23
-rw-r--r--source/parser/parser.c (renamed from source/engine/engine_repl.h)1
-rw-r--r--source/parser/parser.h16
-rw-r--r--source/repl/repl.c16
-rw-r--r--source/repl/repl.h16
-rw-r--r--source/storage/csv_reader.c (renamed from source/base/base_test.c)0
-rw-r--r--source/storage/csv_reader.h0
-rw-r--r--tags243
20 files changed, 453 insertions, 124 deletions
diff --git a/Makefile b/Makefile
index 376f3b8..f9c5906 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
1BIN = build/engine 1BIN = build/engine
2SRC = source/engine/engine_entry.c 2SRC = source/engine/engine.c
3CC = clang 3CC = clang
4CFLAGS = -Wall -Wextra -Wfloat-equal -Wswitch-default -Wswitch-enum \ 4CFLAGS = -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 @@
1internal inline b8
2is_pow(umm x)
3{
4 return (x & (x - 1)) == 0;
5}
6
7internal inline u64
8align(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
8internal inline b8
9is_pow(umm x)
10{
11 return (x & (x - 1)) == 0;
12}
13
14internal inline u64
15align(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) 12internal string8
13load_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 @@
1internal b8
2compare_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
20internal b8
21compare_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
47internal u64
48to_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
8typedef struct string string; 6#define StringLit(string) \
9struct 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
12typedef struct string8 string8;
13struct string8
10{ 14{
11 u8 *data; 15 u8 *data;
12 u64 size; 16 u64 size;
13}; 17};
14 18
19internal b8
20string8_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
26internal u64
27string8_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
39internal void
40string8_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
2internal void
3tokenize(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
13int 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
7int 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
2internal tokens *
3tokenize(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 @@
1internal token *
2tokenize(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
4typedef enum token_type token_type;
5enum token_type
6{
7 // first 255 tokens for ascii characters
8 TOKEN_UNDEFINED = 255,
9 TOKEN_IDENTIFIER,
10 TOKEN_VALUE,
11
12};
13
14typedef struct token token;
15struct 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
4typedef struct node node;
5struct node
6{
7
8};
9
10typedef struct btree btree;
11struct 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
4typedef struct node node;
5struct node
6{
7
8};
9
10typedef struct btree btree;
11struct 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
4typedef struct node node;
5struct node
6{
7
8};
9
10typedef struct btree btree;
11struct 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
diff --git a/tags b/tags
new file mode 100644
index 0000000..1f8a45d
--- /dev/null
+++ b/tags
@@ -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
79ARENA_ALIGN source/base/base_mem.h /^#define ARENA_ALIGN /;" d
80Align source/base/base_arena.h /^#define Align(/;" d
81BASE_ARENA_H source/base/base_arena.h /^#define BASE_ARENA_H$/;" d
82BASE_H source/base/base.h /^#define BASE_H$/;" d
83BASE_INCLUDE_H source/base/base_include.h /^#define BASE_INCLUDE_H$/;" d
84BASE_IO_H source/base/base_io.h /^#define BASE_IO_H$/;" d
85BASE_MEM_H source/base/base_mem.h /^#define BASE_MEM_H$/;" d
86BASE_OS_H source/base/base_os.h /^#define BASE_OS_H$/;" d
87BASE_STRING_H source/base/base_string.h /^#define BASE_STRING_H$/;" d
88BASE_TEST_H source/base/base_test.h /^#define BASE_TEST_H$/;" d
89BASE_UNITY source/engine/engine_main.c /^#define BASE_UNITY$/;" d file:
90BIN Makefile /^BIN = build\/engine$/;" m
91BLUE source/base/base_test.h /^#define BLUE /;" d
92BUFF_DEFAULT source/base/base.h /^#define BUFF_DEFAULT /;" d
93BUFF_LARGE source/base/base.h /^#define BUFF_LARGE /;" d
94BUFF_SMALL source/base/base.h /^#define BUFF_SMALL /;" d
95CC Makefile /^CC = clang$/;" m
96CFLAGS Makefile /^CFLAGS = -Wall -Wextra -Wfloat-equal -Wswitch-default -Wswitch-enum \\$/;" m
97DEPRECATED source/base/base.h /^#define DEPRECATED /;" d
98ENGINE_LEXER_H source/engine/engine_lexer.h /^#define ENGINE_LEXER_H$/;" d
99ENGINE_REPL_H source/engine/engine_parser.c /^#define ENGINE_REPL_H$/;" d file:
100ENGINE_REPL_H source/engine/engine_parser.h /^#define ENGINE_REPL_H$/;" d
101ENGINE_REPL_H source/engine/engine_repl.c /^#define ENGINE_REPL_H$/;" d file:
102ENGINE_REPL_H source/engine/engine_repl.h /^#define ENGINE_REPL_H$/;" d
103ERR_INVALID source/base/base.h /^#define ERR_INVALID /;" d
104ERR_IO source/base/base.h /^#define ERR_IO /;" d
105ERR_OK source/base/base.h /^#define ERR_OK /;" d
106ERR_PARSE source/base/base.h /^#define ERR_PARSE /;" d
107ERR_PERM source/base/base.h /^#define ERR_PERM /;" d
108FALSE source/base/base.h /^#define FALSE /;" d
109GREEN source/base/base_test.h /^#define GREEN /;" d
110GiB source/base/base.h /^#define GiB(/;" d
111HEADER_H source/base/bash_hash.h /^#define HEADER_H$/;" d
112KiB source/base/base.h /^#define KiB(/;" d
113LEN source/base/base_test.h /^#define LEN(/;" d
114MAX source/base/base_mem.h /^#define MAX(/;" d
115MIN source/base/base_mem.h /^#define MIN(/;" d
116MemCpy source/base/base.h /^#define MemCpy(/;" d
117MemSet source/base/base.h /^#define MemSet(/;" d
118MiB source/base/base.h /^#define MiB(/;" d
119NIL source/base/base.h /^#define NIL /;" d
120PATH_MAX_LEN source/base/base.h /^#define PATH_MAX_LEN /;" d
121PushArray source/base/base_arena.h /^#define PushArray(/;" d
122PushString source/base/base_string.h /^ #define PushString(/;" d
123PushStruct source/base/base_arena.h /^#define PushStruct(/;" d
124RED source/base/base_test.h /^#define RED /;" d
125RESET source/base/base_test.h /^#define RESET /;" d
126SRC Makefile /^SRC = source\/engine\/engine_main.c$/;" m
127STACK_H source/base/base_stack.h /^#define STACK_H$/;" d
128StringLit source/base/base_string.h /^#define StringLit(/;" d
129TOKEN_IDENTIFIER source/engine/engine_lexer.h /^ TOKEN_IDENTIFIER,$/;" e enum:token_type
130TOKEN_UNDEFINED source/engine/engine_lexer.h /^ TOKEN_UNDEFINED = 255,$/;" e enum:token_type
131TOKEN_VALUE source/engine/engine_lexer.h /^ TOKEN_VALUE,$/;" e enum:token_type
132TRUE source/base/base.h /^#define TRUE /;" d
133align source/base/base_mem.h /^align(u64 pointer, umm alignment)$/;" f typeref:typename:internal u64
134arena source/base/base_arena.h /^ mem_arena *arena;$/;" m struct:temp_arena typeref:typename:mem_arena *
135arena_alloc source/base/base_arena.c /^arena_alloc(mem_arena *arena, u64 size)$/;" f typeref:typename:internal void *
136arena_clear source/base/base_arena.c /^arena_clear(mem_arena *arena)$/;" f typeref:typename:internal void
137arena_create source/base/base_arena.c /^arena_create(u64 capacity)$/;" f typeref:typename:internal mem_arena *
138arena_destroy source/base/base_arena.c /^arena_destroy(mem_arena *arena)$/;" f typeref:typename:internal void
139arena_pop source/base/base_arena.c /^arena_pop(mem_arena *arena, u64 size)$/;" f typeref:typename:internal void
140arena_pop_to source/base/base_arena.c /^arena_pop_to(mem_arena *arena, u64 pos)$/;" f typeref:typename:internal void
141arena_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 *
142arena_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 *
143b16 source/base/base.h /^typedef i16 b16;$/;" t typeref:typename:i16
144b32 source/base/base.h /^typedef i32 b32;$/;" t typeref:typename:i32
145b8 source/base/base.h /^typedef u8 b8;$/;" t typeref:typename:u8
146base_position source/base/base_arena.h /^ u8 *base_position;$/;" m struct:mem_arena typeref:typename:u8 *
147base_position source/base/base_stack.h /^ u8 *base_position;$/;" m struct:mem_stack typeref:typename:u8 *
148breakpoint source/base/base.h /^#define breakpoint /;" d
149btree source/engine/engine_parser.c /^struct btree$/;" s file:
150btree source/engine/engine_parser.c /^typedef struct btree btree;$/;" t typeref:struct:btree file:
151btree source/engine/engine_parser.h /^struct btree$/;" s
152btree source/engine/engine_parser.h /^typedef struct btree btree;$/;" t typeref:struct:btree
153btree source/engine/engine_repl.c /^struct btree$/;" s file:
154btree source/engine/engine_repl.c /^typedef struct btree btree;$/;" t typeref:struct:btree file:
155btree source/engine/engine_repl.h /^struct btree$/;" s
156btree source/engine/engine_repl.h /^typedef struct btree btree;$/;" t typeref:struct:btree
157calculate_padding source/base/base_stack.c /^calculate_padding(u64 pointer, u8 alignment, u64 header_size)$/;" f typeref:typename:internal u8
158capacity source/base/base_arena.h /^ u64 capacity;$/;" m struct:mem_arena typeref:typename:u64
159capacity source/base/base_stack.h /^ u64 capacity;$/;" m struct:mem_stack typeref:typename:u64
160check source/base/base_test.h /^#define check(/;" d
161checkpoint source/base/base_test.h /^#define checkpoint /;" d
162checkpoint_end_output source/base/base_test.h /^#define checkpoint_end_output /;" d
163checkpoint_output source/base/base_test.h /^#define checkpoint_output /;" d
164clean Makefile /^clean:$/;" t
165current_offset source/base/base_stack.h /^ u64 current_offset;$/;" m struct:mem_stack typeref:typename:u64
166current_position source/base/base_arena.h /^ u64 current_position;$/;" m struct:mem_arena typeref:typename:u64
167data source/base/base_string.h /^ u8 *data;$/;" m struct:string8 typeref:typename:u8 *
168database engine in c README.md /^# database engine in c$/;" c
169f32 source/base/base.h /^typedef float f32;$/;" t typeref:typename:float
170f64 source/base/base.h /^typedef double f64;$/;" t typeref:typename:double
171generate_hash source/base/base_hash.c /^generate_hash()$/;" f typeref:typename:internal u64
172global_variable source/base/base.h /^#define global_variable /;" d
173hash source/base/bash_hash.h /^typedef struct hash hash;$/;" t typeref:struct:hash
174hash_map source/base/bash_hash.h /^struct hash_map $/;" s
175hash_map source/base/bash_hash.h /^typedef struct hash_map hash_map;$/;" t typeref:struct:hash_map
176header source/base/base_stack.h /^ mem_stack_header *header;$/;" m struct:mem_stack typeref:typename:mem_stack_header *
177i16 source/base/base.h /^typedef int16_t i16;$/;" t typeref:typename:int16_t
178i32 source/base/base.h /^typedef int32_t i32;$/;" t typeref:typename:int32_t
179i64 source/base/base.h /^typedef int64_t i64;$/;" t typeref:typename:int64_t
180i8 source/base/base.h /^typedef int8_t i8;$/;" t typeref:typename:int8_t
181input_read source/base/base_io.h /^input_read()$/;" f typeref:typename:internal void
182internal source/base/base.h /^#define internal /;" d
183is_pow source/base/base_mem.h /^is_pow(umm x)$/;" f typeref:typename:internal b8
184lexeme source/engine/engine_lexer.h /^ string8 lexeme;$/;" m struct:token typeref:typename:string8
185local_persist source/base/base.h /^#define local_persist /;" d
186main source/engine/engine_main.c /^int main(int c, char **v)$/;" f typeref:typename:int
187mem_arena source/base/base_arena.h /^struct mem_arena$/;" s
188mem_arena source/base/base_arena.h /^typedef struct mem_arena mem_arena;$/;" t typeref:struct:mem_arena
189mem_stack source/base/base_stack.h /^struct mem_stack$/;" s
190mem_stack source/base/base_stack.h /^typedef struct mem_stack mem_stack;$/;" t typeref:struct:mem_stack
191mem_stack_header source/base/base_stack.h /^struct mem_stack_header$/;" s
192mem_stack_header source/base/base_stack.h /^typedef struct mem_stack_header mem_stack_header;$/;" t typeref:struct:mem_stack_header
193node source/engine/engine_parser.c /^struct node$/;" s file:
194node source/engine/engine_parser.c /^typedef struct node node;$/;" t typeref:struct:node file:
195node source/engine/engine_parser.h /^struct node$/;" s
196node source/engine/engine_parser.h /^typedef struct node node;$/;" t typeref:struct:node
197node source/engine/engine_repl.c /^struct node$/;" s file:
198node source/engine/engine_repl.c /^typedef struct node node;$/;" t typeref:struct:node file:
199node source/engine/engine_repl.h /^struct node$/;" s
200node source/engine/engine_repl.h /^typedef struct node node;$/;" t typeref:struct:node
201padding source/base/base_stack.h /^ u8 padding;$/;" m struct:mem_stack_header typeref:typename:u8
202previous_offset source/base/base_stack.h /^ u8 previous_offset;$/;" m struct:mem_stack_header typeref:typename:u8
203previous_position source/base/base_arena.h /^ u64 previous_position;$/;" m struct:mem_arena typeref:typename:u64
204print source/base/base_os.h /^#define print(Format) print(/;" d
205print source/base/base_os.h /^print(const char *str)$/;" f typeref:typename:internal void
206read_only source/base/base.h /^#define read_only /;" d
207read_only source/base/base.h /^#define read_only$/;" d
208run Makefile /^run:$/;" t
209show source/base/base_test.h /^#define show /;" d
210size source/base/base_string.h /^ u64 size;$/;" m struct:string8 typeref:typename:u64
211smm source/base/base.h /^typedef intptr_t smm;$/;" t typeref:typename:intptr_t
212stack_create source/base/base_stack.c /^stack_create(u64 capacity)$/;" f typeref:typename:internal mem_stack *
213stack_destroy source/base/base_stack.c /^stack_destroy(mem_stack *stack)$/;" f typeref:typename:internal void
214stack_pop source/base/base_stack.c /^stack_pop(mem_stack *stack, void *pointer)$/;" f typeref:typename:internal void
215stack_pop_all source/base/base_stack.c /^stack_pop_all(mem_stack *stack)$/;" f typeref:typename:internal void
216stack_push source/base/base_stack.c /^stack_push(mem_stack *stack, u64 size)$/;" f typeref:typename:internal void *
217stack_push_align source/base/base_stack.c /^stack_push_align(mem_stack *stack, u64 size, u8 alignment)$/;" f typeref:typename:internal mem_stack *
218stack_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 *
219start_position source/base/base_arena.h /^ u64 start_position;$/;" m struct:temp_arena typeref:typename:u64
220string8 source/base/base_string.h /^struct string8$/;" s
221string8 source/base/base_string.h /^typedef struct string8 string8;$/;" t typeref:struct:string8
222string8_append_char source/base/base_string.h /^string8_append_char(string8 *buf, u8 c)$/;" f typeref:typename:internal void
223string8_cmp source/base/base_string.h /^string8_cmp(string8 a, string8 b)$/;" f typeref:typename:internal b8
224string8_to_u64 source/base/base_string.h /^string8_to_u64(u8 *buf, umm len)$/;" f typeref:typename:internal u64
225temp_arena source/base/base_arena.h /^struct temp_arena$/;" s
226temp_arena source/base/base_arena.h /^typedef struct temp_arena temp_arena;$/;" t typeref:struct:temp_arena
227temp_arena_begin source/base/base_arena.c /^temp_arena_begin(mem_arena *arena)$/;" f typeref:typename:internal temp_arena
228temp_arena_end source/base/base_arena.c /^temp_arena_end(temp_arena temp)$/;" f typeref:typename:internal void
229temp_breakpoint source/base/base.h /^#define temp_breakpoint /;" d
230test source/base/base_test.h /^#define test(/;" d
231token source/engine/engine_lexer.h /^struct token$/;" s
232token source/engine/engine_lexer.h /^typedef struct token token;$/;" t typeref:struct:token
233token_type source/engine/engine_lexer.h /^enum token_type$/;" g
234token_type source/engine/engine_lexer.h /^typedef enum token_type token_type;$/;" t typeref:enum:token_type
235tokenize source/engine/engine_lexer.c /^tokenize(string8 buffer)$/;" f typeref:typename:internal token *
236type source/engine/engine_lexer.h /^ token_type type;$/;" m struct:token typeref:typename:token_type
237u16 source/base/base.h /^typedef uint16_t u16;$/;" t typeref:typename:uint16_t
238u32 source/base/base.h /^typedef uint32_t u32;$/;" t typeref:typename:uint32_t
239u64 source/base/base.h /^typedef uint64_t u64;$/;" t typeref:typename:uint64_t
240u8 source/base/base.h /^typedef uint8_t u8;$/;" t typeref:typename:uint8_t
241umm source/base/base.h /^typedef uintptr_t umm;$/;" t typeref:typename:uintptr_t
242unused source/base/base.h /^#define unused(/;" d
243write_int source/base/base_test.h /^write_int(i32 num)$/;" f typeref:typename:internal void