Comparative Programming Languages
Homework 1

(from CS 363 Comparative Programming Languages, White, Feb 05)
  1. Given the grammar:
    E --> E + T
        | E - T
        | T
    T --> T * F
        | T / F
        | F
    F --> ( E )
        | number
    
    1. Give the parse tree and the leftmost derivation for the string 3 * (4 + 2) * 2
  2. Given the grammar:
    S --> a S c B | A | b
    A --> c A | c
    B --> d | A
    
    list of the strings of length 6 or less that are in the language.