Compiler design semester exam roadmap

Numericals and tables

Days 10 to 12: token counts, parse-table states and conflicts, and code for expressions. 3 topics, about 7 hours.

  1. Token counts

    About 1 h.

    • Count the tokens in a code fragment, including tricky operators and comments

    Visualisers: Lexical analysis

  2. Parse-table states and conflicts

    About 4 h.

    • Count the states of LR(0), CLR and LALR automata for one grammar
    • Decide whether a grammar is LL(1), SLR or LALR

    Visualisers: LL(1) parsing, LR parsing

  3. Three-address code and DAG counts

    About 2 h.

    • Find the minimum number of temporaries and DAG nodes for an expression

    Visualisers: Three-address code & DAG