hw4 - CS 415 Compilers: Problem Set 4 Due date: Wednesday,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 415 Compilers: Problem Set 4 Due date: Wednesday, March 3, 2010, before recitation Problem 1 You want to include an arithmetic switch statement in a programming language. The semat- ics of the new construct is as follows: The expression in the switch statement is evaluated to an integer value “x”, and the “x-th” statement in the statement list h stmt list i is executed, if such a statement exists. If no such statement exists, and a default case is specified, the default case is executed. Here is a proposed partial grammar for the switch statement
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/29/2010 for the course CS 198:415 taught by Professor Kremer,u. during the Spring '10 term at Rutgers.

Ask a homework question - tutors are online