
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

CIS 400 Spring 2008
The third part of the programming project is to implement symbol tables and typechecking for the Decaf language. These typechecking and semantic rules are described in the document DecafSemanticChecks.3.04.08.doc, from the design discussion held in class on Tuesday, March 4. However, you may ignore all the semantic rules other than typechecking, i.e. you do not have to check that there is a class “main” and that the statements for break, continue and return follow their context guidelines. On this web page are program templates to help you start programming this part of the project. Here are the classes: Semantics.java – contains a method “check” that you need to complete. SymbolTable.java – contains the outline of symbol table structure and methods for changing scope, inserting identifiers and finding identifiers for you to complete. Stentry.java – a data class to hold one symbol table entry STtype.java – a data class to hold one type for an identifier