From 17e468fd17e7a09b37c76891293389dc4b2c6a64 Mon Sep 17 00:00:00 2001 From: Lucas Standen Date: Thu, 23 May 2024 09:16:58 +0100 Subject: added an example flow through --- comp/lucas-standen-NEA/writeup/coverpage.ms | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/comp/lucas-standen-NEA/writeup/coverpage.ms b/comp/lucas-standen-NEA/writeup/coverpage.ms index 230dc82..73ceabf 100644 --- a/comp/lucas-standen-NEA/writeup/coverpage.ms +++ b/comp/lucas-standen-NEA/writeup/coverpage.ms @@ -1048,6 +1048,26 @@ 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" + .NH 1 Technical Solution .NH 1 -- cgit v1.2.3 From a944e593ad7fe54d007ad44d5bf9dc7ad2ddf103 Mon Sep 17 00:00:00 2001 From: Lucas Standen Date: Thu, 23 May 2024 10:39:48 +0100 Subject: added some stuff --- .vs/slnx.sqlite | Bin 0 -> 114688 bytes comp/lucas-standen-NEA/writeup/coverpage.ms | 14 +++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .vs/slnx.sqlite diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..eed7154 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/comp/lucas-standen-NEA/writeup/coverpage.ms b/comp/lucas-standen-NEA/writeup/coverpage.ms index 73ceabf..10d713d 100644 --- a/comp/lucas-standen-NEA/writeup/coverpage.ms +++ b/comp/lucas-standen-NEA/writeup/coverpage.ms @@ -865,6 +865,13 @@ Errors Can syntax error. Can throw errors via err. + +.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 @@ -905,7 +912,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 @@ -1068,6 +1074,12 @@ The alogrithum to run code is quite complex however it can be boiled down to a f .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 -- cgit v1.2.3