AI Summary
[DOCUMENT_TYPE: user_assignment]
**What This Document Is**
This document outlines the second phase of a compiler construction course (CISC 672 at the University of Delaware), specifically focusing on the parser component. It details an assignment requiring students to implement a parser for the Cool language using JavaCup, a parser generator tool. The assignment builds upon foundational knowledge of syntax specification, parsing techniques, and abstract syntax tree (AST) construction discussed in lectures. It’s a practical exercise designed to solidify theoretical understanding through hands-on implementation.
**Why This Document Matters**
This assignment is crucial for students enrolled in advanced compiler construction courses. It’s particularly beneficial for those seeking to gain practical experience with parser generators and understand the complexities of transforming source code into a structured representation. Students will benefit from carefully reviewing this material before, during, and after implementing their parsers to ensure a robust and correct design. It’s also valuable for anyone preparing for related roles in software development, language design, or compiler technology.
**Topics Covered**
* Parser Generators (specifically JavaCup/CUP)
* Abstract Syntax Tree (AST) Construction
* Syntax Specification for the Cool Language
* Semantic Actions within Parser Generators
* Error Handling in Parsing
* Teamwork and Collaborative Software Development (using SVN)
* Parser Design and Implementation Best Practices
**What This Document Provides**
* A detailed assignment description with clear due dates for grammar and complete parser submissions.
* Guidance on utilizing the Cool language’s syntax as defined in its reference manual.
* Information on relevant classes for building the AST (located in the `treeNodes` package).
* Instructions for utilizing error handling mechanisms within the parser.
* A reference to the Java CUP specification manual for further learning.
* Requirements for a project write-up detailing design decisions and program correctness.