Compiler Construction

Imagemap
Compiler
Constructionphasesfrontendinterleaving1 pass?lameunnatural scope ruleslimits optimisationsignores modularitynowadays...5-15 passeslexical analysis
(scanner)strip whitespacelexemestokenssyntax analysisgenerates parse treespammy!AST is nicersome errors caughtcontext-freesemantic analysiscontext-sensitivetype infointermediate code generationarch independentgeneric instruction setbackendoptimisationfocus...loopsobject code generationfeatures we wantspeedoptimisationdebugging infoimplicationsmust recognize
legal/illegal programsgenerate correct codehigh & low level
hideCompiler Construction
hidephases
hidefrontend
hideinterleaving
hide1 pass?
hidebutton_cancellame
leafunnatural scope rules
leaflimits optimisations
leafignores modularity
hidenowadays...
leaf5-15 passes
hidefull-1lexical analysis (scanner)
leafstrip whitespace
leaflexemes
leaftokens
hidefull-2syntax analysis
hidegenerates parse tree
hidespammy!
leafbookmarkAST is nicer
hidexmagsome errors caught
leafbellcontext-free
hidefull-3semantic analysis
leafcontext-sensitive
leaftype info
hidefull-4intermediate code generationInternal Link
leafksmiletrisarch independent
leafgeneric instruction set
hidebackend
hidefull-5optimisation
hidefocus...
leafloops
leaffull-6object code generation
hidefeatures we want
leafforwardspeed
leafoptimisation
leafflagdebugging info
hideimplications
leafstopmust recognize legal/illegal programs
leafpencilgenerate correct code
leafhigh & low level