M2: Lexical Analysis

This second modules provides an overview of the lexical analysis component of a compiler. We discuss how one implements this component by hand or using an auto generated tool.

Pre-recorded Lectures and Required Readings

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

The lectures are a series of approx 20-30 minute videos divided into sections:

  • 2.0 - Regular Expressions to NFAs

  • 2.1 - Converting a NFA to DFA

  • 2.2 - Coding a Scanner

Supplementary Resources

  • The slides and code presented in this module are accessible on our Canvas Page right before class. Click on the Files link and you then can download the m2.pdf file.

  • Engineering a Compiler readings:
    • Chapter 2.1 - 2.5

  • Go by Example
    • Pointers section

  • Understanding Pointers in Go

Synchronous Session (Remote)

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: Wednesday June 21st @ 5:30pm-7:00pm

  • Discussion Outline
    • Overview of Lexical Analysis

    • Introduction to Regular Expressions

    • Finite Automata: NFAs and DFAs


Assignments are always due on Thursday evenings.