mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Link to diagram image
This commit is contained in:
parent
560e417d4b
commit
678308582e
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
||||
<img src="docs/images/compiler.png">
|
||||
|
||||
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue