CIS-4050 Homework #3: ANTLR

Reading: Chapter 3 of the text covers parsing. Read Sections 3.1, 3.2, and 3.5. We may return to the sections on top-down parsing (3.3) and bottom-up parsing (3.4) later in the course.

In this assignment you will add syntax to the Augusta ANTLR grammar to support several new language features.

Start by updating your clone of the Augusta project:

  1. Switch to the main branch (if not already on it) using: git switch main.
  2. Update the main branch using: git pull.
  3. Create a new branch for this assignment using: git switch -c homework-03.

The repository contains (failing) tests for the new syntax forms described below. Adjust the grammar (in augusta.g4) so all tests pass.

Part 1: Declarations

There are several new declaration forms needed. These include:

Part 2: Expressions

There are several new expression forms needed. These include:

Part 3: Statements

There are several new statement forms needed. These include:

Part 4: Submission

Submit your augusta.g4 file to Canvas


Last Revised: 2025-02-26
© Copyright 2025 by Peter Chapin <peter.chapin@vermontstate.edu>