next up previous contents
Next: A small example - Up: CS2111: Design and Implementation Previous: Syntax-directed Translation   Contents

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
1999-09-30