Compiler design semester exam roadmap

Basics

Days 1 to 3: the phases of a compiler, tokens and grammar clean-up. 2 topics, about 7 hours.

  1. Phases and lexical analysis

    About 3 h.

    • Name the phases of a compiler and what each produces
    • Split a program into tokens and count them

    Visualisers: Lexical analysis

  2. Left recursion, FIRST and FOLLOW

    About 4 h.

    • Remove left recursion and left-factor a grammar
    • Compute FIRST and FOLLOW sets

    Visualisers: Left recursion & factoring, FIRST & FOLLOW