From 678308582e5645ff71d2db24467b4ec2850e2886 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 3 Aug 2015 22:31:38 -0400 Subject: [PATCH] Link to diagram image --- docs/Writing-the-Cyclone-Scheme-Compiler.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler.md b/docs/Writing-the-Cyclone-Scheme-Compiler.md index 22078bd1..b0efe302 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler.md @@ -30,6 +30,8 @@ Cyclone has a similar architecture to other modern compilers: input file => scheme AST => IR's => C-gen => C compiler => exe or obj + + An input file containing Scheme code is received on the command line and load by Cyclone's parser. The code is represented as an abstract syntax tree (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 have to use abstract data types to store the code as would be the case with many other languages. From there a series of source-to-source transformations are performed on the AST to make it easier to compile to C, perform optimizations, etc. The final AST is then output as a `.c` file and the C compiler is called to create the final executable or object file.