Spring 99, CSE 428: Assignment 1


Distributed: Jan 21.
Due: Jan 28 in class.
Total maximum score: 100 points.

The purpose of this assignment is to provide experience with programming language syntax and context-free grammars.
  1. [Points 30] Exercise 2.4 in Sethi

  2. [Points 20] Exercise 2.6 in Sethi (Note: "Parse tree" in Sethi means "Derivation tree")
  3. [Points 30] Consider the following grammar for "boolean expressions":
       BExp ::= true | false | not BExp | BExp and BExp | BExp -> BExp
    

  4. [Points 20] Define a grammar which generates all palindromes over the English alphabet. Note: a palindrome is any string which reads the same backward as forward. For example, the empty string, "a", "aa", "aba", and "abba" are palindromes, whereas "ab", "abb", and "abc" are not.