From 2993d0b5763c329aa5c774046fabfa354a03b15f Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Tue, 10 Jan 2017 03:38:17 -0500 Subject: [PATCH] Added more TODO's --- docs/Writing-the-Cyclone-Scheme-Compiler-Revised-2017.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revised-2017.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revised-2017.md index abcfffe7..80b1455b 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revised-2017.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revised-2017.md @@ -46,12 +46,18 @@ Before we get started, I want to say **Thank You** to all of the contributors to Cyclone has a similar architecture to other modern compilers: +TODO: change parser to reader in diagram + flowchart of cyclone compiler First, an input file containing Scheme code is received on the command line and loaded into an abstract syntax tree (AST) by Cyclone's parser. From there a series of source-to-source transformations are performed on the AST to expand macros, perform optimizations, and make the code easier to compile to C. These intermediate representations (IR) can be printed out in a readable format to aid debugging. The final AST is then output as a `.c` file and the C compiler is invoked to create the final executable or object file. The code is represented internally as an AST of regular Scheme objects. Since Scheme represents both code and data using [S-expressions](https://en.wikipedia.org/wiki/S-expression), our compiler does not (in general) have to use custom abstract data types to store the code as would be the case with many other languages. +TODO: move reader section up here?? + +TODO: have another diagram that illustrates the compiled file contains a mix of generated C code, and runtime (with primitives, gc, helper functions, environments, etc)?? + ## Source-to-Source Transformations ### Overview