Computer Science 433
Programming Languages

Fall 2012, The College of Saint Rose

Lecture 6: Syntax and Semantics
Date: Monday, September 17, 2012

Agenda

Lecture Assignment 6

Due at the start of class, Wednesday, September 19.

Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to terescoj AT strose.edu by the start of class. Please use a clear subject line when submitting by email (e.g., CSC 433 Lecture Assignment 6, Joe Student). We will discuss these questions at the start of class, so no late submissions are accepted.

The readings for next class are Sebesta Chapter 3.

  1. Given this grammar:
    <assign> => <var> = <expr>
       <var> => A | B | C | D
      <expr> => <var> + <expr>
              | <var> * <expr>
              | ( <expr> )
              | <var>
    

    show both leftmost and rightmost derivations for the following sentences: