next up previous
Next: A small example C Up: CS2121: The Implementation and Previous: Putting it all together

Phases of Compilation

Phases of Compilation

        text of program (characters)
                v
 A      LEXICAL                             <- names ->  D
 N        words = (syntactic, semantic)                  I
 A              v                                        C
 L      SYNTACTIC                                        T
 Y        assemble words into sentences                  I
 S              v                                        O
 I      SEMANTIC                     <- declarations ->  N
 S        bind meanings to names                         A
                v                                        R
 G      GLOBAL OPTIMISATION                              Y
 E        look for large optimisations
 N              v
 E      CODE GENERATION                 <- addresses ->
 R        
 A              v
 T      PEEPHOLE OPTIMISATION
 E        look for small optimisations
                v
              run-time                              debugging



Pete Jinks
2004-10-26