From 267784d4ccf7ccbcdf12f7766e07e7b1297cc7b9 Mon Sep 17 00:00:00 2001 From: Raul Zaharia Date: Tue, 6 Dec 2022 15:17:56 +0200 Subject: [PATCH] Updated all readme files to contain links to the next step --- 00_Introduction/Readme.md | 2 +- 01_Scanner/Readme.md | 2 +- 02_Parser/Readme.md | 2 +- 03_Precedence/Readme.md | 2 +- 04_Assembly/Readme.md | 2 +- 05_Statements/Readme.md | 2 +- 06_Variables/Readme.md | 2 +- 07_Comparisons/Readme.md | 2 +- 08_If_Statements/Readme.md | 2 +- 09_While_Loops/Readme.md | 2 +- 10_For_Loops/Readme.md | 2 +- 11_Functions_pt1/Readme.md | 2 +- 12_Types_pt1/Readme.md | 2 +- 13_Functions_pt2/Readme.md | 2 +- 14_ARM_Platform/Readme.md | 2 +- 15_Pointers_pt1/Readme.md | 2 +- 16_Global_Vars/Readme.md | 2 +- 17_Scaling_Offsets/Readme.md | 2 +- 18_Lvalues_Revisited/Readme.md | 2 +- 19_Arrays_pt1/Readme.md | 2 +- 20_Char_Str_Literals/Readme.md | 2 +- 21_More_Operators/Readme.md | 2 +- 22_Design_Locals/Readme.md | 2 +- 23_Local_Variables/Readme.md | 2 +- 24_Function_Params/Readme.md | 2 +- 25_Function_Arguments/Readme.md | 2 +- 26_Prototypes/Readme.md | 2 +- 27_Testing_Errors/Readme.md | 2 +- 28_Runtime_Flags/Readme.md | 2 +- 29_Refactoring/Readme.md | 2 +- 30_Design_Composites/Readme.md | 2 +- 31_Struct_Declarations/Readme.md | 2 +- 32_Struct_Access_pt1/Readme.md | 2 +- 33_Unions/Readme.md | 2 +- 34_Enums_and_Typedefs/Readme.md | 2 +- 35_Preprocessor/Readme.md | 2 +- 36_Break_Continue/Readme.md | 2 +- 37_Switch/Readme.md | 2 +- 38_Dangling_Else/Readme.md | 2 +- 39_Var_Initialisation_pt1/Readme.md | 2 +- 40_Var_Initialisation_pt2/Readme.md | 2 +- 41_Local_Var_Init/Readme.md | 2 +- 42_Casting/Readme.md | 2 +- 43_More_Operators/Readme.md | 2 +- 44_Fold_Optimisation/Readme.md | 2 +- 45_Globals_Again/Readme.md | 2 +- 46_Void_Functions/Readme.md | 2 +- 47_Sizeof/Readme.md | 2 +- 48_Static/Readme.md | 2 +- 49_Ternary/Readme.md | 2 +- 50_Mop_up_pt1/Readme.md | 2 +- 51_Arrays_pt2/Readme.md | 2 +- 52_Pointers_pt2/Readme.md | 2 +- 53_Mop_up_pt2/Readme.md | 2 +- 54_Reg_Spills/Readme.md | 2 +- 55_Lazy_Evaluation/Readme.md | 2 +- 56_Local_Arrays/Readme.md | 2 +- 57_Mop_up_pt3/Readme.md | 2 +- 58_Ptr_Increments/Readme.md | 2 +- 59_WDIW_pt1/Readme.md | 2 +- 60_TripleTest/Readme.md | 2 +- 61_What_Next/Readme.md | 2 +- 62_Cleanup/Readme.md | 2 +- 63 files changed, 63 insertions(+), 63 deletions(-) diff --git a/00_Introduction/Readme.md b/00_Introduction/Readme.md index f309572..031026e 100644 --- a/00_Introduction/Readme.md +++ b/00_Introduction/Readme.md @@ -156,4 +156,4 @@ Finally, clone a copy of this Github repository. In the next part of our compiler writing journey, we will start with the code to scan our input file and find the *tokens* that are the -lexical elements of our language. +lexical elements of our language. [Next step](../01_Scanner/Readme.md) diff --git a/01_Scanner/Readme.md b/01_Scanner/Readme.md index 05924c3..b45fc72 100644 --- a/01_Scanner/Readme.md +++ b/01_Scanner/Readme.md @@ -326,4 +326,4 @@ struct token { In the next part of our compiler writing journey, we will build a recursive descent parser to interpret the grammar of our input -files, and calculate & print out the final value for each file. +files, and calculate & print out the final value for each file. [Next step](../02_Parser/Readme.md) diff --git a/02_Parser/Readme.md b/02_Parser/Readme.md index f02e0fd..bcee045 100644 --- a/02_Parser/Readme.md +++ b/02_Parser/Readme.md @@ -537,4 +537,4 @@ calculate the correct value of the expressions. In the next part of our compiler writing journey, we will modify the parser so that it also does the semantic analysis of the -expressions to get the right maths results. +expressions to get the right maths results. [Next step](../03_Precedence/Readme.md) diff --git a/03_Precedence/Readme.md b/03_Precedence/Readme.md index e8b2179..7d02020 100644 --- a/03_Precedence/Readme.md +++ b/03_Precedence/Readme.md @@ -434,4 +434,4 @@ In the next part of our compiler writing journey, we will replace the interpreter. In its place, we will write a translator that generates x86-64 assembly code for each AST node that has a maths operator. We will also generate some assembly preamble and postamble to -support the assembly code that the generator outputs. +support the assembly code that the generator outputs. [Next step](../04_Assembly/Readme.md) diff --git a/04_Assembly/Readme.md b/04_Assembly/Readme.md index 1b53016..828c0c7 100644 --- a/04_Assembly/Readme.md +++ b/04_Assembly/Readme.md @@ -371,4 +371,4 @@ two. In the next part of our compiler writing journey, we will add some statements to our language, so that it starts to resemble a proper -computer language. +computer language. [Next step](../05_Statements/Readme.md) diff --git a/05_Statements/Readme.md b/05_Statements/Readme.md index 28ce888..3f48c87 100644 --- a/05_Statements/Readme.md +++ b/05_Statements/Readme.md @@ -321,4 +321,4 @@ identifiers, and to more cleanly separate the generic code generator and the CPU-specific generator. In the next part of our compiler writing journey, we will add variables -to the language. This will require a significant amount of work. +to the language. This will require a significant amount of work. [Next step](../06_Variables/Readme.md) diff --git a/06_Variables/Readme.md b/06_Variables/Readme.md index 12b4915..2589210 100644 --- a/06_Variables/Readme.md +++ b/06_Variables/Readme.md @@ -512,4 +512,4 @@ errors (variable use without a declaration). In the next part of our compiler writing journey, we will add the six comparison operators to our language. That will -allow us to start on the control structures in the part after that. +allow us to start on the control structures in the part after that. [Next step](../07_Comparisons/Readme.md) diff --git a/07_Comparisons/Readme.md b/07_Comparisons/Readme.md index 68095a8..a1b62dc 100644 --- a/07_Comparisons/Readme.md +++ b/07_Comparisons/Readme.md @@ -293,4 +293,4 @@ That was a nice and easy addition to the compiler. The next part of the journey will be much more complicated. In the next part of our compiler writing journey, we will add IF statements -to the compiler and make use of the comparison operators that we just added. +to the compiler and make use of the comparison operators that we just added. [Next step](../08_If_Statements/Readme.md) diff --git a/08_If_Statements/Readme.md b/08_If_Statements/Readme.md index 5c69397..12d2fe9 100644 --- a/08_If_Statements/Readme.md +++ b/08_If_Statements/Readme.md @@ -641,4 +641,4 @@ I know that Nils Holm chose a different approach when he was implementing SubC, you should look at his code just to see this different solution to the same problem. In the next part of our compiler writing journey, we will -add another control structure: the WHILE loop. +add another control structure: the WHILE loop. [Next step](../09_While_Loops/Readme.md) diff --git a/09_While_Loops/Readme.md b/09_While_Loops/Readme.md index dad45a6..25267ba 100644 --- a/09_While_Loops/Readme.md +++ b/09_While_Loops/Readme.md @@ -225,4 +225,4 @@ So we can stop now, our job is done! No, of course not. We are still working towards getting the compiler to compile itself. In the next part of our compiler writing journey, we will add FOR loops -to the language. +to the language. [Next step](../10_For_Loops/Readme.md) diff --git a/10_For_Loops/Readme.md b/10_For_Loops/Readme.md index f5214b4..9eff9ed 100644 --- a/10_For_Loops/Readme.md +++ b/10_For_Loops/Readme.md @@ -313,4 +313,4 @@ tackle next? There are so many things we could look at: I've decided to look at functions. So, in the next part of our compiler writing journey, we will begin -the first of several stages to add functions to our language. +the first of several stages to add functions to our language. [Next step](../11_Functions_pt1/Readme.md) diff --git a/11_Functions_pt1/Readme.md b/11_Functions_pt1/Readme.md index 0925117..6be6065 100644 --- a/11_Functions_pt1/Readme.md +++ b/11_Functions_pt1/Readme.md @@ -202,4 +202,4 @@ We've made a good start at adding functions to our language. For now, it's a pretty simplistic function declaration only. In the next part of our compiler writing journey, we will begin -the process to add types to our compiler. +the process to add types to our compiler. [Next step](../12_Types_pt1/Readme.md) diff --git a/12_Types_pt1/Readme.md b/12_Types_pt1/Readme.md index 4e6ce1e..d8c2de5 100644 --- a/12_Types_pt1/Readme.md +++ b/12_Types_pt1/Readme.md @@ -538,4 +538,4 @@ Still not the most elegant assembly code, but it does work. Also, In the next part of our compiler writing journey, we will add function calls with one argument, and returning a value -from a function. +from a function. [Next step](../13_Functions_pt2/Readme.md) diff --git a/13_Functions_pt2/Readme.md b/13_Functions_pt2/Readme.md index 4a4dceb..e182e2c 100644 --- a/13_Functions_pt2/Readme.md +++ b/13_Functions_pt2/Readme.md @@ -619,4 +619,4 @@ plus a new data type. As I expected, it wasn't trivial but I think the changes are mostly sensible. In the next part of our compiler writing journey, we will port our -compiler to a new hardware platform, the ARM CPU on a Raspberry Pi. +compiler to a new hardware platform, the ARM CPU on a Raspberry Pi. [Next step](../14_ARM_Platform/Readme.md) diff --git a/14_ARM_Platform/Readme.md b/14_ARM_Platform/Readme.md index a231a7a..4b0e85b 100644 --- a/14_ARM_Platform/Readme.md +++ b/14_ARM_Platform/Readme.md @@ -285,4 +285,4 @@ As we go forward, I'll try to keep both `cg.c` and `cg_arm.c` functionally in sync. In the next part of our compiler writing journey, we will add the `char` -pointer to the language, as well as the '*' and '&' unary operators. +pointer to the language, as well as the '*' and '&' unary operators. [Next step](../15_Pointers_pt1/Readme.md) diff --git a/15_Pointers_pt1/Readme.md b/15_Pointers_pt1/Readme.md index f949e73..296182d 100644 --- a/15_Pointers_pt1/Readme.md +++ b/15_Pointers_pt1/Readme.md @@ -378,4 +378,4 @@ one to the address of `x`, which is incorrect. I'll have to work out how to fix this. In the next part of our compiler writing journey, we will -try to fix this problem. +try to fix this problem. [Next step](../16_Global_Vars/Readme.md) diff --git a/16_Global_Vars/Readme.md b/16_Global_Vars/Readme.md index b409b83..6a8a5f0 100644 --- a/16_Global_Vars/Readme.md +++ b/16_Global_Vars/Readme.md @@ -202,4 +202,4 @@ cc -o out out.s lib/printint.c ## Conclusion and What's Next In the next part of our compiler writing journey, -I promise to tackle the issue of adding offsets to pointers. +I promise to tackle the issue of adding offsets to pointers. [Next step](../17_Scaling_Offsets/Readme.md) diff --git a/17_Scaling_Offsets/Readme.md b/17_Scaling_Offsets/Readme.md index 950871f..3dfcf97 100644 --- a/17_Scaling_Offsets/Readme.md +++ b/17_Scaling_Offsets/Readme.md @@ -364,4 +364,4 @@ the operation. I eyeballed the output and it seems to be what I want. Only time will tell. In the next part of our compiler writing journey, -I don't know what I will do! +I don't know what I will do! [Next step](../18_Lvalues_Revisited/Readme.md) diff --git a/18_Lvalues_Revisited/Readme.md b/18_Lvalues_Revisited/Readme.md index 7b907a2..5295a63 100644 --- a/18_Lvalues_Revisited/Readme.md +++ b/18_Lvalues_Revisited/Readme.md @@ -491,4 +491,4 @@ I'd like to tackle arrays. This will be a combination of dereferencing, lvalues and rvalues, and scaling the array indices by the size of the array's elements. We have all the semantic components in place, but we'll need to add tokens, parsing and the actual index functionality. It should -be an interesting topic like this one was. +be an interesting topic like this one was. [Next step](../19_Arrays_pt1/Readme.md) diff --git a/19_Arrays_pt1/Readme.md b/19_Arrays_pt1/Readme.md index 2f055af..5c02b84 100644 --- a/19_Arrays_pt1/Readme.md +++ b/19_Arrays_pt1/Readme.md @@ -464,4 +464,4 @@ scale, add to the base address, and set as lvalue/rvalue. Once this was right, the existing code generator produces the right assembly output. In the next part of our compiler writing journey, we'll add character -and string literals to our language and find a way to print them out. +and string literals to our language and find a way to print them out. [Next step](../20_Char_Str_Literals/Readme.md) diff --git a/20_Char_Str_Literals/Readme.md b/20_Char_Str_Literals/Readme.md index 8a2f523..b5c0081 100644 --- a/20_Char_Str_Literals/Readme.md +++ b/20_Char_Str_Literals/Readme.md @@ -304,4 +304,4 @@ characters inside them. But there was some work done on the code generator, too. In the next part of our compiler writing journey, we'll add some -more binary operators to the language that the compiler recognises. +more binary operators to the language that the compiler recognises. [Next step](../21_More_Operators/Readme.md) diff --git a/21_More_Operators/Readme.md b/21_More_Operators/Readme.md index 9a440a9..43887a9 100644 --- a/21_More_Operators/Readme.md +++ b/21_More_Operators/Readme.md @@ -589,4 +589,4 @@ revisit this later. In the next part of our compiler writing journey, I'd like to tackle local variables. Once we can get these to work, we can extend them to also include function parameters and arguments. This will -take two or more steps. +take two or more steps. [Next step](../22_Design_Locals/Readme.md) diff --git a/22_Design_Locals/Readme.md b/22_Design_Locals/Readme.md index be63eca..8c21ed1 100644 --- a/22_Design_Locals/Readme.md +++ b/22_Design_Locals/Readme.md @@ -266,4 +266,4 @@ I think that's about all I want to do in terms of design before I start on the next parts of our compiler writing journey. I'll tackle local variables by themselves in the next part, and try to add in function calls and parameters in the following part. But it might take three or more steps -to get all of the new proposed features implemented. We'll see. +to get all of the new proposed features implemented. We'll see. [Next step](../23_Local_Variables/Readme.md) diff --git a/23_Local_Variables/Readme.md b/23_Local_Variables/Readme.md index ee00a17..25724a0 100644 --- a/23_Local_Variables/Readme.md +++ b/23_Local_Variables/Readme.md @@ -342,4 +342,4 @@ doing some thinking about the design of a solution, it turned out to be easier than I expected. Somehow I suspect the next step will be the tricky one. In the next part of our compiler writing journey, I will attempt to -add function arguments and parameters to our compiler. Wish me luck! +add function arguments and parameters to our compiler. Wish me luck! [Next step](../24_Function_Params/Readme.md) diff --git a/24_Function_Params/Readme.md b/24_Function_Params/Readme.md index e5f04d5..18320b3 100644 --- a/24_Function_Params/Readme.md +++ b/24_Function_Params/Readme.md @@ -494,4 +494,4 @@ code. In the next part of our compiler writing journey, I'll modify the compiler to make function calls with an arbirary number of arguments. Then I can -move `input27a.c` and `input27b.c` into the `tests/` directory. +move `input27a.c` and `input27b.c` into the `tests/` directory. [Next step](../25_Function_Arguments/Readme.md) diff --git a/25_Function_Arguments/Readme.md b/25_Function_Arguments/Readme.md index 02d634e..70517ba 100644 --- a/25_Function_Arguments/Readme.md +++ b/25_Function_Arguments/Readme.md @@ -361,4 +361,4 @@ add the ability to write function prototypes. This will allow us to link in outside functions. I'm thinking of those original Unix functions and system calls which are `int` and `char *` based such as `open()`, `read()`, `write()`, `strcpy()` etc. It will be nice to compile -some useful programs with our compiler. +some useful programs with our compiler. [Next step](../26_Prototypes/Readme.md) diff --git a/26_Prototypes/Readme.md b/26_Prototypes/Readme.md index e83caea..33b8522 100644 --- a/26_Prototypes/Readme.md +++ b/26_Prototypes/Readme.md @@ -373,4 +373,4 @@ can compile! That's progress. ## Conclusion and What's Next In the next part of our compiler writing journey, I'll follow up on -a comment above and improve the testing of our compiler's functionality. +a comment above and improve the testing of our compiler's functionality. [Next step](../27_Testing_Errors/Readme.md) diff --git a/27_Testing_Errors/Readme.md b/27_Testing_Errors/Readme.md index 82d7e12..174261c 100644 --- a/27_Testing_Errors/Readme.md +++ b/27_Testing_Errors/Readme.md @@ -289,4 +289,4 @@ try to: + add support for an external pre-processor + allow the compiler to compile multiple files named on the command line + add the `-o`, `-c` and `-S` flags to the compiler to make it feel - more like a "normal" C compiler +more like a "normal" C compiler [Next step](../28_Runtime_Flags/Readme.md) diff --git a/28_Runtime_Flags/Readme.md b/28_Runtime_Flags/Readme.md index 753b9c1..5f1d84c 100644 --- a/28_Runtime_Flags/Readme.md +++ b/28_Runtime_Flags/Readme.md @@ -358,4 +358,4 @@ int main() In the next part of our compiler writing journey, we will look at adding support for structs to our compiler. I think we might have to do another design step first before we get to -implementing the changes. +implementing the changes. [Next step](../29_Refactoring/Readme.md) diff --git a/29_Refactoring/Readme.md b/29_Refactoring/Readme.md index 9aadfa9..2421366 100644 --- a/29_Refactoring/Readme.md +++ b/29_Refactoring/Readme.md @@ -259,4 +259,4 @@ probably happen in the part where we implement enumerated values. In the next part of our compiler writing journey, I'll get back to what I wanted to cover in this part: the design side of implementing -structs, unions and enums in our compiler. +structs, unions and enums in our compiler. [Next step](../30_Design_Composites/Readme.md) diff --git a/30_Design_Composites/Readme.md b/30_Design_Composites/Readme.md index 8d70dca..e9db5cf 100644 --- a/30_Design_Composites/Readme.md +++ b/30_Design_Composites/Readme.md @@ -600,4 +600,4 @@ In the next part of our compiler writing journey, I'll probably implement the declaration of struct types, but not actually write the code for them to be used. I'll do that in the following part. With both of these done, I'll hopefully be able to implement unions in a third part. Then, enums in the -fourth part. We'll see! +fourth part. We'll see! [Next step](../31_Struct_Declarations/Readme.md) diff --git a/31_Struct_Declarations/Readme.md b/31_Struct_Declarations/Readme.md index 5198285..c48920a 100644 --- a/31_Struct_Declarations/Readme.md +++ b/31_Struct_Declarations/Readme.md @@ -519,4 +519,4 @@ will be complicated. In the next part of our compiler writing journey, I will try to add the code to parse the '.' token so that we can access members -in a struct variable. +in a struct variable. [Next step](../32_Struct_Access_pt1/Readme.md) diff --git a/32_Struct_Access_pt1/Readme.md b/32_Struct_Access_pt1/Readme.md index cb6b8c1..4ebd5df 100644 --- a/32_Struct_Access_pt1/Readme.md +++ b/32_Struct_Access_pt1/Readme.md @@ -244,4 +244,4 @@ features will have to be made more general. So there will be a "mop up" stage in this journey. Now that we have structs mostly working, in the next part of our compiler writing -journey, I will try to add unions. +journey, I will try to add unions. [Next step](../33_Unions/Readme.md) diff --git a/33_Unions/Readme.md b/33_Unions/Readme.md index 80d69e4..df9eea2 100644 --- a/33_Unions/Readme.md +++ b/33_Unions/Readme.md @@ -163,4 +163,4 @@ that pointer access into a union also works. ## Conclusion and What's Next This was another nice and easy part of our compiler writing journey. -In the next part of our compiler writing journey, we will add enums. +In the next part of our compiler writing journey, we will add enums. [Next step](../34_Enums_and_Typedefs/Readme.md) diff --git a/34_Enums_and_Typedefs/Readme.md b/34_Enums_and_Typedefs/Readme.md index ffecb81..a39920a 100644 --- a/34_Enums_and_Typedefs/Readme.md +++ b/34_Enums_and_Typedefs/Readme.md @@ -408,4 +408,4 @@ bring in the C pre-processor. Now that we have structs, unions, enums and typedefs, we should be able to write a bunch of *header files* with definitions of some of the common Unix/Linux library functions. Then we will be able to include them in our source files and write -some really useful programs. +some really useful programs. [Next step](../35_Preprocessor/Readme.md) diff --git a/35_Preprocessor/Readme.md b/35_Preprocessor/Readme.md index ee45382..e404435 100644 --- a/35_Preprocessor/Readme.md +++ b/35_Preprocessor/Readme.md @@ -521,4 +521,4 @@ lines of code we'll need to make the compiler self-compiling, but I'm going to hazard a guess of between 7,000 to 9,000 lines. We'll see! In the next part of our compiler writing journey, we will add the `break` -and `continue` keywords to our loop constructs. +and `continue` keywords to our loop constructs. [Next step](../36_Break_Continue/Readme.md) diff --git a/36_Break_Continue/Readme.md b/36_Break_Continue/Readme.md index b1346b3..fd7b0c4 100644 --- a/36_Break_Continue/Readme.md +++ b/36_Break_Continue/Readme.md @@ -362,4 +362,4 @@ in the process of implementing them. Now that we have the `break` keyword in the language, I will attempt to add `switch` statements in the next part of our compiler writing journey. This is going to require the addition of switch jump tables, and I know -this is going to be complicated. So get ready for an interesting next step. +this is going to be complicated. So get ready for an interesting next step. [Next step](../37_Switch/Readme.md) diff --git a/37_Switch/Readme.md b/37_Switch/Readme.md index 33ae5b0..2637650 100644 --- a/37_Switch/Readme.md +++ b/37_Switch/Readme.md @@ -667,4 +667,4 @@ I'm starting to get annoyed with the compulsory '{' ... '}' around all of our compound statements. So, in the next part of our compiler writing journey, I will bite the bullet and attempt to solve the "dangling else" -problem. +problem. [Next step](../38_Dangling_Else/Readme.md) diff --git a/38_Dangling_Else/Readme.md b/38_Dangling_Else/Readme.md index 2b3acda..8fdced9 100644 --- a/38_Dangling_Else/Readme.md +++ b/38_Dangling_Else/Readme.md @@ -401,4 +401,4 @@ If you do, I hope that you found all the parts of the journey so far useful. In the next part of our compiler writing journey, I will pick something that currently doesn't work but we need to work to self-compile our compiler, and -fix it. +fix it. [Next step](../39_Var_Initialisation_pt1/Readme.md) diff --git a/39_Var_Initialisation_pt1/Readme.md b/39_Var_Initialisation_pt1/Readme.md index 7bd3e7c..0c152fd 100644 --- a/39_Var_Initialisation_pt1/Readme.md +++ b/39_Var_Initialisation_pt1/Readme.md @@ -212,4 +212,4 @@ put comments into the code where I will have to write the assignment functionality to go with declarations. In the next part of our compiler writing journey, we will try to add -global variable declarations with assignments to our compiler. +global variable declarations with assignments to our compiler. [Next step](../40_Var_Initialisation_pt2/Readme.md) diff --git a/40_Var_Initialisation_pt2/Readme.md b/40_Var_Initialisation_pt2/Readme.md index abf8f13..60a334b 100644 --- a/40_Var_Initialisation_pt2/Readme.md +++ b/40_Var_Initialisation_pt2/Readme.md @@ -563,4 +563,4 @@ they say. I'm happy, though, because the changes to the symbol table make much more sense than what I had before. In the next part of our compiler writing journey, we will try to -add local variable initialisation to the compiler. +add local variable initialisation to the compiler. [Next step](../41_Local_Var_Init/Readme.md) diff --git a/41_Local_Var_Init/Readme.md b/41_Local_Var_Init/Readme.md index f61d8e0..f69aee2 100644 --- a/41_Local_Var_Init/Readme.md +++ b/41_Local_Var_Init/Readme.md @@ -151,4 +151,4 @@ Right now I'm guessing about 60 parts and an 75% chance of completing by year's But we still have a bunch of small, but possibly difficult, features to add to the compiler. -In the next part of our compiler writing journey, I will add cast parsing to the compiler. +In the next part of our compiler writing journey, I will add cast parsing to the compiler. [Next step](../42_Casting/Readme.md) diff --git a/42_Casting/Readme.md b/42_Casting/Readme.md index 1814ccc..efb540d 100644 --- a/42_Casting/Readme.md +++ b/42_Casting/Readme.md @@ -383,4 +383,4 @@ covered most bases here but not all of them, so expect to see some `void *` edge cases that I haven't spotted yet. In the next part of our compiler writing journey, we'll add some missing -operators. +operators. [Next step](../43_More_Operators/Readme.md) diff --git a/43_More_Operators/Readme.md b/43_More_Operators/Readme.md index a3cc1b2..0afc2da 100644 --- a/43_More_Operators/Readme.md +++ b/43_More_Operators/Readme.md @@ -361,4 +361,4 @@ right-associativity. After that, we could reuse some of the code generation code in `genAST()` to make our lives a bit easier. In the next part of our compiler writing journey, it looks like I'll be adding -constant folding to the compiler. +constant folding to the compiler. [Next step](../44_Fold_Optimisation/Readme.md) diff --git a/44_Fold_Optimisation/Readme.md b/44_Fold_Optimisation/Readme.md index 139ff19..8ad0302 100644 --- a/44_Fold_Optimisation/Readme.md +++ b/44_Fold_Optimisation/Readme.md @@ -298,4 +298,4 @@ it's good to see one type of optimisation now. In the next part of our compiler writing journey, we will replace our current global declaration parser with code that evaluates expressions -using `binexpr()` and this new constant folding code. +using `binexpr()` and this new constant folding code. [Next step](../45_Globals_Again/Readme.md) diff --git a/45_Globals_Again/Readme.md b/45_Globals_Again/Readme.md index 59b5e43..8f89ff8 100644 --- a/45_Globals_Again/Readme.md +++ b/45_Globals_Again/Readme.md @@ -221,4 +221,4 @@ int main() { In the next part of our compiler writing journey, I will probably feed more of the compiler source to itself and see what we still have to -implement. +implement. [Next step](../46_Void_Functions/Readme.md) diff --git a/46_Void_Functions/Readme.md b/46_Void_Functions/Readme.md index 2ca7eb1..0634bfc 100644 --- a/46_Void_Functions/Readme.md +++ b/46_Void_Functions/Readme.md @@ -270,4 +270,4 @@ Two big things that we will need to tackle are static functions and variables, and the `sizeof()` operator. In the next part of our compiler writing journey, I will probably -work on the `sizeof()` operator because `static` still scares me a bit! +work on the `sizeof()` operator because `static` still scares me a bit! [Next step](../47_Sizeof/Readme.md) diff --git a/47_Sizeof/Readme.md b/47_Sizeof/Readme.md index b6b4bfd..479040a 100644 --- a/47_Sizeof/Readme.md +++ b/47_Sizeof/Readme.md @@ -137,4 +137,4 @@ Well, `sizeof()` turned out to be simple, at least for the functionality that we need for our compiler. In reality, `sizeof()` is quite complicated for a full-blown production C compiler. -In the next part of our compiler writing journey, I will tackle `static`. +In the next part of our compiler writing journey, I will tackle `static`. [Next step](../48_Static/Readme.md) diff --git a/48_Static/Readme.md b/48_Static/Readme.md index 209beae..addfa71 100644 --- a/48_Static/Readme.md +++ b/48_Static/Readme.md @@ -208,4 +208,4 @@ going through the code, finding all C_GLOBAL uses and ensuring that I added appropriate C_STATIC code as well. In the next part of our compiler writing journey, I think it's time that -I tackle the [ternary operator](https://en.wikipedia.org/wiki/%3F:). +I tackle the [ternary operator](https://en.wikipedia.org/wiki/%3F:). [Next step](../49_Ternary/Readme.md) diff --git a/49_Ternary/Readme.md b/49_Ternary/Readme.md index 0de485c..f217b54 100644 --- a/49_Ternary/Readme.md +++ b/49_Ternary/Readme.md @@ -323,4 +323,4 @@ to itself, look at the parse errors I get and choose one or more of them to fix. > P.S. We've reached 5,000 lines of code and 90,000 words in the Readme - files. We must be nearly there! +files. We must be nearly there! [Next step](../50_Mop_up_pt1/Readme.md) diff --git a/50_Mop_up_pt1/Readme.md b/50_Mop_up_pt1/Readme.md index b054da3..dca7b15 100644 --- a/50_Mop_up_pt1/Readme.md +++ b/50_Mop_up_pt1/Readme.md @@ -281,4 +281,4 @@ functionality works. So that's a few small things fixed up in this part of our journey. What I will do now is step back, rethink the array/pointer design and -try to fix this up in the next part of our compiler writing journey. +try to fix this up in the next part of our compiler writing journey. [Next step](../51_Arrays_pt2/Readme.md) diff --git a/51_Arrays_pt2/Readme.md b/51_Arrays_pt2/Readme.md index 992fa29..bb7406f 100644 --- a/51_Arrays_pt2/Readme.md +++ b/51_Arrays_pt2/Readme.md @@ -138,4 +138,4 @@ but just needed some more tweaking to cover all the functionality that we needed. In the next part of our compiler writing journey, we will go back to -mopping up. +mopping up. [Next step](../52_Pointers_pt2/Readme.md) diff --git a/52_Pointers_pt2/Readme.md b/52_Pointers_pt2/Readme.md index 59a5a11..fa40a86 100644 --- a/52_Pointers_pt2/Readme.md +++ b/52_Pointers_pt2/Readme.md @@ -320,4 +320,4 @@ we only expect C pre-processor lines when we see a '#' in column 1. In the next part of our compiler writing journey, I'll go back to feeding the compiler source code to itself, see what errors pop and up choose one -or more to fix. +or more to fix. [Next step](../53_Mop_up_pt2/Readme.md) diff --git a/53_Mop_up_pt2/Readme.md b/53_Mop_up_pt2/Readme.md index 4c3cf57..607aa9d 100644 --- a/53_Mop_up_pt2/Readme.md +++ b/53_Mop_up_pt2/Readme.md @@ -267,4 +267,4 @@ them. In the next part of our compiler writing journey, I will have to work on implementing register spills. I've been delaying this, but now most of the fatal errors from the compiler (when compiling itself) are register -issues. So now it's time to sort this out. +issues. So now it's time to sort this out. [Next step](../54_Reg_Spills/Readme.md) diff --git a/54_Reg_Spills/Readme.md b/54_Reg_Spills/Readme.md index 9fbfb73..c78fab5 100644 --- a/54_Reg_Spills/Readme.md +++ b/54_Reg_Spills/Readme.md @@ -460,4 +460,4 @@ but there is substantial room for improvement. While doing the above, I also fixed the problem with `&&` and `||`. I've decided to write these changes up in the next part, even though the -code here already has these changes. +code here already has these changes. [Next step](../55_Lazy_Evaluation/Readme.md) diff --git a/55_Lazy_Evaluation/Readme.md b/55_Lazy_Evaluation/Readme.md index ee369e9..77ce564 100644 --- a/55_Lazy_Evaluation/Readme.md +++ b/55_Lazy_Evaluation/Readme.md @@ -176,4 +176,4 @@ the only thing the compiler can't parse (in its own source code) is the declaration and use of local arrays. So, guess what... In the next part of our compiler writing journey, I'll try to work out -how to declare and use local arrays. +how to declare and use local arrays. [Next step](../56_Local_Arrays/Readme.md) diff --git a/56_Local_Arrays/Readme.md b/56_Local_Arrays/Readme.md index 228a99e..9821f9c 100644 --- a/56_Local_Arrays/Readme.md +++ b/56_Local_Arrays/Readme.md @@ -115,4 +115,4 @@ elements. ## Conclusion and What's Next In the next part of our compiler writing journey, I'll return to mopping -up duties. +up duties. [Next step](../57_Mop_up_pt3/Readme.md) diff --git a/57_Mop_up_pt3/Readme.md b/57_Mop_up_pt3/Readme.md index b3a336a..157d5c8 100644 --- a/57_Mop_up_pt3/Readme.md +++ b/57_Mop_up_pt3/Readme.md @@ -215,4 +215,4 @@ That's enough mopping up for now. When I fixed up the `+=` and `-=` problem, it highlighted a big issue with the `++` and `--` operators (prefix and postfix) as applied to pointers. -In the next part of our compiler writing journey, I will tackle this issue. +In the next part of our compiler writing journey, I will tackle this issue. [Next step](../58_Ptr_Increments/Readme.md) diff --git a/58_Ptr_Increments/Readme.md b/58_Ptr_Increments/Readme.md index ad7e629..508a214 100644 --- a/58_Ptr_Increments/Readme.md +++ b/58_Ptr_Increments/Readme.md @@ -428,4 +428,4 @@ register values. In the next part of our compiler writing journey, I will start on the **WDIW** stage. We are going to need some strategies to make our work -effective. +effective. [Next step](../59_WDIW_pt1/Readme.md) diff --git a/59_WDIW_pt1/Readme.md b/59_WDIW_pt1/Readme.md index 3c8c322..7547576 100644 --- a/59_WDIW_pt1/Readme.md +++ b/59_WDIW_pt1/Readme.md @@ -234,4 +234,4 @@ stages, and try to work out what is causing the difference. output which would allow `gdb` to see the source line number that we are stopped on. It isn't working yet, but in case you look, you will see a new function `cglinenum()` in `cg.c`. When I get it working, I'll - write up some commentary on it. +write up some commentary on it. [Next step](../60_TripleTest/Readme.md) diff --git a/60_TripleTest/Readme.md b/60_TripleTest/Readme.md index 048b83f..493b0ee 100644 --- a/60_TripleTest/Readme.md +++ b/60_TripleTest/Readme.md @@ -358,4 +358,4 @@ break. In the next part of our compiler writing journey, I will outline what more can be done with our compiler. Perhaps I'll do some of these -things; perhaps you will. +things; perhaps you will. [Next step](../61_What_Next/Readme.md) diff --git a/61_What_Next/Readme.md b/61_What_Next/Readme.md index 60af882..4d542e8 100644 --- a/61_What_Next/Readme.md +++ b/61_What_Next/Readme.md @@ -148,4 +148,4 @@ These are all the possible things that I can of (at the moment) to continue the work on our compiler. I will get on to some of them, but at this point I'd be very happy to have other people help out with the project, and/or fork the compiler's code and -do their own thing with it! +do their own thing with it! [Next step](../62_Cleanup/Readme.md) diff --git a/62_Cleanup/Readme.md b/62_Cleanup/Readme.md index 9b1d0bd..4f6709a 100644 --- a/62_Cleanup/Readme.md +++ b/62_Cleanup/Readme.md @@ -104,4 +104,4 @@ I've been reading up on register allocation, and I think I'll add a linear scan register allocation mechanism to the compiler. To do this, though, I need to add an intermediate representation stage. This will be the goal for the next few stages, but so far I haven't -done anything concrete. +done anything concrete. [Next step](../63_QBE/Readme.md)