M4: Syntactical Analysis (cont.) & Static Semantic Analysis

We explore how we can use auto-generated tools to build the syntactical analysis phase with ANTLR. We will begin an introduction into the next phase of the compiler, static semantic analysis. We will also continue our discussion into syntactical analysis by looking over common parsing algorithms.

Pre-recorded Lectures and/or Required Readings

Please read over the below articles after our synchronous session:

  1. LL(1) Parsing by Andrew Begeel

  2. How to implement an LR(1) Parser by Kirill Andreev

  3. Abstract Syntax Trees by Ruslan Spivak

The pre-recorded lectures are available here: M4 Videos. You can also find the videos under the “Panopto” tab on the MPCS 51300 canvas site.

The slides for this module will be accessible in the upstream repository and on Canvas right before class.

Supplementary Resources

  • Engineering a Compiler readings:
    • Chapter 4.1 - 4.4

Synchronous Session (In-person)

You will find the links to the Zoom sessions on Canvas. As a reminder here are the dates and times for the synchronous session for this module:

  • Dates/Times
    • Section 1: Tuesday January 24th @ 5:30pm-7:20pm

  • Discussion Outline
    • Review homework #1 lexing

    • Parser and lexer auto-generation with ANTLR

    • Introduction to Semantic Analysis.

    • Coding Demo: LL(1) Parsing and semantic analysis for the Cal Language.

Assignment

Assignments are always due on Wednesday evenings.