CS326 - Assignment 3

Due Date: Wednesday, April 4, in class.

1. Finish reading chapter 2.

2. Problem 2.1, p. 78.

3. Problem 2.2, p. 78.

4. Problem 2.4, parts (b-e) p. 78.

5. (Graduate) Consider the following context free grammer, with starting symbol V, and terminal symbols { typename, id, number, *, (, ), [, ] }

V      ::= typename D;

D      ::= P F

P      ::=  * P          (note: '*' is the symbol '*'
        |   e            (empty string)

F      ::=  id 
        |   (D)
        |   F[number]

Show how the following C variable declarations can be derived using a left-most derivation of the rules from this grammar.