diff options
author | standenboy <standenboy@seacrossedlovers.xyz> | 2024-06-15 17:06:28 +0100 |
---|---|---|
committer | standenboy <standenboy@seacrossedlovers.xyz> | 2024-06-15 17:06:28 +0100 |
commit | 42047fea26b14edc67b394db18ce7edb0c6399f8 (patch) | |
tree | e66ca6451ca842eae0d263aabc82435fb7987e92 /comp/lucas-standen-NEA/writeup/coverpage.ms | |
parent | f6d4ab1521fe2427b2a43f92c4ecf163bbd889dc (diff) | |
parent | a944e593ad7fe54d007ad44d5bf9dc7ad2ddf103 (diff) |
added so much code
Diffstat (limited to 'comp/lucas-standen-NEA/writeup/coverpage.ms')
-rw-r--r-- | comp/lucas-standen-NEA/writeup/coverpage.ms | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/comp/lucas-standen-NEA/writeup/coverpage.ms b/comp/lucas-standen-NEA/writeup/coverpage.ms index 9e5fdc4..f99dd7f 100644 --- a/comp/lucas-standen-NEA/writeup/coverpage.ms +++ b/comp/lucas-standen-NEA/writeup/coverpage.ms @@ -788,6 +788,11 @@ set let +.NH 2 +Memory management +.LP +Memory will be allocated when a variable is initialized, and freed when the program stops. +Although this isn't the fastest method, it is simple and has less runtime overhead. .NH 2 Questionnaire 2 for Rayn M @@ -824,7 +829,7 @@ elif else -terminate +exit return @@ -871,7 +876,6 @@ Many build systems are available for C, the main ones being cmake and gnu make. the goal of putting the compiling process in one command. Cmake is cross platform (sorta windows doesn't work well but it does work). - .NH 3 Libraries .LP @@ -950,6 +954,32 @@ bits can be written in bash. It should be a good test to how Zippy can be writte If time allows it is at this point that I will write a Raylib library and a unix/C sockets library. +.NH 2 +Flow through the system +.LP +The alogrithum to run code is quite complex however it can be boiled down to a few simple steps: + +.B "read the text file (strip line breaks and tabs)" +.B "create an empty linked list" +.B "get the first expression from the text file (with be encapsulated with "()"" +.B "get the function call and its args into a token" +.B "if the arguments of the function are there own function call, then convert them into a token" +.B "set that token as the argument in the first token" +.B "append the root token to the linked list" +.B "repeat until the text file string is empty" +.B "allocate memory for the program and prepare the exection step" +.B "at the start of the linked list traverse to the bottem of the tree (made of tokens)" +.B "execute the lowest token" +.B "repeat until all tokens including the root have been executed" +.B "move to the next node of the linked list" +.B "repeat until the linked list is empty" + +Within each of these steps is many smaller steps. The hardest part will be making the tokens, as +this requires alot of string manipultation. The execution will be a recursive alogrithum. All trees +will be represented via structs (see section on AST's). + +PUT SOME FLOW CHARTS HERE + .NH 1 Technical Solution .NH 1 |