Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FreeSoftware Compiler Blows

Name: Anonymous 2014-03-15 9:38

Name: Anonymous 2014-03-15 15:14

>>2
source will be short and clear enough for someone who has only taken Java 101 in college to read and understand on a Sunday afternoon
There is no shortcut in writing a C compiler. You cannot avoid having at least six stages:
1. input -> tokens
2. tokens -> AST (abstract syntax tree)
3. AST -> simplified AST (basically macro-expansion stage)
4. simplified AST -> SSA or CPS
5. SSA/CPS -> machine code
6. machine code -> object file

In case of C, the "input -> tokens" stage would be especially convoluted due to the bad language design, requiring feedback from "tokens -> AST"

I have left out optimization passes, which would run on AST and SSA/CPS forms

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List