Chapter 2: Q1E (page 154)
Recall the CFG G4 that we gave in Example 2.4. For convenience, let’s rename its variables with single letters as follows.
Give parse trees and derivations for each string.
a. a
b. a+a
c. a+a+a
d. ((a))
Short Answer
- a parse trees and derivation is given below.
- a+a parse trees and derivation is given below.
- a+a+a parse trees and derivation is given below.
- ((a)) parse trees and derivation is given below.